Skip to main content

Statbank

Installation

The statbank library can be installed using pip:

$ pip install statbank

Usage

Import the statbank package

import statbank

info = printstatbank.tableinfo('aup03')
print(info.description)

API reference

statbank.data(tableid, variables=dict(), stream=False, descending=False, lang='da')

Pulls data from a table and generates rows. Variables is a dictionary mapping variable codes to values. Streaming: Values must be chosen for all variables when streaming

statbank.subjects(subjects=None, recursive=False, include_tables=False, lang='da')

List subjects from the subject hierarchy. If subjects is not given, the root subjects will be used.

statbank.tableinfo(tableid, lang='da')

Fetch metadata for statbank table. Metadata includes information about variables, which can be used when extracting data.

statbank.tables(subjects=None, pastDays=None, include_inactive=False, lang='da'):

Find tables placed under given subjects.

Data objects

Data instances have the following attributes:

  • Data.value
  • Data.time
  • Data.variables

Subject objects

Subject instances have the following attributes:

  • Subject.id
  • Subject.description
  • Subject.subjects
  • Subject.tables

Table objects

Table instances have the following attributes:

  • Table.id
  • Table.text
  • Table.unit
  • Table.firstPeriod
  • Table.latestPeriod
  • Table.active
  • Table.variables
  • Table.updated

Tableinfo objects

Tableinfo instances have the following attributes:

  • Tableinfo.id
  • Tableinfo.updated
  • Tableinfo.unit
  • Tableinfo.variables

Metadata

Release files for statbank 1.0.1

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

Source distribution (sdist)

Source distribution for statbank 1.0.1
File Size Uploaded
statbank-1.0.1.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for statbank 1.0.1
File Interpreter ABI Platform
statbank-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / statbank-1.0.1.tar.gz

Download URL statbank-1.0.1.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
70c26b790ee7889229b848417e637d2ea1e7e95487f504833f0ea72e440d45f9
BLAKE2b-256 checksum
How to use checksums
4f4de7933cc128ac63a11f0f45fc840acdac0369f40d2a4ec21df007724b2100
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release files / statbank-1.0.1-py3-none-any.whl

Download URL statbank-1.0.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0fab9b72140aada54568928aa80467578e56135db07fd0c98c92b08b94825fb
BLAKE2b-256 checksum
How to use checksums
989f73cd3a01a3d129a924f94721ea66e3ee5f05f90f20bb24a2564d16f02743
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

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