Read-only mirror of https://github.com/blw-ofag-ufag/metadata — Bundesamt für Landwirtschaft. Issues & pull requests at the source.
  • Python 93.3%
  • CSS 4.5%
  • HTML 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-25 13:56:09 +00:00
.github/workflows refactor yaml to include entire processed directory 2026-08-24 15:01:29 +02:00
automation refactored automation/combine-datasets.py so that datasets, datasetSeries, dataServices and catalogs all have distinct entries in data/processed/. Added comments to code 2026-08-18 15:37:39 +02:00
dashboard add loading screen 2026-01-18 19:01:03 +01:00
data Updated combined JSON files and quality report 2026-08-25 13:56:09 +00:00
src fix: escape URL checker for internal paths 2026-01-18 18:32:35 +01:00
tests add audits and tests 2025-11-24 11:59:00 +01:00
.gitignore update gitignore 2026-01-15 17:48:50 +01:00
LICENSE Create LICENSE with plaintext version of CC BY-ND 4.0 2025-03-19 16:06:41 +01:00
README.md Update README.md 2026-01-14 10:44:40 +01:00
requirements.txt Update protobuf version to >=6.33.5 2026-04-07 09:09:20 +02:00

Combine Datasets Python 3.9+ License: CC BY-ND 4.0 GitHub last commit GitHub issues

Welcome to the FOAG Metadata repository! Here, you'll find the metadata files that describe various datasets of ours, the Python automation script responsible for merging and validating our metadata files, as well as the JSON Schemas that ensure each record follows a consistent format. Under data/processed, we store the combined metadata ready for use in the FOAG Data Catalog. This setup helps maintain high-quality, well-structured metadata that is compatible with both I14Y and opendata.swiss.

The metadata you find here is displayed in a more user-friendly way by our data catalog web application.


🏆 Metadata Quality Dashboard

This repository includes a Quality Assurance Dashboard built with Streamlit and deployed statically via Stlite (Python in the browser). It allows data stewards to audit datasets against the dataset.json schema, check for broken links, and calculate a "FAIRC" quality score.

👉 View the Live Dashboard

Architecture

The dashboard runs entirely in the client's browser (Serverless).

  1. Builder: GitHub Actions runs src/audit.py to validate links and calculate scores.
  2. Snapshot: The results are saved to dashboard/data_snapshot.json.
  3. Viewer: The dashboard/ folder is published to GitHub Pages. index.html loads the Stlite engine, which executes app.py using the JSON snapshot.

1. Prerequisites & Installation locally

Ensure you have Python 3.12+ installed.

  1. Clone the repository:

    git clone https://github.com/blw-ofag-ufag/metadata.git
    cd metadata
    
  2. Install dependencies: It is highly recommended to use a virtual environment.

    # Create virtual env (optional but recommended)
    python -m venv venv
    source venv/bin/activate  # On Windows use: venv\Scripts\activate
    
    # Install packages
    pip install -r requirements.txt
    

2. Generate Data Snapshot (The "Builder")

Before running the dashboard, you must generate the data. This script processes raw JSON, performs async URL health checks, and creates the static JSON snapshot.

# Run the audit pipeline from the project root
# Generates: dashboard/data_snapshot.json
python -m src.audit

3. Run the Dashboard

streamlit run dashboard/app.py