mirror of
https://github.com/opendatazurich/sdk.git
synced 2026-10-19 19:05:25 +00:00
Everyting about OGD and SDK (Städtischer DatenKatalog) | Read-only mirror of https://github.com/opendatazurich/sdk — Stadt Zürich. Issues & pull requests at the source.
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| ckan2sdk | ||
| sdk2ckan | ||
| .flake8 | ||
| .gitignore | ||
| .python-version | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.md | ||
SDK
This project contains the mapper from CKAN to SDK (ckan2sdk)
Prerequisites
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of
poetry
Project Setup
Make sure poetry in installed correctly -> poetry --version
Next, run
poetry install # to install all dependencies
poetry shell # to enter poetry environment
flake8 --append-config .flake8 # appends user defined formatting rules to flake8 default set
sdk2ckan
Not done here, but in OGD-Pipeline on CMP (managed by Banian).
ckan2sdk
The script takes metadata from OGD catalog and formats an Excel file that can be imported into SDK (dataspot). This is used for the Initialimport of OGD metadata in SDK.
Usage Execute main script mapping.py. The script:
- creates Excel Exports by organization (Dienstabteilung/Organisationseinheit)
- filters certain organizations for pioneer group
- excludes unwanted datasets (geo data oder ssz data)
- adds "Datenlieferant" in SDK format
- change field mapping to match the names of the SDK
Parameters an helper scripts
- mapping.py: Contains all mappings that are needed, like column and value mappings for CKAN-SDK, or columns to export
- filter_org.py: Contains filter variables for organization (Dienstabteilung, Departement). Use names from grobstruktur.json
- grobstruktur.json: Maps Dienstabteilung and Departement in correct spelling for SDK
- ckan_api.py: Helper functions for CKAN-API
- cleaner.py: Helper functions for data cleaning and fuzzy-matching
- exports.py: Helper functions for excel exports
Existing scripts
Exporting CKAN to DKUEL
Export CKAN metadata to CSVs for DK-ÜL import
Reads out metadata and does some reformating of certain ckan fields (attributes, date)
Extractting CKAN attributes
Extract STZH CKAN attributes to csv
Mapping CKAN Organisation to ORGANIZATIONAL UNITS
Mapping Metadata of Datenlieferant / Dataowner
Contributors
- @DonGoginho 👨💻
- @alexanderguentert 👨💻
- @debugair 👨💻
- @lbo-dvlp 👨💻 Former Contributor
- @NielsHellinga 👨💻 Former Contributor