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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssb_datahub-0.1.3.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ssb_datahub-0.1.3-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file ssb_datahub-0.1.3.tar.gz.

File metadata

  • Download URL: ssb_datahub-0.1.3.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.5

File hashes

Hashes for ssb_datahub-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fc43665b73b328ab0813fb8df97acf8452575fcd6466601d906f9b5ed4c36219
MD5 f076be922bd069205b1fe01a7b09d742
BLAKE2b-256 899a7e7a89ee9a9349e9352a96a4003cd2bf8e64d070accc9b17403a31060901

See more details on using hashes here.

File details

Details for the file ssb_datahub-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ssb_datahub-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.5

File hashes

Hashes for ssb_datahub-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e8978b73417fb9ee75d4b6522ad6709aad487ee298aa945fb1efac75fe6b4189
MD5 7a4d4a0bf9f3551d9009557e7937bfd9
BLAKE2b-256 d77b4d16a12307414732cd6c98837007e6bd825405c1ae1acb31f78124ea673e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page