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

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.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

statswalespy-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: statswalespy-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 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.0.tar.gz
Algorithm Hash digest
SHA256 33c41d78678ad50b72198b4190b1812d286dbe45c08ab6639ef1069f76085aba
MD5 997061e16844fc645152ed6456fddaa8
BLAKE2b-256 640515741fdd9a0f3e7185530376d62703b6f504e6b365195774de52f60927c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: statswalespy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 337e7133097ba305c5c6ed28a12d8955196ec470301ddaf0b5e34146c36c917d
MD5 7903d6e2762ea44f5cbc8ab750d023b9
BLAKE2b-256 18a9d985df64f87b8b0f16bfe399c567c979601e957af816c97a6fb63224f61c

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