Skip to main content

A Python package for downloading data and metadata from the StatsWales API.

Project description

statswalespy

Easily download data and metadata from the StatsWales API

PyPI

statswalespy is a Python package for interacting with the StatsWales API, including functions for downloading datasets, downloading metadata, and searching for datasets using key words.

Installation

Use the package manager pip to install statswalespy.

pip install statswalespy

How to download data and metadata

The code below extracts data about aircraft movement at Cardiff airport and the associated metadata.

from statswalespy.download_data import statswales_get_dataset, statswales_get_metadata

metadata = statswales_get_metadata("tran0003")

data = statswales_get_dataset("tran0003")

# Print out the data
print(str(data))

How to search for datasets

You can also search for datasets based on key terms. For example, data on farming or agriculture can be searched using this code:

from statswalespy.search import statswales_search

farming_datasets = statswales_search(["farm*", "agri*"])

# Print out results
print(str(farming_datasets))

Contributing

Any suggestions for changes or extra work to make the package better are welcome.

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

statswalespy-0.1.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

statswalespy-0.1.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file statswalespy-0.1.2.tar.gz.

File metadata

  • Download URL: statswalespy-0.1.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for statswalespy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5c6eb2c6f165077a0a0412ea6ee33db2a1fa66a7d96f056333a69e0a8470fcd5
MD5 24d69e61cde454a1f3967eba8caa5c72
BLAKE2b-256 9d9dbce0cd0bd4c9f109ecf0425c47ee3df9a634cd9aafc52b5cd683bb3c64d6

See more details on using hashes here.

File details

Details for the file statswalespy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: statswalespy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for statswalespy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a6a2f8de8502e8c2eb66a6dfbf3e7cfe4bb3609c26902bfcc0e7e6882c28a2e2
MD5 df98b5e04011e4d94b158a4e7848f3e9
BLAKE2b-256 e735d4290bf360a13977637fe1ca416d9c68e88d20046cddd8ffb1a44bf6737d

See more details on using hashes here.

Supported by

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