Skip to main content

A Python API wrapper to Statistics Denmark's DataBank API

Project description

denstatbank

denstatbank

A python wrapper to Statistics Denmark's Databank API. The package allows you to easily gather data on a variety of topics made available by Statistics Denmark.

The package provides a simple interface for professional statisticians, academics, policymakers, students, and anyone interested in quantitative facts about Denmark.

Installation

The package is listed on pypi and can be installed with pip:

pip install --upgrade denstatbank

Usage

Simple Example:

Get population data for the years from 2002 to 2019 and make a simple timeseries plot with the data.

>>> from denstatbank import StatBankClient
>>> sbc = StatBankClient(lang='en')
>>> years = [str(y) for y in list(range(2002, 2020))]
>>> tid = sbc.variable_dict(code='Tid', values=years)
>>> df = sbc.data(table_id='bef5', variables=[tid], as_df=True))
>>> df.plot(style='o-', figsize=(10, 6))

denstatbank utilizes the power of pandas, a fast and flexible library eminently suited for data handling and analysis.

Documentation

The package documentation can be found here.

The official API documentation can be found here

Todo

Examples demonstrating statistical analysis of data

Project details


Download files

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

Files for denstatbank, version 0.6.0
Filename, size File type Python version Upload date Hashes
Filename, size denstatbank-0.6.0-py3-none-any.whl (10.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size denstatbank-0.6.0.tar.gz (8.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page