Skip to main content

Python package designed to fetch NUTS administrative divisions

Project description

pysquirrel - NUTS administrative region utility

license Code style: ruff pytest DOI

Copyright 2025 IIASA Scenario Services team

This repository is licensed under the MIT License.

Overview

pysquirrel is a Python package designed to work with NUTS administrative divisions.

The current NUTS version is valid from 1 January 2024. The UK NUTS version is valid from January 2018.

Background

From the Eurostat website

The NUTS classification (Nomenclature of territorial units for statistics) is a geographical nomenclature subdividing the economic territory of the European Union (EU) into regions at three different levels (NUTS 1, 2 and 3 respectively, moving from larger to smaller territorial units). Above NUTS 1, there is the 'national' level of the Member States.

NUTS is used for:

  • collecting, developing and harmonising European regional statistics
  • carrying out socio-economic analyses of the regions
  • framing of EU regional policies

Usage

pysquirrel allows searching the list of all territorial units by specifying the parameters and the values to search as shown below:

>>> import pysquirrel

>>> pysquirrel.nuts.get(country_code="AT")  # gets all regions in Austria by EU country code

>>> pysquirrel.nuts.get(iso3="AUT")  # gets all regions in Austria by ISO3 country code

>>> pysquirrel.nuts.get(level=3)  # gets all NUTS3 regions

>>> pysquirrel.nuts.get(country_code="AT", level=3)  # gets all NUTS3 regions in Austria

Each Region object consists of five attributes:

  • a NUTS code (e.g.: AT127)
  • a country code
  • a label (the full region name)
  • a NUTS level (1, 2 or 3)
  • a parent code (corresponding to the NUTS parent region)

NUTS regions geojsons

The geojson files for the NUTS 1, 2 and 3 regions are available in the scse-geojson repository.

Eurostat copyright notice on NUTS region data file

This package imports the NUTS spreadsheet from the Eurostat website.

Please note that pysquirrel is not developed, maintained or affiliated with Eurostat. The Eurostat copyright notice applies.

The Eurostat editorial content is licensed under the Creative Commons Attribution 4.0 International licence. Reuse of statistical metadata such as the NUTS classification is authorised with due citation of the source.

European Commission, Eurostat, Statistical regions in the European Union and partner countries -- NUTS and statistical regions 2021 -- 2022 edition, Publications Office of the European Union, 2022, https://data.europa.eu/doi/10.2785/321792

Acknowledgement

This package is developed and maintained by the Scenario Services & Scientific Software research theme at the IIASA Energy, Climate, and Enviroment program. Visit https://software.ece.iiasa.ac.at for more information.

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

pysquirrel-1.4.tar.gz (498.2 kB view details)

Uploaded Source

Built Distribution

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

pysquirrel-1.4-py3-none-any.whl (497.2 kB view details)

Uploaded Python 3

File details

Details for the file pysquirrel-1.4.tar.gz.

File metadata

  • Download URL: pysquirrel-1.4.tar.gz
  • Upload date:
  • Size: 498.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pysquirrel-1.4.tar.gz
Algorithm Hash digest
SHA256 341a75453672d5fe513dc50aff62aa1405feb41aa2bb2d80b76a64931b57378c
MD5 5984ad96e69239f0634700d39c1aa20a
BLAKE2b-256 721fbc834258629b8a4d0f2d046789aea36c8aff0cb195ec4a22d9a8ab26e793

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysquirrel-1.4.tar.gz:

Publisher: publish.yml on iiasa/pysquirrel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pysquirrel-1.4-py3-none-any.whl.

File metadata

  • Download URL: pysquirrel-1.4-py3-none-any.whl
  • Upload date:
  • Size: 497.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pysquirrel-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 69147b172e27f25c87f0724bd0e915d528efb5b795c8ea8f41ec35e8495a572c
MD5 91316a19c49ae23c4a69bfd97109fcd8
BLAKE2b-256 e09d54e23613af82326de47031adb2b98bd215c10b5a05d08221ba9925982d96

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysquirrel-1.4-py3-none-any.whl:

Publisher: publish.yml on iiasa/pysquirrel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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