MCPcopy Create free account

hub / github.com/Klimabevaegelsen/landbruget.dk / functions

Functions6,215 in github.com/Klimabevaegelsen/landbruget.dk

↓ 4,619 callersMethodexecute
(self, sql, *args, **kwargs)
backend/pipelines/bbr_buildings/tests/test_graphql_fetcher.py:117
↓ 2,610 callersMethodget
Get attribute.
backend/pipelines/chr_pipeline/tests/bronze/test_load_vetstat.py:56
↓ 1,197 callersMethodappend
Append child element.
backend/pipelines/chr_pipeline/tests/bronze/test_load_vetstat.py:48
↓ 326 callersMethodexists
(self, path: str)
backend/pipelines/api_export/tests/test_base_exporter.py:15
↓ 242 callersFunctioncn
(...inputs: ClassValue[])
frontend/src/lib/utils.ts:15
↓ 142 callersMethodjson
(self)
backend/pipelines/bbr_buildings/tests/test_graphql_fetcher.py:171
↓ 97 callersMethodfind
Find element by path.
backend/pipelines/chr_pipeline/tests/bronze/test_load_vetstat.py:36
↓ 95 callersMethodlist_files
List files in the given path. Args: path: Path to list files from pattern: Optional glob pattern to filter files
backend/pipelines/drive_data_pipeline/utils/storage.py:291
↓ 90 callersFunctionget_pipeline_logger
Get or create a standardized logger for a pipeline. This function provides a simple way to get a consistently configured logger for any
backend/common/logging_utils.py:77
↓ 88 callersMethodset
Set attribute.
backend/pipelines/chr_pipeline/tests/bronze/test_load_vetstat.py:52
↓ 76 callersMethodrun
Test implementation of the run method.
backend/pipelines/unified_pipeline/src/tests/common/test_base.py:43
↓ 70 callersMethodread
(self)
backend/pipelines/api_export/tests/test_publish_dataset.py:192
↓ 65 callersMethodfromstring
Parse XML string.
backend/pipelines/chr_pipeline/tests/bronze/test_load_vetstat.py:71
↓ 62 callersMethodglob
(self, pattern: str)
backend/pipelines/api_export/tests/test_base_exporter.py:18
↓ 52 callersMethodquery_parquet_direct
OPTIMAL: Query parquet and create DuckDB table directly - NO DataFrame conversion. This is the recommended method for maximum perfor
backend/common/storage/core.py:347
↓ 50 callersMethodclose
Close database connection.
backend/pipelines/unified_pipeline/src/unified_pipeline/base/duckdb_processor.py:158
↓ 46 callersMethodlatest_r2_match
Resolve the latest object matching an arbitrary R2 glob.
backend/pipelines/api_export/exporters/base.py:97
↓ 46 callersMethodupload_json
OPTIMIZED: Upload JSON data with streaming via s3fs with retry logic. Uses streaming approach for optimal performance: - No
backend/common/storage/core.py:735
↓ 45 callersMethodcreate_table_from_storage
Create a DuckDB table directly from storage parquet file.
backend/common/storage/core.py:1014
↓ 43 callersFunctionfetch
(session, url)
backend/pipelines/dma_scraper/enhanced_dma_detail_scraper.py:28
↓ 42 callersMethodupload_from_duckdb_table
Upload DuckDB table directly to cloud storage without DataFrame conversion. Supports both Parquet and CSV formats based on file extension.
backend/common/storage/core.py:833
↓ 41 callersMethodget_logger
Get or create a configured logger instance with the specified log level. Creates a singleton logger instance if it doesn't exist yet
backend/pipelines/unified_pipeline/src/unified_pipeline/util/log_util.py:105
↓ 40 callersMethod_table_exists
(self, name: str)
backend/pipelines/api_export/exporters/homepage.py:190
↓ 39 callersMethodclose
Close database connection.
backend/pipelines/bbr_buildings/silver/building_processor.py:385
↓ 39 callersMethodclose
Close the DuckDB connection.
backend/pipelines/drive_data_pipeline/silver/duckdb_helper.py:164
↓ 38 callersMethodclose
Close database connection.
backend/common/duckdb_processor.py:179
↓ 36 callersMethod_save_data
Save data using unified cloud storage access layer. ✅ MIGRATION: Now uses StorageAccess for optimal performance with shared connecti
backend/pipelines/unified_pipeline/src/unified_pipeline/common/base.py:638
↓ 36 callersMethod_table_exists
(self, name: str)
backend/pipelines/api_export/exporters/company_profiles.py:178
↓ 35 callersMethod_get_latest_gold_path
Get path to latest gold data file for a given dataset.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/field_area_analysis/base.py:92
↓ 34 callersFunctionformatNumber
( value: number | undefined, decimals: number = 2 )
frontend-pesticide/src/components/overlays/DataSidebar.tsx:26
↓ 34 callersMethodlatest_r2_parquet
Resolve the latest parquet object for a timestamped dataset prefix. Most gold datasets live under: `<prefix>/<timestamp>/<filename>`
backend/pipelines/api_export/exporters/base.py:146
↓ 34 callersFunctionvalidate_and_transform_geometries_duckdb
Validate and transform geometries using DuckDB-spatial for optimal performance. This function validates geometries in a DuckDB table, fixes
backend/common/geometry_validator.py:24
↓ 33 callersMethodquery_to_dicts
Execute SQL and return results as list of dicts.
backend/pipelines/api_export/exporters/base.py:213
↓ 32 callersMethod_temp_download
Context manager for temporary file download with guaranteed cleanup.
backend/common/storage/core.py:280
↓ 32 callersMethodcheck_resources
Check current resource usage with GitHub Actions compatibility.
backend/common/storage/monitoring.py:24
↓ 31 callersFunctionflush_logs
Ensure stdout and stderr are flushed.
backend/pipelines/property_owners_sftp/local_property_processing.py:62
↓ 30 callersFunctionformatNumber
( num: number | undefined | null, decimals: number = 2 )
frontend/src/lib/formatting.ts:14
↓ 30 callersFunctionget_r2_filesystem
Get cached s3fs filesystem instance for Cloudflare R2. Requires R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, and R2_ACCOUNT_ID environment va
backend/common/storage/filesystem.py:20
↓ 29 callersFunctionsave_raw_data
Buffer raw data for later consolidated export.
backend/pipelines/chr_pipeline/bronze/export.py:286
↓ 27 callersMethod_ranking_from_sql
Generate a ranking from SQL that returns cvr_number, company_name, municipality, value.
backend/pipelines/api_export/exporters/homepage.py:1713
↓ 26 callersMethod_coalesce_expr
( self, columns: set[str], candidates: list[str], default: str, *,
backend/pipelines/api_export/exporters/pesticide_bulk_dataset.py:392
↓ 26 callersMethodcreate_metadata
Create complete metadata for a dataset
backend/common/pipeline_metadata.py:116
↓ 26 callersFunctionparse_detail_html
Extract a single record dict from a detail HTML page. `slug_to_name` maps `kontrol_tag` slugs (e.g. ``"ikast-brande"``) to their display name
backend/pipelines/dyrenesdetektiv_scraper/silver/parse.py:224
↓ 25 callersMethoddownload_json
OPTIMIZED: Download JSON data with streaming via s3fs. Uses streaming approach for optimal performance: - No temp file creat
backend/common/storage/core.py:810
↓ 25 callersMethodperform_chunked_spatial_join
Perform chunked spatial join with 5-stage pipeline.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/spatial_joiner.py:25
↓ 25 callersFunctionsetup_pipeline_logger
Set up standardized logging for pipeline operations. This replaces the inconsistent logging setups found across different pipelines with
backend/common/logging_utils.py:15
↓ 24 callersMethodconnect_database
Connect to DuckDB.
backend/pipelines/arbejdstilsynet_inspections/silver/transform.py:239
↓ 24 callersMethodfindall
Find all elements by path.
backend/pipelines/chr_pipeline/tests/bronze/test_load_vetstat.py:44
↓ 24 callersMethodsetup_output_directories
Create output directories if they don't exist.
backend/pipelines/arbejdstilsynet_inspections/silver/transform.py:199
↓ 23 callersMethodSubElement
Create sub-element.
backend/pipelines/chr_pipeline/tests/bronze/test_load_vetstat.py:84
↓ 23 callersFunctionnormalize_cvr
Normalize a CVR number to 8-digit string format. Handles: - XML hex encoding from FVM Excel exports (e.g., "_x0034_" → "4") - Float
backend/pipelines/unified_pipeline/src/unified_pipeline/util/cvr_normalizer.py:29
↓ 22 callersFunctiondetect_crs_from_bounds
Detect CRS from coordinate bounds. Analyzes coordinate ranges to determine the likely CRS and coordinate order. Args: min_x: Mi
backend/common/crs_utils.py:104
↓ 22 callersFunctionvalidate_and_normalize_to_utm
Validate geometries and normalize to EPSG:25832 (Danish UTM) for processing. This function follows the OPTIMAL CRS strategy: - Keep data
backend/common/geometry_validator.py:428
↓ 21 callersFunction_get_intensity_sql
Return SQL subquery for application intensity per GRUKO. intensity_type: 'fluorinated' — sum of fluorinated-only ingredients (for TFA)
backend/scripts/verify_pfas_groundwater_correlations.py:1583
↓ 21 callersMethod_save_data
Save the gold data to cloud storage using DuckDB's COPY command.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/arbejdstilsynet_inspections.py:441
↓ 21 callersFunctioncn
(...inputs: ClassValue[])
data-explorer/src/lib/utils.ts:4
↓ 21 callersFunctionresolvePesticidkortColor
(key: PesticidkortColorKey)
frontend/src/components/pesticidkort/color-theme.ts:45
↓ 20 callersMethod_parse_geometry
Parse a GML geometry element into a WKT string using DuckDB-spatial. This method extracts coordinates from a GML posList element and
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/wetlands.py:210
↓ 20 callersFunction_write_parquet
(conn: duckdb.DuckDBPyConnection, path: Path, sql: str)
backend/pipelines/api_export/tests/test_homepage.py:11
↓ 20 callersFunctionformatNumber
( value: number | undefined, decimals: number = 2 )
frontend-pesticide/src/components/map/MapTooltip.tsx:87
↓ 20 callersMethodgeocode_address_by_id
Geocode an address using its DAWA address ID. Args: adresse_id: UUID address identifier from CVR Returns:
backend/pipelines/unified_pipeline/src/unified_pipeline/util/dawa_api_client.py:74
↓ 20 callersMethodget_company_data
Fetch comprehensive company data for a specific CVR number. Args: cvr_number: 8-digit CVR number fetch_all_f
backend/pipelines/unified_pipeline/src/unified_pipeline/util/cvr_api_client.py:182
↓ 19 callersMethodclose
Close database connection.
backend/scripts/generate_schema_docs.py:500
↓ 19 callersFunctionprocess_gold_data
Main orchestrator for CHR gold layer processing. Args: export_timestamp: Export timestamp for file naming silver_dir: Path t
backend/pipelines/chr_pipeline/gold/chr_gold_processing.py:16
↓ 19 callersMethodwrite_json
Write JSON to local output dir or R2. Args: data: JSON-serializable data path: Relative path under api/v1/, e.g. "hom
backend/pipelines/api_export/exporters/base.py:55
↓ 18 callersMethodcreate_temp_file
Create a temporary file and track it for cleanup. Args: suffix: File suffix/extension prefix: File prefix Re
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pmtiles_generator/utils.py:363
↓ 18 callersMethodrequest
( self, method: str, url: str, *, headers: dict[str, str] | None = Non
backend/pipelines/api_export/publish_dataset.py:222
↓ 18 callersFunctionwaitForTestId
( page: Page, testId: string, options?: { timeout?: number } )
frontend/tests/utils/test-helpers.ts:42
↓ 17 callersMethod_save_stage_output
Save stage output to cloud storage using optimized export. Args: table_name: DuckDB table name to export out
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/field_area_analysis/base.py:72
↓ 17 callersFunction_strip_protocol
Strip protocol prefix from a storage path, returning a bare bucket/key string. Handles ``r2://`` and ``s3://`` prefixes. Bare paths (no prefix)
backend/common/storage/core.py:46
↓ 17 callersMethodload_parquet_table
Load a parquet file into a DuckDB table. Args: parquet_path: Path to parquet file (cloud or local) table_name: Name f
backend/pipelines/api_export/exporters/base.py:198
↓ 17 callersMethodread_parquet
Load parquet file(s) from R2 prefix into a DuckDB table. Returns row count.
backend/scripts/verify_groundwater_correlations.py:678
↓ 17 callersMethodupload_json
Mock upload JSON.
backend/common/tests/test_storage_core.py:41
↓ 16 callersFunctionrautmann_drift_pct
Ground deposition as % of applied dose at given distance (arable crops). Uses the Rautmann power-law: D(d) = A × d^B Clamped to minimum 1m di
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pesticide_drift_exposure.py:69
↓ 15 callersMethod_find_column
Find the first matching column name from candidates.
backend/pipelines/h3_pfas_exposure_pipeline/src/h3_pfas_exposure/gold/pmtiles_generator.py:339
↓ 15 callersMethod_find_timestamped_paths_ranked
Find timestamped directories ranked by recency (newest first). Args: base_path: Base storage path like r2://bucket/silver/dataset
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pmtiles_generator/data_loader.py:1210
↓ 15 callersFunction_get_intensity_sql
Return SQL subquery for application intensity per GRUKO for a given substance. Shared by run_correlations(), run_temporal_lag(), and run_multivar
backend/scripts/verify_groundwater_correlations.py:1375
↓ 15 callersMethod_parse_feature
Parse an XML feature element into a feature dictionary with WKT geometry. This method extracts geometry and attributes from an XML f
backend/pipelines/unified_pipeline/src/unified_pipeline/silver/wetlands.py:278
↓ 15 callersMethod_read_bronze_data
Read data from the bronze layer, preferring in-memory data if available. This method first checks if bronze_data is provided (in-mem
backend/pipelines/unified_pipeline/src/unified_pipeline/common/base.py:765
↓ 15 callersMethod_table_exists
(self, name: str)
backend/pipelines/api_export/exporters/municipalities.py:127
↓ 15 callersMethodgeocode_address_by_id
Geocode an address using its DAWA address ID with caching. Args: adresse_id: UUID address identifier from CVR R
backend/pipelines/unified_pipeline/src/unified_pipeline/util/cached_dawa_api_client.py:54
↓ 15 callersFunctionget_fvm_credentials
Get FVM username, password, VetStat certificate, and private key for robust authentication.
backend/pipelines/chr_pipeline/bronze/auth.py:294
↓ 15 callersFunctionsetup_duckdb_cloud_auth
Setup cloud storage authentication for a DuckDB connection. Tries R2 credentials first (TYPE r2), falls back to legacy cloud HMAC (TYPE GCS).
backend/common/storage/filesystem.py:84
↓ 14 callersMethod_empty_ranking
( self, *, id: str, title: str, category: str, description: st
backend/pipelines/api_export/exporters/homepage.py:1767
↓ 14 callersFunction_transform_with_duckdb
Replicate silver's transform_dma_json using pure DuckDB. Silver uses pyarrow → DuckDB. We skip pyarrow and use DuckDB JSON directly to test t
backend/pipelines/dma_scraper/tests/test_dma_transformation.py:14
↓ 14 callersMethodrename_columns
Rename columns according to conventions using SQL.
backend/pipelines/arbejdstilsynet_inspections/silver/transform.py:268
↓ 14 callersFunctiontranslateDestinationType
(destinationType: string)
frontend/src/lib/translations/animal-transportation.ts:6
↓ 13 callersMethod_drop_table
Safely drop a table if it exists.
backend/pipelines/drive_data_pipeline/silver/transformers/fertiliser_transformer.py:407
↓ 13 callersFunctioncreate_base_request
Create the common GLRCHRWSInfoInbound structure.
backend/pipelines/chr_pipeline/bronze/utils.py:34
↓ 13 callersFunctionget_logger
Get the configured logger. Returns: Logger instance
backend/pipelines/drive_data_pipeline/utils/logging.py:63
↓ 13 callersFunctiononChange
(val: string)
frontend/src/components/pesticidkort/AddressAutocomplete.tsx:58
↓ 13 callersMethodpost
(self, *_args, **kwargs)
backend/pipelines/bbr_buildings/tests/test_graphql_fetcher.py:177
↓ 13 callersMethodread_parquet
Load parquet file(s) from R2 prefix into a DuckDB table. Returns row count.
backend/scripts/verify_pfas_groundwater_correlations.py:662
↓ 13 callersMethodrun
Capture index + taxonomy, then download up to `limit` detail pages. Returns a manifest dict (also written to metadata.json).
backend/pipelines/dyrenesdetektiv_scraper/bronze/fetch.py:91
↓ 13 callersMethodupdate_outputs_for_year
Update output dataset names to include year suffix.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/field_area_analysis/config.py:136
↓ 12 callersMethod_create_pending_pesticide_rows
Create pending pesticide rows table with nopesticides=1 records filtered out.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pesticide_disaggregation.py:1843
↓ 12 callersMethod_create_results_table
Create the disaggregated results table with original schema plus municipality support.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/pesticide_disaggregation.py:1816
↓ 12 callersMethod_get_memory_usage
Get current memory usage in GB.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/nles5_nitrogen_estimation/memory_utils.py:42
↓ 12 callersMethod_load_silver_dataset
Load a silver dataset into DuckDB using the standard BaseSource method. Args: dataset_name: Name of the dataset (e.g., '
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/field_area_analysis/base.py:51
↓ 12 callersMethodadd_sub_source
Add a GHG sub-source emission to this category.
backend/pipelines/unified_pipeline/src/unified_pipeline/gold/carbon_emissions/climate_calculator.py:68
next →1–100 of 6,215, ranked by callers