Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Klimabevaegelsen/landbruget.dk
/ functions
Functions
6,215 in github.com/Klimabevaegelsen/landbruget.dk
⨍
Functions
6,215
◇
Types & classes
1,072
↳
Endpoints
183
↓ 12 callers
Method
deduplicate
Remove duplicate rows using DuckDB SQL.
backend/pipelines/arbejdstilsynet_inspections/silver/transform.py:321
↓ 12 callers
Method
download_json
Mock download JSON.
backend/common/tests/test_storage_core.py:48
↓ 12 callers
Method
drop_table
Drop a table or view if it exists.
backend/pipelines/drive_data_pipeline/silver/duckdb_base.py:180
↓ 12 callers
Method
export
(self)
backend/pipelines/api_export/tests/test_base_exporter.py:7
↓ 12 callers
Method
export_table_to_storage_direct
OPTIMAL: Export DuckDB table directly to cloud storage without DataFrame conversion. This provides maximum performance: - No
backend/common/storage/core.py:381
↓ 12 callers
Method
finish
Create and save metadata. Call at pipeline end. Args: record_count: Number of records processed. file_size_bytes: Siz
backend/common/cli.py:79
↓ 12 callers
Function
get_data_buffer
Get a reference to the current data buffer.
backend/pipelines/chr_pipeline/bronze/export.py:316
↓ 12 callers
Function
is_retryable_status_code
Determine if an HTTP status code should trigger a retry. Args: status_code: HTTP status code Returns: True if the request sh
backend/common/retry_utils.py:90
↓ 12 callers
Method
list_files_with_timestamps
List files matching pattern with their timestamps. Returns list of tuples: (file_path, timestamp) Useful for finding the mos
backend/common/storage/core.py:1030
↓ 12 callers
Function
load_herd_list
Mock implementation of load_herd_list. Fetches a list of herd numbers for a given species and usage code.
backend/pipelines/chr_pipeline/tests/bronze/test_load_besaetning.py:70
↓ 12 callers
Method
prepare_geometries
Prepare geometries for spatial operations with coordinate system alignment.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/coordinate_transformer.py:23
↓ 12 callers
Method
save_data_direct
✅ OPTIMIZED: Save DuckDB table directly to cloud storage without DataFrame conversion. This method provides maximum performance by:
backend/pipelines/unified_pipeline/src/unified_pipeline/common/base.py:1342
↓ 12 callers
Function
setup_test_duckdb
Set up DuckDB with test data directly (synchronous, no cloud storage access). This is a test helper that bypasses the async _setup_duckdb me
backend/pipelines/unified_pipeline/src/tests/gold/test_pesticide_disaggregation.py:21
↓ 11 callers
Method
add_error
Add an error to the validation result. Args: result: ValidationResult to update error: Error message to add
backend/pipelines/drive_data_pipeline/silver/validators/base.py:59
↓ 11 callers
Method
clean_value
Clean and standardize string values from XML. This method converts values to strings and removes leading/trailing whitespace.
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/grukos.py:128
↓ 11 callers
Method
find_latest_bronze_data
Find the latest bronze directory and CSV file.
backend/pipelines/arbejdstilsynet_inspections/silver/transform.py:212
↓ 11 callers
Function
getVisibleSearchInput
(page: Page)
frontend/tests/search.spec.ts:17
↓ 11 callers
Function
isCacheValidUntilTuesday
(timestamp: number)
frontend/src/lib/cache-utils.ts:39
↓ 11 callers
Method
normalize_enums
Normalize enums and special characters using DuckDB SQL.
backend/pipelines/arbejdstilsynet_inspections/silver/transform.py:343
↓ 11 callers
Method
query_parquet_native
(self, latest_file: str, query: str, table_name: str)
backend/pipelines/chr_pipeline/tests/gold/test_production_sites.py:28
↓ 11 callers
Method
register_table
Register data (DataFrame, etc.) as a DuckDB table.
backend/pipelines/drive_data_pipeline/silver/duckdb_base.py:69
↓ 10 callers
Function
GET
(request: NextRequest)
frontend/src/app/api/report-pdf/route.ts:19
↓ 10 callers
Method
_disaggregate_by_marker_match
STRATEGY 1: THE MAIN WORKHORSE - Area matching with 2% tolerance (92% success rate!) WHAT THIS STRATEGY DOES: ==============
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pesticide_disaggregation.py:2353
↓ 10 callers
Method
_fetch_chunk
Fetch a chunk of features with rate limiting and retries
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/cadastral.py:305
↓ 10 callers
Method
_get_latest_silver_path
Get the latest silver data directory path for worker safety. The silver path historically used a space in the dataset name, but the c
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/worker_safety.py:409
↓ 10 callers
Method
_process_xml_data
Process raw XML data into a DuckDB table. This method parses XML data containing wetland features and converts it to a DuckD
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/wetlands.py:326
↓ 10 callers
Function
calculate_n2o_goedning
Beregner N2O udledning fra gødning og CO2e. Args: n_total_kg_ha (float): Total N i gødningstypen pr. ha [kg N/ha]. areal_ha
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/marker/goedning_og_nitrifikationshaemmer.py:137
↓ 10 callers
Function
cvr_validator
Provide CVR validation function to tests. Returns: Callable that validates CVR format.
backend/common/tests/conftest.py:295
↓ 10 callers
Method
file_exists
Check if a file exists. Args: path: File path Returns: True if file exists, False otherwise
backend/pipelines/drive_data_pipeline/utils/storage.py:380
↓ 10 callers
Method
format
Format the log record with colors.
backend/pipelines/drive_data_pipeline/utils/logging.py:30
↓ 10 callers
Function
get_pillar
Get the CAP pillar for a scheme (1 = EAGF, 2 = EAFRD). Args: ordning_kode: Standardized scheme code Returns: 1 for Pill
backend/pipelines/unified_pipeline/src/unified_pipeline/util/subsidy_scheme_classifier.py:240
↓ 10 callers
Method
handle_null_values
Convert empty strings to null values using DuckDB SQL.
backend/pipelines/arbejdstilsynet_inspections/silver/transform.py:386
↓ 10 callers
Function
is_retryable_error
Check if an exception should trigger a retry. Args: exception: The exception to check Returns: True if the operation should
backend/common/retry_utils.py:114
↓ 10 callers
Method
load_data
Load CSV data using DuckDB.
backend/pipelines/arbejdstilsynet_inspections/silver/transform.py:249
↓ 10 callers
Function
skipUnsupportedMobileContext
(browserName: string)
frontend/tests/mobile-ugliness-detection.spec.ts:19
↓ 10 callers
Method
write_geojson_from_query
Write GeoJSON file from a DuckDB query result. Args: duckdb_conn: DuckDB connection query: SQL query that returns geo
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pmtiles_generator/utils.py:153
↓ 9 callers
Method
_cleanup_year_tables
Clean up intermediate tables for a specific year to free memory - AGGRESSIVE for GitHub Actions.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/processor.py:563
↓ 9 callers
Method
_create_dissolved_df_before_transform
Create a dissolved (merged) version of the wetlands dataset using DuckDB-spatial. CRITICAL: This method works on the original coordi
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/wetlands.py:481
↓ 9 callers
Function
_find_latest_file_with_pattern
Find the latest file matching a pattern using the existing cloud storage utility. Args: storage_access: StorageAccess instance
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/cvr_enrichment/shared/config.py:422
↓ 9 callers
Method
_format_municipality_name
Format municipality name from ALL CAPITALS to proper Title Case. Args: municipality_name: Municipality name (often in AL
backend/pipelines/unified_pipeline/src/unified_pipeline/util/cvr_api_client.py:41
↓ 9 callers
Method
_get_params
Generate WFS request parameters. This method creates a dictionary of parameters needed for a WFS GetFeature request, includi
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/wetlands.py:101
↓ 9 callers
Method
_get_table_name
Generate unique table name with proper lifecycle management.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/agricultural_pattern_matcher.py:101
↓ 9 callers
Function
_load_data_file
Load a JSON file from the package data directory.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pesticide_drift_exposure.py:93
↓ 9 callers
Method
_protect_table
Mark a table as protected from cleanup.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/processor.py:46
↓ 9 callers
Function
_run_single_correlation
Run point-biserial correlation for a single PFAS substance vs intensity measure. Returns a dict with results or None if insufficient data.
backend/scripts/verify_pfas_groundwater_correlations.py:1615
↓ 9 callers
Method
_save_data_with_metadata
Enhanced save method with pipeline metadata for data tracing. This method combines the existing _save_data functionality with automa
backend/pipelines/unified_pipeline/src/unified_pipeline/common/base.py:246
↓ 9 callers
Method
_table_columns
(self, name: str)
backend/pipelines/api_export/exporters/company_profiles.py:185
↓ 9 callers
Function
_write_parquet
(conn: duckdb.DuckDBPyConnection, path: Path, sql: str)
backend/pipelines/api_export/tests/test_municipalities.py:9
↓ 9 callers
Method
add_warning
Add a warning to the validation result. Args: result: ValidationResult to update warning: Warning message to add
backend/pipelines/drive_data_pipeline/silver/validators/base.py:70
↓ 9 callers
Function
cn
(...inputs: ClassValue[])
frontend-pesticide/src/lib/utils.ts:4
↓ 9 callers
Function
create_herds_table
Creates the herds table (excluding owner/user identifiers) from besaetning details. Args: con: The DuckDB connection bes_details_
backend/pipelines/chr_pipeline/silver/herds.py:10
↓ 9 callers
Function
dn
Get display name for a substance.
backend/scripts/generate_paper_figures.py:51
↓ 9 callers
Method
file_exists
Check if file exists.
backend/common/storage/core.py:1068
↓ 9 callers
Function
finalize_export
Write buffered data to consolidated files with memory-efficient processing.
backend/pipelines/chr_pipeline/bronze/export.py:321
↓ 9 callers
Method
generate_pmtiles
Generate PMTiles from GeoJSON using tippecanoe. Args: geojson_path: Path to input GeoJSON file output_path: Path for
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pmtiles_generator/utils.py:30
↓ 9 callers
Function
process_chr_data
Main function to process CHR data from bronze to silver. This function now supports both streaming (memory-efficient) and legacy (in-memory) mode
backend/pipelines/chr_pipeline/silver/chr_silver_processing.py:1051
↓ 9 callers
Method
run
Execute the stage processing.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/field_area_analysis/base.py:222
↓ 9 callers
Method
run
Run the PMTiles generation pipeline. Args: target_year: Optional specific year to process Returns: Dictionar
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pmtiles_generator/main.py:86
↓ 9 callers
Function
runSearch
( entries: typeof ENTRIES, query: string, searchType: string, limit = 20 )
frontend/src/hooks/__tests__/search-index.test.ts:31
↓ 9 callers
Method
save_metadata
Save metadata to a JSON file. Args: metadata: FileMetadata object target_path: Path to the file the metadata is for
backend/pipelines/drive_data_pipeline/bronze/metadata.py:159
↓ 9 callers
Method
tostring
Serialize element to string.
backend/pipelines/chr_pipeline/tests/bronze/test_load_vetstat.py:93
↓ 9 callers
Function
useTheme
()
frontend/src/components/theme/theme-provider.tsx:71
↓ 9 callers
Function
validate_crs_before_transform
Validate geometry CRS before transformation. Samples geometries from a table and validates they match the expected CRS. Raises ValueErro
backend/common/crs_utils.py:198
↓ 9 callers
Function
validate_cvr
Validate that a CVR string matches the required format. Args: value: CVR string to validate Returns: True if valid 8-di
backend/pipelines/unified_pipeline/src/unified_pipeline/util/cvr_normalizer.py:91
↓ 8 callers
Method
_fetch_chunck
Fetch a chunk of features with retry logic. This method retrieves a batch of features from the WFS service starting at the specified
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/wetlands.py:130
↓ 8 callers
Method
_get_column_if_exists
Return column reference or NULL if column doesn't exist.
backend/pipelines/drive_data_pipeline/silver/transformers/fertiliser_transformer.py:445
↓ 8 callers
Method
_get_results
Get the disaggregated results.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pesticide_disaggregation.py:3236
↓ 8 callers
Function
_index_payload
(start: int, count: int)
backend/pipelines/dyrenesdetektiv_scraper/tests/test_fetch.py:16
↓ 8 callers
Method
_normalize_property
(self, value: Any)
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/skovrejsning.py:31
↓ 8 callers
Method
_wrap_rankings
(self, rankings: list[dict])
backend/pipelines/api_export/exporters/homepage.py:96
↓ 8 callers
Method
cast_types
Cast columns to appropriate types using DuckDB SQL.
backend/pipelines/arbejdstilsynet_inspections/silver/transform.py:424
↓ 8 callers
Function
chr_validator
Provide CHR validation function to tests. Returns: Callable that validates CHR format.
backend/common/tests/conftest.py:305
↓ 8 callers
Function
classify_eu_scheme
Classify an EU scheme name to standardized code. Args: scheme_name: Scheme name from støtteoplysninger "Scheme" column Returns:
backend/pipelines/unified_pipeline/src/unified_pipeline/util/subsidy_scheme_classifier.py:107
↓ 8 callers
Function
createRouteRequest
( url: string, init?: RequestInit )
frontend/tests/routes/helpers/request.ts:3
↓ 8 callers
Method
enforce_retention
Delete old timestamped versions, keeping only the most recent *keep*. Expects the standard medallion layout where each version is stored unde
backend/common/storage/core.py:1148
↓ 8 callers
Function
escapeCSVField
* Escapes CSV field values (handles commas, quotes, newlines)
frontend/src/lib/csv-download.ts:72
↓ 8 callers
Function
escapeHtml
(str: string)
frontend/src/app/api/report-pdf/route.ts:11
↓ 8 callers
Method
export_to_storage_native
ULTIMATE PERFORMANCE: Export table directly to cloud storage using native DuckDB access. This bypasses all temporary files and strea
backend/common/storage/core.py:561
↓ 8 callers
Method
fetch_data_with_playwright
Fetches data using Playwright automation. Returns list of (filter_name, csv_bytes).
backend/pipelines/arbejdstilsynet_inspections/bronze/export.py:244
↓ 8 callers
Method
getPMTilesUrl
* Get a PMTiles URL with caching optimization
frontend/src/lib/pmtiles-cache-service.ts:29
↓ 8 callers
Function
get_async_mock_session
Create a mock aiohttp session.
backend/pipelines/unified_pipeline/src/tests/bronze/test_water_projects_bronze.py:23
↓ 8 callers
Method
get_table_info
Get information about a table.
backend/pipelines/drive_data_pipeline/silver/duckdb_base.py:164
↓ 8 callers
Function
init_secrets
Load missing env vars from Google Cloud Secret Manager. Args: project: GCP project ID. Defaults to GCP_PROJECT env var. Returns
backend/common/secrets.py:43
↓ 8 callers
Function
is_summary_row
Check if a scheme name indicates a summary/total row. These rows must be filtered out to avoid double-counting. Args: scheme_na
backend/pipelines/unified_pipeline/src/unified_pipeline/util/subsidy_scheme_classifier.py:207
↓ 8 callers
Function
is_utm_coordinate_range
Check if a single coordinate pair is in UTM range for Denmark. Args: x: X coordinate (easting) y: Y coordinate (northing)
backend/common/crs_utils.py:159
↓ 8 callers
Function
is_wgs84_coordinate_range
Check if a single coordinate pair is in WGS84 range for Denmark. Args: x: X coordinate (longitude) y: Y coordinate (latitude
backend/common/crs_utils.py:176
↓ 8 callers
Function
load_vetstat_antibiotics
Mock load_vetstat_antibiotics function.
backend/pipelines/chr_pipeline/tests/bronze/test_load_vetstat.py:205
↓ 8 callers
Function
save
(fig, name)
backend/scripts/generate_paper_figures.py:85
↓ 8 callers
Function
section
(title: str)
backend/pipelines/bbr_buildings/bronze/graphql_datafordeler_poc.py:55
↓ 8 callers
Function
set_context
Set context for logging. Args: **kwargs: Key-value pairs to add to the logging context
backend/pipelines/drive_data_pipeline/utils/logging.py:72
↓ 8 callers
Method
setup_duckdb
Setup DuckDB with required extensions - OPTIMIZED for GitHub Actions.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/processor.py:202
↓ 8 callers
Function
shouldShowPlaceholder
( chartKey: string )
frontend/src/components/pagebuilder/pageBlocks/chart-utils.ts:13
↓ 8 callers
Method
upload_from_duckdb_table
Mock upload from DuckDB table.
backend/common/tests/test_storage_core.py:53
↓ 8 callers
Function
useMapTheme
()
frontend/src/hooks/useMapTheme.ts:24
↓ 8 callers
Method
verify_coordinate_order
Verify coordinate order in a geometry table. Returns: - bool: True if coordinates are in LON/LAT order - str
backend/pipelines/unified_pipeline/src/tests/common/test_coordinate_verification.py:21
↓ 7 callers
Method
_aggressive_cleanup
Aggressive cleanup for GitHub Actions constraints - only used at end of processing.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/processor.py:168
↓ 7 callers
Method
_clean_column_name
Replicate silver's column name cleaning logic.
backend/pipelines/bmd_scraper/tests/test_bmd_schema_contracts.py:44
↓ 7 callers
Method
_cleanup_temp_files
Clean up temporary files and directories.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/nles5_nitrogen_estimation/memory_utils.py:325
↓ 7 callers
Method
_combine_intermediate_files
Combine all intermediate files into final GeoParquet.
backend/pipelines/bbr_buildings/bronze/bulk_geodanmark_fetcher.py:449
↓ 7 callers
Method
_get_int_env
Get integer environment variable.
backend/pipelines/bbr_buildings/config/settings.py:114
← previous
next →
101–200 of 6,215, ranked by callers