Skip to main content

A package for interacting with the UK Office for National Statistics' Beta API.

Project description

Installation

You can install this package using pip.

pip install onsapi

Example usage

You can get a list of all datasets available on the ONS API.

from onsapi import OnsApiClient

client = OnsApiClient()
datasets = client.list_datasets()

Information about each dataset can be pretty printed to the command line.

selection = datasets[0]
print(selection)

You can load a dataset as a dataframe.

selection.download_csv()
df = selection.load_as_df()

Project details


Download files

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

Source Distribution

onsapi-0.2.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

onsapi-0.2.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file onsapi-0.2.1.tar.gz.

File metadata

  • Download URL: onsapi-0.2.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for onsapi-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1097789c03149571ca6e088b1ced928671f113265795963cfeca42d84716b628
MD5 573b59c83f6e12ec4826655b8b7e743b
BLAKE2b-256 a182389d57a3e39755fb609b646b384c188cbdec36d56adfd2078361868b021c

See more details on using hashes here.

File details

Details for the file onsapi-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: onsapi-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for onsapi-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f4af640edeb604d25b38accc247ee43104fc85b97225a7cbd1f699e863cdd5e
MD5 ee956bec1d951ae1dbad3f31622b759e
BLAKE2b-256 1ca243beb4e8da41a4ea5c2124d517687d1be695ba711eece638dc991af34899

See more details on using hashes here.

Supported by

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