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
↓ 3 callers
Function
_clean_column_name
Replicate BMDTransformer.clean_column_names logic.
backend/pipelines/bmd_scraper/tests/test_bmd_silver_transform.py:12
↓ 3 callers
Function
_clear_bucket_env
(monkeypatch)
backend/common/tests/test_storage_path.py:4
↓ 3 callers
Function
_compute_auc
AUC via sklearn.
backend/scripts/verify_groundwater_correlations.py:567
↓ 3 callers
Function
_compute_morans_i
Compute Moran's I spatial autocorrelation using k-nearest neighbours. Parameters ---------- values : 1-D array of the variable of interes
backend/scripts/verify_pfas_groundwater_correlations.py:339
↓ 3 callers
Function
_compute_nagelkerke_r2
Nagelkerke R² (1991) from a fitted statsmodels Logit model.
backend/scripts/verify_groundwater_correlations.py:521
↓ 3 callers
Method
_convert_to_snake_case
Convert a filename in a path to snake_case. Args: path: Path with filename Returns: Path with snake_case fil
backend/pipelines/drive_data_pipeline/silver/storage.py:276
↓ 3 callers
Function
_create_and_save_lookup
Creates a distinct lookup table from columns and saves it locally (temporary use during processing). Args: con: DuckDB connection or a wr
backend/pipelines/chr_pipeline/silver/helpers.py:103
↓ 3 callers
Method
_create_minimal_fertilizer_schema
Create minimal fertilizer schema with defaults.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/nles5_nitrogen_estimation/data_loader.py:2201
↓ 3 callers
Function
_create_valid_parquet
Write a valid parquet file to the fetcher's output directory.
backend/pipelines/bbr_buildings/tests/test_graphql_fetcher.py:36
↓ 3 callers
Method
_download_rds_from_storage
Download .rds file from storage to a temporary local file. Args: rds_path: Relative path to .rds file in storage
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/geus_dataverse_pesticides.py:106
↓ 3 callers
Method
_emergency_resource_cleanup
Emergency resource cleanup when approaching memory limits.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/field_production.py:288
↓ 3 callers
Method
_enrich_subsidies_with_field_uuid
Enrich subsidy tables with field UUIDs from matching FVM marker fields. This method performs spatial matching between subsidy fields
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/fvm_wfs.py:2091
↓ 3 callers
Function
_extract_cvr_numbers_flexible
Extract CVR numbers from a table using flexible column detection. Tries multiple possible column names that might contain CVR numbers.
backend/pipelines/drive_data_pipeline/main.py:52
↓ 3 callers
Method
_extract_gpkg
Extract the GPKG file from the downloaded ZIP. Args: zip_path: Path to the ZIP file output_dir: Directory to
backend/pipelines/bbr_buildings/bronze/inspire_bbr_fetcher.py:953
↓ 3 callers
Method
_fetch_layer_data
Fetch data for a specific DAGI layer from the DAWA API. Args: session: aiohttp client session layer_name: Na
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/dagi.py:95
↓ 3 callers
Method
_fetch_parameter_data
Fetch monthly-aggregated data for one climate parameter by iterating month-by-month. This avoids the 10 000-feature cap on the DMI en
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/dmi.py:200
↓ 3 callers
Method
_fetch_raw_data
Fetch all available BNBO status data from the WFS service. This method sets up an HTTP session with the appropriate SSL context,
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/bnbo_status.py:196
↓ 3 callers
Method
_fetch_table_data
Fetch data and metadata for a specific DST table. Args: table_id (str): DST table identifier Returns:
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/dst.py:191
↓ 3 callers
Method
_find_column
( columns: list[str], col_lower: dict[str, str], candidates: list[str] )
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/kemidata_surface_water.py:434
↓ 3 callers
Method
_find_column
Find a column from a list of candidate names.
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/subsidies/deminimis.py:199
↓ 3 callers
Method
_find_latest_silver_file
Find the latest Silver layer file for a given table type.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/cvr_enrichment/data_consolidation.py:143
↓ 3 callers
Method
_format_default_value
Format a default value for SQL. Args: default_value: The default value data_type: The target data type Retur
backend/pipelines/drive_data_pipeline/silver/models/schema_adapter.py:187
↓ 3 callers
Method
_get_fertilizer_data_path
Get the path to fertilizer data from the fertiliser directory structure. Args: target_year: Optional target year to matc
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/nles5_nitrogen_estimation/data_loader.py:260
↓ 3 callers
Method
_get_file_metadata
Get metadata for a file or folder. Args: file_id: ID of the file or folder Returns: File metadata as a dicti
backend/pipelines/drive_data_pipeline/bronze/drive/fetcher.py:156
↓ 3 callers
Method
_get_storage_path
(self, dst_path: str)
backend/common/tests/test_storage_interface.py:122
↓ 3 callers
Method
_get_table_area_stats
Get area statistics from a table.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/field_area_analysis/area_validation.py:154
↓ 3 callers
Function
_inclusive_prefixes
(element: etree._Element)
backend/pipelines/chr_pipeline/bronze/auth.py:235
↓ 3 callers
Function
_initialize_known_high_volume_herds
Initialize known high-volume herds with optimized settings.
backend/pipelines/chr_pipeline/bronze/volume_management.py:72
↓ 3 callers
Method
_load_csv_from_storage
Load the Kemidata CSV export from storage directly into a DuckDB table. The bronze stage stores CSV exports via StorageAccess. Downl
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/kemidata_surface_water.py:102
↓ 3 callers
Method
_load_fvm_dataset
Load a single FVM silver dataset.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/landbrugstoette/tilsagn_arealer.py:132
↓ 3 callers
Function
_load_high_volume_herds
Load high-volume herds configuration from cloud storage.
backend/pipelines/chr_pipeline/bronze/volume_management.py:31
↓ 3 callers
Function
_load_problematic_herds
Load problematic herds from persistent storage (cloud storage).
backend/pipelines/chr_pipeline/bronze/persistence.py:29
↓ 3 callers
Method
_make_pesticide_input
Materialise a synthetic enhanced-pesticide table for summary-query tests. Each row is a dict with the columns the BMD-enhanced summary query
backend/pipelines/unified_pipeline/tests/gold/test_pmtiles_generator.py:170
↓ 3 callers
Method
_make_request
Make an authenticated request to the DMI API with error handling and retry logic
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/dmi.py:89
↓ 3 callers
Method
_make_storage_access_with_memory_fs
Create StorageAccess with in-memory file storage mock.
backend/common/tests/test_r2_core.py:122
↓ 3 callers
Function
_movement_year_expr
(columns: set[str], *, table_alias: str)
backend/pipelines/api_export/exporters/animal.py:534
↓ 3 callers
Method
_output_path
(self, relative_path: str)
backend/pipelines/api_export/exporters/pesticide_bulk_dataset.py:450
↓ 3 callers
Method
_per_company
Generate per-company pesticide detail files. Returns count of files written.
backend/pipelines/api_export/exporters/pesticides.py:283
↓ 3 callers
Method
_perform_kommune_spatial_join
Perform spatial join between fields and kommuner for PFAS analysis.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/processor.py:1002
↓ 3 callers
Method
_pesticide_details
( self, predicate: str | None = None, )
backend/pipelines/api_export/exporters/municipalities.py:775
↓ 3 callers
Function
_prefer_dma_imports
Put this pipeline first and clear cached sibling pipeline modules.
backend/pipelines/dma_scraper/tests/conftest.py:25
↓ 3 callers
Method
_prepare_pesticide_summary
(self)
backend/pipelines/api_export/exporters/municipalities.py:427
↓ 3 callers
Function
_raise_for_non_ok_response
Raise when GLRCHR returns a service-level error inside a SOAP 200 response.
backend/pipelines/svineflytning_pipeline/bronze/load_svineflytning.py:176
↓ 3 callers
Method
_read_bronze_data_from_storage
Read bronze data from storage using the latest timestamped directory. Args: dataset: The name of the dataset to read
backend/pipelines/unified_pipeline/src/unified_pipeline/common/base.py:853
↓ 3 callers
Method
_read_data_from_storage
Read data from storage for any stage using unified connection.
backend/pipelines/unified_pipeline/src/unified_pipeline/common/base.py:717
↓ 3 callers
Method
_request_with_retries
Run a BMD HTTP request with bounded timeout and retry on transient failures.
backend/pipelines/bmd_scraper/bronze/export.py:51
↓ 3 callers
Function
_run_cli
Run arbejdstilsynet main.py with given args.
backend/pipelines/arbejdstilsynet_inspections/tests/test_cli.py:27
↓ 3 callers
Function
_run_cli
Run BMD scraper main.py with given args.
backend/pipelines/bmd_scraper/tests/test_cli.py:12
↓ 3 callers
Method
_safe_nested_get
Safely access nested dictionary values with null checks. Args: data: Dictionary to access *keys: Sequence of
backend/pipelines/unified_pipeline/src/unified_pipeline/util/cvr_api_client.py:290
↓ 3 callers
Method
_sanitize_dataset_name
Sanitize a folder name to be used as a dataset name. Args: name: Raw folder name Returns: Sanitized dataset
backend/pipelines/drive_data_pipeline/bronze/storage.py:19
↓ 3 callers
Function
_save_attributes_to_parquet
Save attributes data to parquet using DuckDB streaming approach.
backend/pipelines/bbr_buildings/run_inspire_fetch.py:77
↓ 3 callers
Method
_save_dataframe
Save a dataframe locally for testing.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/cvr_geometry_datasets.py:394
↓ 3 callers
Function
_session
(user_agent: str = DEFAULT_USER_AGENT)
backend/pipelines/dyrenesdetektiv_scraper/bronze/fetch.py:31
↓ 3 callers
Method
_should_split_download_error
Return true when a failed Kemidata download may succeed in smaller slices.
backend/pipelines/unified_pipeline/src/unified_pipeline/bronze/kemidata_surface_water.py:303
↓ 3 callers
Method
_should_validate_areas
DISABLE validation for Stage 1 Soil Types - testing override mechanism.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/field_area_analysis/stage1/fields_soil_types.py:323
↓ 3 callers
Function
_species_label
(species_code)
backend/pipelines/api_export/exporters/company_profiles.py:63
↓ 3 callers
Function
_svineflytning_module
()
backend/pipelines/svineflytning_pipeline/tests/test_bronze_service_status.py:11
↓ 3 callers
Method
_table_columns
(self, table_name: str)
backend/pipelines/api_export/exporters/pesticide_bulk_dataset.py:387
↓ 3 callers
Method
_validate_geometries
Validate geometries are within Denmark bounds (EPSG:25832).
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/kemidata_surface_water.py:443
↓ 3 callers
Method
_validate_pnumber_format
Validate P-number format. Args: pnumber: P-number to validate Returns: True if valid, False otherwi
backend/pipelines/unified_pipeline/src/unified_pipeline/util/cvr_api_client.py:1749
↓ 3 callers
Method
_write_table_parquet
(self, table_name: str, relative_path: str)
backend/pipelines/api_export/exporters/pesticide_bulk_dataset.py:420
↓ 3 callers
Method
_write_text
(self, content: str, relative_path: str)
backend/pipelines/api_export/exporters/pesticide_bulk_dataset.py:439
↓ 3 callers
Method
add_nh3_sub_source
Add an NH3 sub-source emission to this category.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/climate_calculator.py:72
↓ 3 callers
Function
add_stars
(bars, sigs, vals)
backend/scripts/reports/generate_pfas_figures.py:176
↓ 3 callers
Method
analyze_geometry
Analyze a geometry and extract key metrics using DuckDB-spatial. This method calculates width, height, area, grid alignment, and ver
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/wetlands.py:83
↓ 3 callers
Method
apply_cli_filters
Apply CLI filtering for matrix job processing. This method modifies the year lists based on CLI parameters to enable process
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/fvm_wfs.py:317
↓ 3 callers
Function
beregn_co2e_indkoebte_kvaeg_total
Beregn den samlede CO2e-udledning fra alle indkøbte kvæg. Implements formulas from Markdown page 19. Args: purchased_animal_grou
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/kvaeg/indkoebte_dyr.py:68
↓ 3 callers
Method
calculateBuffer
* Calculate buffer size based on zoom level
frontend-pesticide/src/lib/data-virtualization.ts:208
↓ 3 callers
Function
calculate_A_over_kg_ts_ha
Beregner tørstof i afgrøderester over jorden (A_over) i kg ts/ha. Formel: A_over = ((T + H_u) * S + I) * k_græs + (X1_val - 1) * H_f * T + X
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/marker/afgroederester.py:60
↓ 3 callers
Function
calculate_A_under_kg_ts_ha
Beregner tørstof i afgrøderester under jorden (A_under) i kg ts/ha. Formel: A_under = (T + H_u + ((T + H_u) * S + I) * k_græs) * F The C#
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/marker/afgroederester.py:101
↓ 3 callers
Function
calculate_co2_kalkning_bedrift
Beregner kg CO2 fra kalkning for hele bedriften pr år. Formel: CO2_bedrift = (A_total_kalket_areal * S_CaCO3_pr_ha_aar / M_CaCO3) * M_C
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/marker/kalkning.py:13
↓ 3 callers
Function
calculate_co2_kalkning_mark
Fordeler bedriftens samlede CO2-bidrag fra kalk ligeligt ud på en specifik mark. Formel: CO2_mark = CO2_bedrift * (A_mark_areal / A_tota
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/marker/kalkning.py:29
↓ 3 callers
Function
calculate_co2e_afgroederester_kg_co2e_ha
Beregner CO2e fra N i afgrøderester pr. ha for hovedafgrøder. F_Omlæg (1/o_omlaegningsfrekvens) applies to N_over for ploughed perennials.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/marker/afgroederester.py:152
↓ 3 callers
Function
calculate_co2e_kulstofbalance_mark
Beregner CO2e fra kulstofbalancen for en mark. Args: r_relativ_faktor (int): Indikerer om afgrøden skal relativeres til DK gennemsni
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/marker/kulstofbalance.py:70
↓ 3 callers
Function
calculate_content_checksum
Calculate a checksum for file content. Args: content: File content as bytes algorithm: Hash algorithm to use (default: sha256)
backend/pipelines/drive_data_pipeline/utils/helpers.py:62
↓ 3 callers
Method
calculate_emissions
Calculate complete emissions for a farm for a given year. Args: cvr: Danish company registration number (8 digits)
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/climate_calculator.py:149
↓ 3 callers
Function
calculate_file_checksum
Calculate a checksum for a file. Args: file_path: Path to the file algorithm: Hash algorithm to use (default: sha256) Return
backend/pipelines/drive_data_pipeline/utils/helpers.py:27
↓ 3 callers
Function
calculate_n_afgroederester_kg_n_ha
Beregner N i afgrøderester pr. ha. Returns N_A_over_kg_n_ha, N_A_under_kg_n_ha, N_total_afgroederester_kg_n_ha
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/marker/afgroederester.py:125
↓ 3 callers
Function
calculate_produktaftryk_afgroede_kg_co2e_pr_ha
Beregner produktaftrykket (P_a) for en given afgrøde (target_afgroede_navn) baseret på en liste af marker (fields_data). P_a = Sum(CO2e_
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/formulas/marker/produktregnskab.py:21
↓ 3 callers
Function
ch4_to_co2e
Convert CH4 mass to CO2 equivalent using IPCC AR5 GWP. Args: ch4_kg (float): Mass of CH4 in kg config: Optional ConfigLoader
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/utils/conversions.py:42
↓ 3 callers
Function
classNames
(base: string, conditional?: string | false)
frontend/src/lib/__tests__/utils.test.ts:15
↓ 3 callers
Function
classNames
(base: string, conditional?: string | false)
frontend/tests/unit/lib/utils.test.ts:15
↓ 3 callers
Function
classifyRisk
( healthRisk?: string, envRisk?: string, signalWord?: string )
frontend/src/app/markanalyse/components/shared/field-details/pesticide-risk.ts:16
↓ 3 callers
Method
cleanup
Clean up all temporary files and directories.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pmtiles_generator/utils.py:394
↓ 3 callers
Method
cleanup
Clean up resources and save cache.
backend/pipelines/unified_pipeline/src/unified_pipeline/util/cached_dawa_api_client.py:202
↓ 3 callers
Function
clear_buffer
Explicitly clears the data buffer if needed before finalization.
backend/pipelines/chr_pipeline/bronze/export.py:604
↓ 3 callers
Method
close
Close the DuckDB connection.
backend/pipelines/drive_data_pipeline/standalone_tests/direct_test_duckdb.py:133
↓ 3 callers
Function
count_coords
(geojson)
backend/scripts/extract_scrolly_geodata.py:81
↓ 3 callers
Method
count_parquet_rows
Count parquet rows using footer metadata instead of scanning full files.
backend/pipelines/api_export/exporters/base.py:182
↓ 3 callers
Function
create_sample_data
Create sample spatial data for demonstration.
backend/pipelines/bbr_buildings/demo_spatial_join_operator.py:25
↓ 3 callers
Function
create_soap_client
Create a legacy Zeep SOAP client with UsernameToken-only authentication.
backend/pipelines/chr_pipeline/bronze/auth.py:398
↓ 3 callers
Function
create_soap_envelope_template
Mock create_soap_envelope_template function.
backend/pipelines/chr_pipeline/tests/bronze/test_load_vetstat.py:274
↓ 3 callers
Function
degrees_to_meters
Convert degrees to approximate meters for Denmark latitude. Args: degrees: Distance in degrees Returns: Approximate dis
backend/common/crs_utils.py:86
↓ 3 callers
Method
detect_all_available_years
Detect available years for all data sources. Returns: Dictionary mapping data source names to lists of available years
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pmtiles_generator/year_detector.py:34
↓ 3 callers
Method
discoverBasemapTiles
()
frontend-pesticide/src/services/pmtiles-discovery.ts:92
↓ 3 callers
Method
discoverLatestBNBOTiles
()
frontend-pesticide/src/services/pmtiles-discovery.ts:103
↓ 3 callers
Function
discover_fvm_layer_years
Discover all known FVM WFS layer years from live WFS capabilities. Args: wfs_url: Base WFS endpoint URL. timeout_s: Request
backend/pipelines/unified_pipeline/src/unified_pipeline/util/fvm_wfs_year_discovery.py:95
↓ 3 callers
Method
drop_table_if_exists
Drop a table if it exists.
backend/common/duckdb_processor.py:174
↓ 3 callers
Method
elapsed
Get the current elapsed time without exiting the context
backend/pipelines/unified_pipeline/src/unified_pipeline/util/timing.py:88
↓ 3 callers
Method
expandBounds
* Expand bounds by buffer amount
frontend-pesticide/src/lib/data-virtualization.ts:216
← previous
next →
501–600 of 6,215, ranked by callers