Skip to main content

Logo

DATAHUB PYTHON CLIENT


Poetry Black PyPI Python Version License

Client library for DataHub, a data platform developed at Statistics Norway


Getting started

Prerequisites

Development environment

  • Clone the repository

  • Install the poetry environment

      poetry install
    

Usage

pip install ssb-datahub
from ssb_datahub import Client
dh = Client()

# Collect variables
kjonn = dh.get_variable("FREG", "BEFOLKNING_KJONN", "1.0.0")
fornavn = dh.get_variable("FREG", "BEFOLKNING_FORNAVN", "1.0.0")
fodt_aar = dh.get_variable("FREG", "BEFOLKNING_FODT_AAR", "1.0.0")

# Get the most popular names of men born in 1993
navnestatistikken_menn = (
    kjonn
        .left_join(fornavn, "IDENTIFIER")
        .filter("BEFOLKNING_KJONN", "1")
        .left_join(fodt_aar, "IDENTIFIER")
        .filter("BEFOLKNING_FODT_AAR", 1993)
        .count_values("BEFOLKNING_FORNAVN")
        .sort("BEFOLKNING_FORNAVN")
)
navnestatistikken_menn.sources

Metadata

Release files for ssb-datahub 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ssb-datahub 0.1.3
File Size Uploaded
ssb_datahub-0.1.3.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ssb-datahub 0.1.3
File Interpreter ABI Platform
ssb_datahub-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / ssb_datahub-0.1.3.tar.gz

Download URL ssb_datahub-0.1.3.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fc43665b73b328ab0813fb8df97acf8452575fcd6466601d906f9b5ed4c36219
BLAKE2b-256 checksum
How to use checksums
899a7e7a89ee9a9349e9352a96a4003cd2bf8e64d070accc9b17403a31060901
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.5

Release files / ssb_datahub-0.1.3-py3-none-any.whl

Download URL ssb_datahub-0.1.3-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8978b73417fb9ee75d4b6522ad6709aad487ee298aa945fb1efac75fe6b4189
BLAKE2b-256 checksum
How to use checksums
d77b4d16a12307414732cd6c98837007e6bd825405c1ae1acb31f78124ea673e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page