Document dataset metadata. For use in Statistics Norway's metadata system.
Project description
Datadoc
Document datasets in Statistics Norway
Usage
From Jupyter
- Open https://jupyter.dapla-staging.ssb.no or another Jupyter Lab environment
- Datadoc comes preinstalled in Statistics Norway environments. Elsewhere, run Run
pip install ssb-datadoc
to install - Upload a dataset to your Jupyter server (e.g. https://github.com/statisticsnorway/datadoc/blob/master/klargjorte_data/befolkning/person_testdata_p2021-12-31_p2021-12-31_v1.parquet)
- Run the demo.ipynb Notebook
- Datadoc will open in the notebook
Contributing
Local environment
Poetry is used for dependency management. Poe the Poet is used for running poe tasks within poetry's virtualenv. Upon cloning this project first install necessary dependencies, then run the tests to verify everything is working.
1. Prerequisites
- Python >=3.10
- Poetry, install via
curl -sSL https://install.python-poetry.org | python3 -
2. Install dependencies
poetry install
3. Install pre-commit hooks
poetry run pre-commit install
4. Run tests
poetry run poe test
Add dependencies
Main
poetry add <python package name>
Dev
poetry add --group dev <python package name>
Run project locally
To run the project locally:
poetry run poe datadoc
Run project locally in Jupyter
To run the project locally in Jupyter run:
poetry run poe jupyter
A Jupyter instance should open in your browser. Open and run the cells in the .ipynb
file to demo datadoc.
Running the Dockerized Application Locally
docker run -p 8050:8050 \
-v $HOME/.config/gcloud/application_default_credentials.json/:/application_default_credentials.json \
-e GOOGLE_APPLICATION_CREDENTIALS="/application_default_credentials.json" \
datadoc
Release process
Run the relevant version command on a branch e.g.
poetry version patch
poetry version minor
Commit with message like Bump version x.x.x -> y.y.y
.
Open and merge a PR.
Use Github to tag and release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ssb_datadoc-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b041efd94b1b40391f85c8f348c0bf11175673eefcc0adef3d2ae7d7cd768059 |
|
MD5 | 6ec1a31b4047f9de7ccaf48cb14e8d4b |
|
BLAKE2b-256 | b636cc38366d8384a0dafa9c030095eac89137f2e6d0d39d7743f383cb6463fd |