Skip to main content

A collection of functions to enable ease of use of the various Stats NZ APIs

Project description

# statsnz

A collection of functions to enable ease of use of the various Stats New Zealand APIs, in python.

Installion:

pip install statsnz

Examples:

Geocoding:

To get the region with a set of coordinates:

from statsnz import statsnz

region_example = statsnz(“YOUR_API_KEY”).get_region(-41.242,172.323)

Or TLA:

region_example = statsnz(“YOUR_API_KEY”).get_tla(-41.242,172.323)

Or DHB:

region_example = statsnz(“YOUR_API_KEY”).get_dhb(-41.242,172.323)

Or a custom layer:

region_example = statsnz(“YOUR_API_KEY”).get_custom(-41.242,172.323)

Odata API:

from statsnz import statsnz

statsnz = statsnz(“YOUR_API_KEY”) service = ‘https://api.stats.govt.nz/opendata/v1’ endpoint = ‘EmploymentIndicators’ entity = ‘Resources’ query_option = “10” ##Top 10 records

Observations = statsnz.get_odata_api(service, endpoint, entity, query_option)

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

statsnz-1.0.7.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

statsnz-1.0.7-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file statsnz-1.0.7.tar.gz.

File metadata

  • Download URL: statsnz-1.0.7.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for statsnz-1.0.7.tar.gz
Algorithm Hash digest
SHA256 1895257bd8b55f368e68b59d9671e1e57d6141537cad46515aceca766d98cb32
MD5 159a08bc38abdf15fccf4bb093970511
BLAKE2b-256 caec336789eb127457e2c5ef0311e89f8547720020ac5339147a78d78f1ff31d

See more details on using hashes here.

File details

Details for the file statsnz-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: statsnz-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for statsnz-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5dbc2663e6ef47a23e9c2e92ad53d181f045de3dfca1e09cf80ed8dad9f4df1a
MD5 baed781d9ae7110727f21e1caf7db0b7
BLAKE2b-256 3a97daf15d70b57a68f8d6d6be0a9224507aa9678dc03f2f018e2f64b8e3d979

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