Skip to main content

A package for interacting with the UK Civil Service 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.0.tar.gz (8.4 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.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onsapi-0.2.0.tar.gz
  • Upload date:
  • Size: 8.4 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.0.tar.gz
Algorithm Hash digest
SHA256 b9fe72fbeb5bf1c8b26231cca6db3890a4ed9895a71eabdb995513ebcaa647f6
MD5 d1ee989bfc2b5f3548f52242670dde6c
BLAKE2b-256 39d18ae170864cb0583c84105488482d4aea7c138a61dc6b1a50f772333fba22

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onsapi-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4c6cb43737c6b88968d816b40d45f6ad89e96031b54beb0fafac1ce7bfa97b6
MD5 605d114899a5bf0c8e816ea29b3ef99a
BLAKE2b-256 3cbc63175ccacbf1f4ac5e27123cba42a5a2eebf046ff8452324114467b2dc29

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