Client for the SSB datahub platform
Project description
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
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
ssb_datahub-0.1.3.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for ssb_datahub-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8978b73417fb9ee75d4b6522ad6709aad487ee298aa945fb1efac75fe6b4189 |
|
MD5 | 7a4d4a0bf9f3551d9009557e7937bfd9 |
|
BLAKE2b-256 | d77b4d16a12307414732cd6c98837007e6bd825405c1ae1acb31f78124ea673e |