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
↓ 5 callers
Function
_outbound_value
(container: Any, key: str)
backend/pipelines/chr_pipeline/bronze/load_besaetning.py:241
↓ 5 callers
Function
_parse_sanktion
Split 'Indskærpelse (2 = Indskærpelse)' into ('Indskærpelse', 2). Handles four observed formats: 1. 'Ingen anmærkninger (2 = Indskærpelse)'
backend/pipelines/dyrenesdetektiv_scraper/silver/parse.py:110
↓ 5 callers
Method
_read_silver_data_from_path
Read silver data from a specific storage path into a DuckDB table. Args: dataset_name: Name of the dataset for logging
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/nles5_nitrogen_estimation/data_loader.py:543
↓ 5 callers
Method
_relation_sql
(self, paths: list[str])
backend/pipelines/api_export/exporters/homepage.py:439
↓ 5 callers
Method
_run_silver_sql
Replicate silver's DuckDB SQL transform without pyarrow. Silver does: pa.Table.from_pylist(data) → DuckDB UNNEST → DataFrame. We repl
backend/pipelines/dma_scraper/tests/test_dma_schema_contracts.py:64
↓ 5 callers
Method
_save_intermediate_results
Save intermediate results to avoid memory issues.
backend/pipelines/bbr_buildings/bronze/bulk_geodanmark_fetcher.py:365
↓ 5 callers
Method
_save_rds_to_storage
Save a raw .rds file to storage. Path structure: bronze/{dataset}/{run_timestamp}/{filename} Args: rds_content:
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/geus_dataverse_pesticides.py:143
↓ 5 callers
Method
_should_upload
Determine if files should be uploaded to R2. Returns: True if upload should proceed, False otherwise
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pmtiles_generator/main.py:287
↓ 5 callers
Method
bulk_download_buildings
Download all GeoDanmark buildings in batches with progress tracking. This method continuously fetches batches until no more data is
backend/pipelines/bbr_buildings/bronze/bulk_geodanmark_fetcher.py:276
↓ 5 callers
Function
calculate_k_graes
Beregner korrektionsfaktor for afgrøderester i græs (k_græs). Args: n_graes_kg_n_ha (float): Mængden af N afsat under afgræsning [kg
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/marker/afgroederester.py:44
↓ 5 callers
Function
calculate_nh3_emissions_svin
Calculate NH3 emissions from pig manure management. Formula: NH3 (kg) = antal_dyr × EF_nh3 Where: - antal_dyr: Number o
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/svin/ammoniak.py:43
↓ 5 callers
Function
classify_deminimis
Classify a de minimis scheme code. Args: ordning: Ordning code from de minimis data Returns: Tuple of (ordning_kode, or
backend/pipelines/unified_pipeline/src/unified_pipeline/util/subsidy_scheme_classifier.py:165
↓ 5 callers
Function
classify_fvm_tilsagn
Classify an FVM commitment type code. Args: tilsagnstype: Tilsagnstype code from FVM data (e.g., "36", "67") Returns: T
backend/pipelines/unified_pipeline/src/unified_pipeline/util/subsidy_scheme_classifier.py:139
↓ 5 callers
Method
collect_field_ids_after_processing
Collect all field IDs and field UUIDs from the output data after processing completes. Returns: Set of field IDs found i
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/nles5_nitrogen_estimation/field_id_validator.py:383
↓ 5 callers
Function
create_company_municipality_lookup
(conn)
backend/pipelines/api_export/exporters/animal.py:8
↓ 5 callers
Method
create_dataframe
Create a from the raw WFS data using DuckDB. Args: raw_data (List[str]): List of raw WFS response strings l
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/fvm_wfs.py:456
↓ 5 callers
Function
create_herd_owners_table
Creates the herd_owners table including attributes from besaetning details. Args: con: The DuckDB connection bes_details_raw: Nam
backend/pipelines/chr_pipeline/silver/herds.py:101
↓ 5 callers
Function
create_production_sites
(conn)
backend/pipelines/api_export/exporters/animal.py:33
↓ 5 callers
Method
create_robust_soap_client
Create a robust SOAP client with fallback.
backend/pipelines/chr_pipeline/tests/bronze/test_chr_auth.py:165
↓ 5 callers
Method
ensure_directory_exists
Ensure directory exists (no-op for cloud storage, creates directory for local). Args: path: Directory path Raises:
backend/pipelines/drive_data_pipeline/utils/storage.py:358
↓ 5 callers
Function
find_cvr_column
Find the CVR column in a list of column names. Args: columns: List of column names Returns: Name of the CVR column, or
backend/pipelines/unified_pipeline/src/unified_pipeline/util/cvr_normalizer.py:211
↓ 5 callers
Method
generate_deterministic_uuid
Generate deterministic UUID for any entity type with custom identifier. Args: entity_type: Type of entity (e.g., 'employ
backend/pipelines/unified_pipeline/src/unified_pipeline/common/uuid_utils.py:145
↓ 5 callers
Method
geocode_with_datavask
Geocode an address using Datavask API with caching. Args: address: Full address string Returns: Dic
backend/pipelines/unified_pipeline/src/unified_pipeline/util/cached_dawa_api_client.py:94
↓ 5 callers
Method
getManifest
()
frontend-pesticide/src/services/pmtiles-discovery.ts:41
↓ 5 callers
Function
getNextTuesdayExpiration
()
frontend/src/lib/cache-utils.ts:32
↓ 5 callers
Function
getNotificationIcon
(type: NotificationType)
frontend/src/components/ui/agricultural-notifications.tsx:161
↓ 5 callers
Method
get_animal_count
Get the number of animals of a specific type. Args: animal_type: Identifier for the animal type (e.g., 'jersey_conventio
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/farm_data.py:22
↓ 5 callers
Function
get_bronze_directory_path
Get the bronze directory path with appropriate suffixes for matrix job separation.
backend/pipelines/chr_pipeline/bronze/export.py:86
↓ 5 callers
Function
get_logger
()
backend/pipelines/drive_data_pipeline/silver/storage.py:19
↓ 5 callers
Method
get_years_to_process
Get the final list of years to process based on configuration and available data. Args: available_years: Dictionary of available
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pmtiles_generator/year_detector.py:282
↓ 5 callers
Function
hexToRgb
(hex: string)
frontend-pesticide/src/lib/color-schemes.ts:94
↓ 5 callers
Method
isPointInBounds
* Check if point is within bounds
frontend-pesticide/src/lib/data-virtualization.ts:228
↓ 5 callers
Method
join_pesticide_with_bmd_pfas
Join pesticide disaggregation with BMD data for PFAS detection.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/data_loader.py:542
↓ 5 callers
Method
latest_r2_nested_parquet
Resolve the newest parquet in datasets shaped like `<prefix>/<timestamp>/<filename>`. This avoids deep recursive globs such as `foo_*/*/data.
backend/pipelines/api_export/exporters/base.py:104
↓ 5 callers
Method
load_and_prepare_fields_from_storage
Load FVM field data from cloud storage and prepare for spatial intersection.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/data_loader.py:253
↓ 5 callers
Function
load_emission_factors
Load emission factors from JSON file. Returns: dict: Emission factors organized by source type (manure_storage, housing_emissions, e
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/constants/loader.py:32
↓ 5 callers
Method
load_pesticide_disaggregation_from_storage
Load pesticide disaggregation data from cloud storage for a specific year.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/data_loader.py:416
↓ 5 callers
Method
log_info
Log info message if logger available.
backend/common/duckdb_processor.py:217
↓ 5 callers
Function
lookup_pig_fe
Convenience function to lookup pig FE value. Args: pig_type: "årssøer", "smågrise", or "slagtesvin" production_system: "conv
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/standardfaktorer.py:293
↓ 5 callers
Function
meters_to_degrees
Convert meters to approximate degrees for Denmark latitude. This is useful for ST_DWithin operations when working with EPSG:4326 data.
backend/common/crs_utils.py:67
↓ 5 callers
Method
process_drive_folder
Process files from a Google Drive folder. Args: folder_id: ID of the Google Drive folder to process (deprecated, use drive_folder
backend/pipelines/drive_data_pipeline/bronze/processor.py:76
↓ 5 callers
Method
read_json
(self, src_path: str)
backend/common/tests/test_storage_interface.py:86
↓ 5 callers
Method
read_metadata
Read metadata from a JSON file. Args: metadata_path: Path to the metadata file Returns: FileMetadata object
backend/pipelines/drive_data_pipeline/bronze/metadata.py:180
↓ 5 callers
Function
resolve_bucket
Resolve storage bucket from override, env vars, or default. Priority: override > STORAGE_BUCKET > R2_BUCKET > GCS_BUCKET > "landbruget-data"
backend/common/cli.py:42
↓ 5 callers
Function
robust_drop
Drop a table or view, handling both types safely.
backend/pipelines/bbr_buildings/main.py:309
↓ 5 callers
Function
run
(args: argparse.Namespace, client: HttpClient | None = None)
backend/pipelines/api_export/publish_dataset.py:769
↓ 5 callers
Method
run
Run the data source processing pipeline. This method must be implemented by all concrete source classes. It should handle th
backend/pipelines/unified_pipeline/src/unified_pipeline/common/base.py:621
↓ 5 callers
Function
sanitize_string_sql
Helper to generate SQL expression for cleaning string columns: - Trims whitespace - Treats empty strings as null Args: col_name:
backend/pipelines/chr_pipeline/silver/helpers.py:89
↓ 5 callers
Method
save_dataframe_to_parquet
Save a pandas DataFrame or a DuckDB table name to Parquet.
backend/pipelines/drive_data_pipeline/silver/parquet_manager.py:150
↓ 5 callers
Method
save_json
(self, data: Any, dst_path: str)
backend/common/tests/test_storage_interface.py:47
↓ 5 callers
Function
setLayerPaint
( map: MapInstance, layerId: string, fillColor: unknown, fillOpacity: unknown )
frontend/src/components/pesticidkort/map-chemical-filter.ts:93
↓ 5 callers
Function
slugify
(text: string)
frontend/src/lib/utils.ts:19
↓ 5 callers
Function
sql_transform_to_processing_crs
Generate SQL to transform geometry to processing CRS (EPSG:25832). Use this in Silver layer to normalize all data to EPSG:25832. Only ne
backend/common/crs_utils.py:436
↓ 5 callers
Function
sql_transform_to_utm
Generate SQL to transform geometry to Danish UTM for metric operations. Uses ``always_xy := true`` so EPSG:4326 is interpreted as (lon, lat)
backend/common/crs_utils.py:327
↓ 5 callers
Function
syncFieldLayerTheme
(map: MapInstance)
frontend/src/components/pesticidkort/map-layers.ts:14
↓ 5 callers
Function
temp_file_context
()
backend/pipelines/unified_pipeline/src/tests/util/test_storage_access.py:347
↓ 5 callers
Function
toRad
(deg: number)
frontend/src/components/pesticidkort/map-utils.ts:67
↓ 5 callers
Function
toRad
(d: number)
frontend/src/lib/drift-exposure-tiles.ts:6
↓ 5 callers
Method
transform
Execute the full transformation process. Returns: Path to the processed Parquet file
backend/pipelines/bmd_scraper/silver/transform.py:759
↓ 5 callers
Function
translateCategoryValue
(value: string | number)
frontend/src/components/pagebuilder/pageBlocks/block-bar-chart.tsx:88
↓ 5 callers
Function
useSidebar
()
frontend/src/components/ui/sidebar.tsx:15
↓ 5 callers
Function
verify_spatial_join_usage
Verify that SPATIAL_JOIN operator is being used in a query. Args: conn: DuckDB connection query: SQL query to analyze R
backend/common/geometry_validator.py:393
↓ 4 callers
Method
_build
Build a bare bucket/key path from parts, stripping extra slashes.
backend/common/storage_interface.py:47
↓ 4 callers
Method
_build_download_body
Build the request body for the Kemidata download (CSV) API.
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/kemidata_surface_water.py:143
↓ 4 callers
Method
_build_pesticide_summary_query
Build the per-field pesticide aggregation SQL. All per-field dosage values — both the BMD-classification detail strings (pfas/diquat/
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pmtiles_generator/data_loader.py:498
↓ 4 callers
Method
_calculate_nles5_estimates
Calculate NLES5 nitrogen washout estimates using the full model. Returns: Table name containing final NLES5 estimates
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/nles5_nitrogen_estimation/nles5_calculator.py:316
↓ 4 callers
Method
_cleanup_temp_files_for_year
Clean up temporary files created during PMTiles generation for a specific year.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/pmtiles_generator.py:770
↓ 4 callers
Method
_cleanup_temporary_files
Clean up temporary files to prevent disk space issues.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/processor.py:488
↓ 4 callers
Method
_convert_rds_to_dataframe
Convert .rds file to pandas DataFrame using pyreadr. Args: rds_path: Path to the local .rds file Returns:
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/geus_dataverse_pesticides.py:135
↓ 4 callers
Method
_create_address_record
Create a standardized address record for geocoding. Args: addr: Original address data source_type: "company"
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/cvr_enrichment/address_geocoding.py:497
↓ 4 callers
Function
_create_corrupt_parquet
Write a tiny corrupt file to the fetcher's output directory.
backend/pipelines/bbr_buildings/tests/test_graphql_fetcher.py:48
↓ 4 callers
Function
_create_test_table
Create a simple DuckDB table with test data.
backend/pipelines/bbr_buildings/tests/test_graphql_fetcher.py:27
↓ 4 callers
Method
_download_batch_with_retry
Try downloading a batch with retries on transient errors.
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/kemidata_surface_water.py:271
↓ 4 callers
Method
_drop_table
Safely drop a table if it exists.
backend/pipelines/drive_data_pipeline/silver/transformers/work_permits_transformer.py:186
↓ 4 callers
Method
_fetch_arcgis_data
Fetch data from an ArcGIS REST API service. This method handles fetching geospatial data from ArcGIS REST API endpoints. It
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/water_projects.py:242
↓ 4 callers
Method
_fetch_building_batch_geometries
Fetch geometries for a batch of building IDs using POST request to avoid URI length limits. Args: building_ids: List of
backend/pipelines/bbr_buildings/bronze/geodanmark_wfs_fetcher.py:311
↓ 4 callers
Method
_filter_candidates
Filter addresses based on basic requirements. Args: addresses: List of address dictionaries Returns:
backend/pipelines/unified_pipeline/src/unified_pipeline/util/enhanced_address_selection.py:90
↓ 4 callers
Method
_find_column
Find a column from a list of candidate names.
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/subsidies/slagtepraemie.py:181
↓ 4 callers
Function
_fmt_p
(val)
backend/scripts/verify_groundwater_correlations.py:3394
↓ 4 callers
Function
_fmt_p
(val)
backend/scripts/verify_pfas_groundwater_correlations.py:3236
↓ 4 callers
Method
_get_wfs_params
Get WFS GetFeature request parameters. Args: layer_name (str): Name of the layer to request get_count_only (
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/fvm_wfs.py:328
↓ 4 callers
Method
_load_dst_json_into_duckdb
Load DST JSONSTAT data into DuckDB. Args: json_data (Dict[str, Any]): Raw JSONSTAT data from DST API table_n
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/dst.py:136
↓ 4 callers
Method
_load_kommune_boundaries
Load Danish kommune boundaries from cloud storage using proper authentication.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/processor.py:839
↓ 4 callers
Method
_load_table_from_storage
Load data from cloud storage into a DuckDB table using optimized cloud storage access - WITH CLEANUP.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/data_loader.py:24
↓ 4 callers
Method
_log_memory_usage
Log current memory usage to help monitor cleanup effectiveness. Args: context: Context description for the memory measur
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/agricultural_fields.py:249
↓ 4 callers
Method
_log_nles5_results_preview
Log a preview of the generated NLES5 estimates in a structured format.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/nles5_nitrogen_estimation/main.py:878
↓ 4 callers
Method
_make_client
Helper to create a client with geocoding disabled.
backend/pipelines/unified_pipeline/src/tests/util/test_cvr_api_client.py:52
↓ 4 callers
Method
_make_client
Helper to create a client with geocoding disabled.
backend/pipelines/unified_pipeline/src/tests/util/test_cvr_api_client.py:145
↓ 4 callers
Method
_monitor_memory_usage
Delegate to memory utils.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/nles5_nitrogen_estimation/main.py:1021
↓ 4 callers
Method
_parse_coordinates
Parse coordinate string into list of (x, y) tuples. Args: coord_string (str): Space-separated coordinate values "x1 y1 x
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/water_typology.py:278
↓ 4 callers
Function
_patch_parquet_kv_metadata
Merge ``updates`` into the parquet file's schema KV metadata, preserving other keys. Reads the parquet file, merges ``updates`` on top of any exi
backend/common/storage/core.py:59
↓ 4 callers
Method
_process_geojson_data
Process bronze GeoJSON payloads into a DuckDB spatial feature table.
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/skovrejsning.py:60
↓ 4 callers
Method
_process_json_data
(self, json_data: str, layer: str)
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/water_projects.py:423
↓ 4 callers
Method
_resolve_to_utm_expr
Resolve geometry expression to EPSG:25832 using bounds-based CRS detection.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pesticide_proximity.py:103
↓ 4 callers
Function
_run_cli
Run DMA scraper main.py with given args.
backend/pipelines/dma_scraper/tests/test_cli.py:12
↓ 4 callers
Function
_save_discovered_cvr_numbers
Extract and save CVR numbers discovered in the CHR pipeline silver data. Args: con: DuckDB connection silver_dir: Silver dat
backend/pipelines/chr_pipeline/silver/chr_silver_processing.py:190
↓ 4 callers
Method
_sha256_file
(self, path: Path)
backend/pipelines/api_export/exporters/pesticide_bulk_dataset.py:467
↓ 4 callers
Method
_should_geocode_address_with_fallback
Determine if an address should be geocoded, considering fallback to historical addresses ONLY for companies with zero current address
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/cvr_enrichment/address_geocoding.py:461
↓ 4 callers
Function
_slippy_tile
(lat: float, lng: float, zoom: int = DRIFT_TILE_ZOOM)
backend/pipelines/api_export/tests/test_drift_exposure.py:26
↓ 4 callers
Function
_stamdata_value
(combo: Any, key: str, default: Any)
backend/pipelines/chr_pipeline/main.py:389
← previous
next →
301–400 of 6,215, ranked by callers