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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1895257bd8b55f368e68b59d9671e1e57d6141537cad46515aceca766d98cb32
|
|
| MD5 |
159a08bc38abdf15fccf4bb093970511
|
|
| BLAKE2b-256 |
caec336789eb127457e2c5ef0311e89f8547720020ac5339147a78d78f1ff31d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dbc2663e6ef47a23e9c2e92ad53d181f045de3dfca1e09cf80ed8dad9f4df1a
|
|
| MD5 |
baed781d9ae7110727f21e1caf7db0b7
|
|
| BLAKE2b-256 |
3a97daf15d70b57a68f8d6d6be0a9224507aa9678dc03f2f018e2f64b8e3d979
|