Skip to main content

# 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)

Release files for statsnz 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statsnz 1.0.7
File Size Uploaded
statsnz-1.0.7.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for statsnz 1.0.7
File Interpreter ABI Platform
statsnz-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / statsnz-1.0.7.tar.gz

Download URL statsnz-1.0.7.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1895257bd8b55f368e68b59d9671e1e57d6141537cad46515aceca766d98cb32
BLAKE2b-256 checksum
How to use checksums
caec336789eb127457e2c5ef0311e89f8547720020ac5339147a78d78f1ff31d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / statsnz-1.0.7-py3-none-any.whl

Download URL statsnz-1.0.7-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5dbc2663e6ef47a23e9c2e92ad53d181f045de3dfca1e09cf80ed8dad9f4df1a
BLAKE2b-256 checksum
How to use checksums
3a97daf15d70b57a68f8d6d6be0a9224507aa9678dc03f2f018e2f64b8e3d979
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page