{"id":352934,"name":"Landbruget.dk","description":"Organizes data from 18+ Danish government sources into a single, queryable platform to collect, clean, and publish agricultural, environmental, and regulatory data so that journalists, researchers, and citizens can hold the industry accountable.","url":"https://github.com/klimabevaegelsen/landbruget.dk","last_synced_at":"2026-05-15T19:00:42.480Z","repository":{"id":263111423,"uuid":"889354767","full_name":"Klimabevaegelsen/landbruget.dk","owner":"Klimabevaegelsen","description":"Et projekt for at formidle data om dansk landbrug","archived":false,"fork":false,"pushed_at":"2026-05-12T01:25:05.000Z","size":1250280,"stargazers_count":38,"open_issues_count":44,"forks_count":14,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-05-12T03:18:50.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://landbruget.dk","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Klimabevaegelsen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-11-16T06:39:09.000Z","updated_at":"2026-05-12T01:25:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ba023be-7626-4eda-8eb7-092f8ed577af","html_url":"https://github.com/Klimabevaegelsen/landbruget.dk","commit_stats":null,"previous_names":["martincollignon/landbrugsdata","martincollignon/landbruget.dk","klimabevaegelsen/landbruget.dk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Klimabevaegelsen/landbruget.dk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klimabevaegelsen%2Flandbruget.dk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klimabevaegelsen%2Flandbruget.dk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klimabevaegelsen%2Flandbruget.dk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klimabevaegelsen%2Flandbruget.dk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Klimabevaegelsen","download_url":"https://codeload.github.com/Klimabevaegelsen/landbruget.dk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klimabevaegelsen%2Flandbruget.dk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33075216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"Klimabevaegelsen","name":"Klimabevægelsen","uuid":"200558581","kind":"organization","description":"","email":"kontakt@klimabev.dk","website":"klimabev.dk","location":"Denmark","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/200558581?v=4","repositories_count":1,"last_synced_at":"2025-02-25T03:30:50.915Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/Klimabevaegelsen","funding_links":[],"total_stars":17,"followers":0,"following":0,"created_at":"2025-02-25T03:30:50.937Z","updated_at":"2025-02-25T03:30:50.937Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Klimabevaegelsen","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Klimabevaegelsen/repositories"},"packages":[],"commits":{"id":9732362,"full_name":"Klimabevaegelsen/landbruget.dk","default_branch":"master","total_commits":1435,"total_committers":9,"total_bot_commits":150,"total_bot_committers":1,"mean_commits":159.44444444444446,"dds":0.17212543554006965,"past_year_total_commits":1258,"past_year_total_committers":8,"past_year_total_bot_commits":150,"past_year_total_bot_committers":1,"past_year_mean_commits":157.25,"past_year_dds":0.16295707472178056,"last_synced_at":"2026-05-13T18:01:58.158Z","last_synced_commit":"010ca5cc6c3c086e63306558b089e0ad76c07a83","created_at":"2025-04-14T22:14:19.258Z","updated_at":"2026-05-13T18:01:46.762Z","committers":[{"name":"Martin Collignon","email":"2604526+martincollignon","login":"martincollignon","count":1188},{"name":"dependabot[bot]","email":"49699333+dependabot[bot]","login":"dependabot[bot]","count":150},{"name":"Alexander Lindkjær","email":"33224052+AlexanderLindkjaer","login":"AlexanderLindkjaer","count":50},{"name":"Rahul Sahoo","email":"rahulsahoo66@gmail.com","login":"LilMonk","count":16},{"name":"aleksanderbl29","email":"github@aleksanderbl.dk","login":"aleksanderbl29","count":14},{"name":"Việt Hoàng","email":"44334291+EdwardNgo","login":"EdwardNgo","count":11},{"name":"EdNg115","email":"ngosongviethoang.cs@gmail.com","login":"EdNg115","count":4},{"name":"Jameleddine Amri","email":"43846280+azafoura","login":"azafoura","count":1},{"name":"Claude Code","email":"noreply@anthropic.com","login":null,"count":1}],"past_year_committers":[{"name":"Martin Collignon","email":"2604526+martincollignon","login":"martincollignon","count":1053},{"name":"dependabot[bot]","email":"49699333+dependabot[bot]","login":"dependabot[bot]","count":150},{"name":"Alexander Lindkjær","email":"33224052+AlexanderLindkjaer","login":"AlexanderLindkjaer","count":31},{"name":"Việt Hoàng","email":"44334291+EdwardNgo","login":"EdwardNgo","count":11},{"name":"Rahul Sahoo","email":"rahulsahoo66@gmail.com","login":"LilMonk","count":8},{"name":"Aleksander Bang-Larsen","email":"github@aleksanderbl.dk","login":"aleksanderbl29","count":3},{"name":"Jameleddine Amri","email":"43846280+azafoura","login":"azafoura","count":1},{"name":"Claude Code","email":"noreply@anthropic.com","login":null,"count":1}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klimabevaegelsen%2Flandbruget.dk/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-05-15T00:00:35.990Z","repositories_count":6234524,"commits_count":894476112,"contributors_count":34901948,"owners_count":1153435,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"Klimabevaegelsen/landbruget.dk","html_url":"https://github.com/Klimabevaegelsen/landbruget.dk","last_synced_at":"2026-05-12T09:03:36.481Z","status":null,"issues_count":79,"pull_requests_count":158,"avg_time_to_close_issue":2846101.727272727,"avg_time_to_close_pull_request":280334.21774193546,"issues_closed_count":33,"pull_requests_closed_count":124,"pull_request_authors_count":10,"issue_authors_count":4,"avg_comments_per_issue":0.5063291139240507,"avg_comments_per_pull_request":1.0949367088607596,"merged_pull_requests_count":98,"bot_issues_count":0,"bot_pull_requests_count":19,"past_year_issues_count":46,"past_year_pull_requests_count":110,"past_year_avg_time_to_close_issue":1528325.52,"past_year_avg_time_to_close_pull_request":69220.15662650602,"past_year_issues_closed_count":25,"past_year_pull_requests_closed_count":83,"past_year_pull_request_authors_count":9,"past_year_issue_authors_count":3,"past_year_avg_comments_per_issue":0.30434782608695654,"past_year_avg_comments_per_pull_request":1.2181818181818183,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":19,"past_year_merged_pull_requests_count":60,"created_at":"2025-04-14T22:14:19.396Z","updated_at":"2026-05-12T09:03:36.482Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klimabevaegelsen%2Flandbruget.dk","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klimabevaegelsen%2Flandbruget.dk/issues","issue_labels_count":{"data":15,"v1":9,"help wanted":6,"source":5,"enhancement":5,"ready for implementation":2,"good first issue":2,"api":1,"bug":1,"documentation":1,"question":1},"pull_request_labels_count":{"python:uv":19,"dependencies":19},"issue_author_associations_count":{"COLLABORATOR":78,"CONTRIBUTOR":1},"pull_request_author_associations_count":{"COLLABORATOR":129,"CONTRIBUTOR":22,"NONE":7},"issue_authors":{"martincollignon":71,"AlexanderLindkjaer":5,"EdwardNgo":2,"LilMonk":1},"pull_request_authors":{"martincollignon":104,"dependabot[bot]":19,"aleksanderbl29":11,"EdwardNgo":10,"AlexanderLindkjaer":6,"LilMonk":4,"gbrian":1,"azafoura":1,"STAR-173":1,"p-leena-reddy-111":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-05-13T00:00:11.310Z","repositories_count":14586906,"issues_count":34250600,"pull_requests_count":112093581,"authors_count":11260829,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{"data":5,"enhancement":4,"v1":3,"help wanted":2,"bug":1,"api":1,"ready for implementation":1},"past_year_pull_request_labels_count":{"dependencies":19,"python:uv":19},"past_year_issue_author_associations_count":{"COLLABORATOR":46},"past_year_pull_request_author_associations_count":{"COLLABORATOR":86,"CONTRIBUTOR":21,"NONE":2},"past_year_issue_authors":{"martincollignon":40,"AlexanderLindkjaer":4,"EdwardNgo":2},"past_year_pull_request_authors":{"martincollignon":71,"dependabot[bot]":19,"EdwardNgo":7,"AlexanderLindkjaer":5,"aleksanderbl29":3,"LilMonk":2,"p-leena-reddy-111":1,"STAR-173":1},"maintainers":[{"login":"martincollignon","count":175,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/martincollignon"},{"login":"AlexanderLindkjaer","count":11,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/AlexanderLindkjaer"},{"login":"EdwardNgo","count":11,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/EdwardNgo"},{"login":"aleksanderbl29","count":10,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/aleksanderbl29"}],"active_maintainers":[{"login":"martincollignon","count":111,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/martincollignon"},{"login":"AlexanderLindkjaer","count":9,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/AlexanderLindkjaer"},{"login":"EdwardNgo","count":9,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/EdwardNgo"},{"login":"aleksanderbl29","count":3,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/aleksanderbl29"}]},"events":{"total":{"DeleteEvent":205,"MemberEvent":2,"PullRequestEvent":482,"ForkEvent":11,"IssuesEvent":131,"WatchEvent":8,"IssueCommentEvent":428,"PushEvent":1499,"PullRequestReviewCommentEvent":32,"PullRequestReviewEvent":54,"CreateEvent":360},"last_year":{"DeleteEvent":188,"PullRequestEvent":424,"IssuesEvent":86,"WatchEvent":4,"IssueCommentEvent":352,"PushEvent":1320,"PullRequestReviewCommentEvent":13,"PullRequestReviewEvent":26,"CreateEvent":345}},"keywords":[],"dependencies":[],"score":6.6039438246004725,"created_at":"2026-04-26T11:51:26.862Z","updated_at":"2026-05-15T19:00:42.484Z","avatar_url":"https://github.com/Klimabevaegelsen.png","language":"Python","category":"Consumption","sub_category":"Agriculture and Nutrition","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# Landbruget.dk\n\n**Making Danish agricultural data transparent and universally accessible.**\n\nLandbruget.dk organizes data from 18+ Danish government sources into a single, queryable platform. We collect, clean, and publish agricultural, environmental, and regulatory data so that journalists, researchers, and citizens can hold the industry accountable.\n\n## Project Structure\n\n```\nlandbruget.dk/\n├── frontend/               # Next.js 16 — interactive map + data visualization\n├── frontend-pesticide/     # Next.js 16 — PFAS/pesticide exposure maps\n├── data-explorer/          # Next.js 16 — browser-based SQL queries on Parquet files\n├── backend/                # Python data pipelines (medallion architecture)\n│   ├── pipelines/          # 12 data pipelines (CHR, unified, climate, etc.)\n│   └── common/             # Shared utilities (DuckDB, R2, CRS)\n├── supabase/               # PostgreSQL migrations + Edge Functions\n├── schema/                 # Data catalog (183 datasets) + relationship docs\n├── docs/                   # Pipeline index, data lineage, troubleshooting\n├── scripts/                # Utility scripts (worktree setup)\n└── .github/                # CI/CD workflows (30+ GitHub Actions)\n```\n\n## Tech Stack\n\n| Layer | Technology | Purpose |\n|-------|-----------|---------|\n| **Frontend** | Next.js 16, React 19, TypeScript, Tailwind CSS 4 | Web applications |\n| **Maps** | MapLibre GL JS, PMTiles | Geospatial visualization |\n| **Backend** | Python 3.11+, DuckDB, ibis-framework | Data pipelines |\n| **Database** | Supabase (PostgreSQL 15 + PostGIS) | Storage + API |\n| **Data Storage** | Cloudflare R2 | Raw + processed data |\n| **CI/CD** | GitHub Actions | Pipeline orchestration |\n| **Deployment** | Vercel | Frontend hosting |\n| **Linting** | oxlint (frontend), ruff (backend) | Code quality |\n| **Testing** | Playwright (frontend), pytest (backend) | Quality assurance |\n\n## Quick Start\n\n### Prerequisites\n\n- Node.js 18+\n- Python 3.11\n- uv\n- Supabase CLI\n\n### Workspace Setup\n\n```bash\n./scripts/setup-worktree.sh\n```\n\nThis installs frontend dependencies, Playwright browsers, and the shared Python workspace via `uv`, pinned to Python 3.11 via `.python-version`, then verifies `npm test`, `npm run lint`, and `uv run pytest` can resolve their local tooling.\n\n### Frontend\n\n```bash\ncd frontend\ncp .env.example .env.local    # Configure Supabase credentials\nnpm ci\nnpm run dev                   # http://localhost:3000\n```\n\n### Data Explorer\n\n```bash\ncd data-explorer\ncp .env.local.example .env.local  # Add Google API key for Gemini\nnpm install\nnpm run dev                       # http://localhost:3000\n```\n\n### Backend Pipelines\n\n```bash\nuv sync --python 3.11 --all-packages --group dev\n\n# Run a specific pipeline\ncd backend/pipelines/unified_pipeline\nuv run python -m unified_pipeline bronze --source cadastral\n```\n\n## Data Architecture\n\n### Medallion Architecture\n\nAll data flows through three layers:\n\n- **Bronze** — Raw data preserved exactly as received from sources. No transformations.\n- **Silver** — Cleaned, validated, and standardized. Type coercion, deduplication, format normalization.\n- **Gold** — Analysis-ready. Joins across datasets on CVR/CHR/BFE identifiers, derived metrics.\n\n### Coordinate Reference System\n\nAll geospatial processing uses **EPSG:25832** (UTM 32N, meters). Data is transformed to **EPSG:4326** (WGS84) only at the final Supabase upload step.\n\n### Data Identifiers\n\nAll datasets join on one or more of:\n\n| Identifier | Name | Format | Purpose |\n|------------|------|--------|---------|\n| **CVR** | Company Registration | 8 digits | Links to companies |\n| **CHR** | Central Herd Register | 6 digits | Links to livestock herds |\n| **BFE** | Cadastral ID | Variable | Links to land parcels |\n\n## Data Sources\n\nWe collect from 18+ official Danish government sources including:\n\n- **Landbrugsstyrelsen** — Field boundaries, crop data, agricultural subsidies\n- **Fødevarestyrelsen (FVM)** — Livestock registry (CHR), veterinary data, pig movements\n- **Miljøstyrelsen** — Pesticide database (BMD), environmental company registry (DMA)\n- **Geodatastyrelsen** — Cadastral data, administrative boundaries\n- **Danmarks Statistik** — Agricultural statistics\n- **DMI** — Weather and climate data\n- **Arbejdstilsynet** — Workplace safety inspections\n- **Datafordeleren** — Property ownership data\n- **GEUS** — Borehole pesticide data (Dataverse)\n\nSee [`docs/PIPELINE_INDEX.md`](docs/PIPELINE_INDEX.md) for the full pipeline documentation.\n\n## Pipelines\n\n| Pipeline | Purpose | Schedule |\n|----------|---------|----------|\n| [`unified_pipeline`](backend/pipelines/unified_pipeline/) | 18+ government data sources | Weekly (Mon 2 AM UTC) |\n| [`chr_pipeline`](backend/pipelines/chr_pipeline/) | Livestock registry + veterinary data | Weekly |\n| [`svineflytning_pipeline`](backend/pipelines/svineflytning_pipeline/) | Pig movement tracking | Weekly (Wed 2 AM UTC) |\n| [`climate`](backend/pipelines/climate/) | Farm-level CO2e emissions | On demand |\n| [`bmd_scraper`](backend/pipelines/bmd_scraper/) | Pesticide database | Monthly |\n| [`dma_scraper`](backend/pipelines/dma_scraper/) | Environmental company registry | Monthly |\n| [`drive_data_pipeline`](backend/pipelines/drive_data_pipeline/) | Google Drive regulatory docs | On demand |\n| [`bbr_buildings`](backend/pipelines/bbr_buildings/) | Building registry | Monthly |\n| [`arbejdstilsynet_inspections`](backend/pipelines/arbejdstilsynet_inspections/) | Workplace safety inspections | On demand |\n| [`h3_pfas_exposure_pipeline`](backend/pipelines/h3_pfas_exposure_pipeline/) | PFAS exposure mapping | Weekly |\n| [`property_owners_sftp`](backend/pipelines/property_owners_sftp/) | Property ownership data | Manual |\n\n## Development\n\n### Running Tests\n\n```bash\n# Frontend\ncd frontend \u0026\u0026 npm test         # Playwright E2E\ncd frontend \u0026\u0026 npm run lint     # oxlint\n\n# Backend\nuv run --all-packages --group dev pytest   # pytest\nuv run --all-packages --group dev ruff check backend\nuv run --all-packages --group dev ruff format backend\n```\n\n### Branch Naming\n\nFormat: `\u003ctype\u003e/\u003cshort-description\u003e` — e.g. `feat/map-view`, `fix/chr-data-load`\n\nTypes: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `ci`, `perf`, `build`\n\n### Commit Messages\n\n```\n\u003ctype\u003e(\u003cscope\u003e): \u003csubject\u003e\n```\n\nExamples: `feat(frontend): add interactive map view`, `fix(pipeline): correct CHR transformation`\n\n## Contributing\n\n1. Create a branch from `main` following the naming convention above\n2. Make your changes\n3. Run all tests (`npm test` + `uv run --all-packages --group dev pytest`)\n4. Run linters (`npm run lint` + `uv run --all-packages --group dev ruff check backend`)\n5. Open a pull request — all PRs require review before merge\n\n## License\n\n### Code\n\nThe source code in this repository is licensed under the [MIT License](./LICENSE).\n\n### Data\n\nThe MIT license **does not** cover the data. This includes both:\n\n- **Upstream data** ingested from Danish public-sector sources (Landbrugsstyrelsen, CHR Registry, Geodatastyrelsen, Miljøstyrelsen, Danmarks Statistik, DMI, and others — see `docs/PIPELINE_INDEX.md`), and\n- **Derived datasets** we publish to the Cloudflare R2 CDN (JSON, Parquet, PMTiles).\n\nEach dataset retains the licensing terms of its original source — typically Danish government open-data terms or, where applicable, a Creative Commons license. Where the source is not openly licensed, the original copyright and conditions of the issuing public authority apply. Reusing data from this project requires complying with the upstream source's terms.\n\nSee [/om-os](https://landbruget.dk/om-os) for the project's overall data policy and [/kilder](https://landbruget.dk/kilder) for per-source attribution.\n\nThe data is provided \"as is and as available\" — no warranty is given as to completeness, accuracy, or timeliness.\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/352934","html_url":"https://ost.ecosyste.ms/projects/352934"}