NUTS (Nomenclature of territorial units for statistics) boundaries for Ireland#
import os
from datetime import datetime, timezone
from zipfile import BadZipFile, ZipFile
import geopandas as gpd
import matplotlib.pyplot as plt
import pooch
from matplotlib import ticker
import climag.climag as cplt
# base data download directory
SUB_DIR = os.path.join("data", "boundaries", "NUTS2021")
os.makedirs(SUB_DIR, exist_ok=True)
URL = (
"https://gisco-services.ec.europa.eu/distribution/v2/nuts/download/"
"ref-nuts-2021-01m.shp.zip"
)
KNOWN_HASH = None
FILE_NAME = "ref-nuts-2021-01m.shp.zip"
# file name for the GeoPackage where the boundary vector layers will be saved
GPKG_BOUNDARY = os.path.join("data", "boundaries", "boundaries_all.gpkg")
DATA_DIR_TEMP = os.path.join(SUB_DIR, "temp")
os.makedirs(DATA_DIR_TEMP, exist_ok=True)
# download data if necessary
if not os.path.isfile(os.path.join(SUB_DIR, FILE_NAME)):
pooch.retrieve(
url=URL, known_hash=KNOWN_HASH, fname=FILE_NAME, path=SUB_DIR
)
with open(
os.path.join(SUB_DIR, f"{FILE_NAME[:-8]}.txt"), "w", encoding="utf-8"
) as outfile:
outfile.write(
f"Data downloaded on: {datetime.now(tz=timezone.utc)}\n"
f"Download URL: {URL}"
)
Downloading data from 'https://gisco-services.ec.europa.eu/distribution/v2/nuts/download/ref-nuts-2021-01m.shp.zip' to file '/run/media/nms/Backup/Documents/Git/ClimAg/ClimAg/data/NUTS2021/ref-nuts-2021-01m.shp.zip'.
SHA256 hash of downloaded file: 4d51d3778405a528573707d8318bf1cbfd1b0386a2fa69873524c2e6420f740b
Use this value as the 'known_hash' argument of 'pooch.retrieve' to ensure that the file hasn't changed if it is downloaded again in the future.
DATA_FILE = os.path.join(SUB_DIR, FILE_NAME)
ZipFile(DATA_FILE).namelist()
['NUTS_RG_01M_2021_3035.shp.zip',
'NUTS_RG_01M_2021_3035_LEVL_0.shp.zip',
'NUTS_RG_01M_2021_3035_LEVL_1.shp.zip',
'NUTS_RG_01M_2021_3035_LEVL_2.shp.zip',
'NUTS_RG_01M_2021_3035_LEVL_3.shp.zip',
'NUTS_RG_01M_2021_3857.shp.zip',
'NUTS_RG_01M_2021_3857_LEVL_0.shp.zip',
'NUTS_RG_01M_2021_3857_LEVL_1.shp.zip',
'NUTS_RG_01M_2021_3857_LEVL_2.shp.zip',
'NUTS_RG_01M_2021_3857_LEVL_3.shp.zip',
'NUTS_RG_01M_2021_4326.shp.zip',
'NUTS_RG_01M_2021_4326_LEVL_0.shp.zip',
'NUTS_RG_01M_2021_4326_LEVL_1.shp.zip',
'NUTS_RG_01M_2021_4326_LEVL_2.shp.zip',
'NUTS_RG_01M_2021_4326_LEVL_3.shp.zip',
'NUTS_LB_2021_3035.shp.zip',
'NUTS_LB_2021_3035_LEVL_0.shp.zip',
'NUTS_LB_2021_3035_LEVL_1.shp.zip',
'NUTS_LB_2021_3035_LEVL_2.shp.zip',
'NUTS_LB_2021_3035_LEVL_3.shp.zip',
'NUTS_LB_2021_3857.shp.zip',
'NUTS_LB_2021_3857_LEVL_0.shp.zip',
'NUTS_LB_2021_3857_LEVL_1.shp.zip',
'NUTS_LB_2021_3857_LEVL_2.shp.zip',
'NUTS_LB_2021_3857_LEVL_3.shp.zip',
'NUTS_LB_2021_4326.shp.zip',
'NUTS_LB_2021_4326_LEVL_0.shp.zip',
'NUTS_LB_2021_4326_LEVL_1.shp.zip',
'NUTS_LB_2021_4326_LEVL_2.shp.zip',
'NUTS_LB_2021_4326_LEVL_3.shp.zip',
'NUTS_BN_01M_2021_3035.shp.zip',
'NUTS_BN_01M_2021_3035_LEVL_0.shp.zip',
'NUTS_BN_01M_2021_3035_LEVL_1.shp.zip',
'NUTS_BN_01M_2021_3035_LEVL_2.shp.zip',
'NUTS_BN_01M_2021_3035_LEVL_3.shp.zip',
'NUTS_BN_01M_2021_3857.shp.zip',
'NUTS_BN_01M_2021_3857_LEVL_0.shp.zip',
'NUTS_BN_01M_2021_3857_LEVL_1.shp.zip',
'NUTS_BN_01M_2021_3857_LEVL_2.shp.zip',
'NUTS_BN_01M_2021_3857_LEVL_3.shp.zip',
'NUTS_BN_01M_2021_4326.shp.zip',
'NUTS_BN_01M_2021_4326_LEVL_0.shp.zip',
'NUTS_BN_01M_2021_4326_LEVL_1.shp.zip',
'NUTS_BN_01M_2021_4326_LEVL_2.shp.zip',
'NUTS_BN_01M_2021_4326_LEVL_3.shp.zip',
'NUTS_AT_2021.csv',
'NUTS_RG_BN_01M_2021.csv',
'metadata.pdf',
'metadata.xml',
'release-notes.txt']
# extract the archive
try:
z = ZipFile(DATA_FILE)
z.extractall(DATA_DIR_TEMP)
except BadZipFile:
print("There were issues with the file", DATA_FILE)
NUTS0#
DATA_FILE = os.path.join(DATA_DIR_TEMP, "NUTS_RG_01M_2021_4326_LEVL_0.shp.zip")
ZipFile(DATA_FILE).namelist()
['NUTS_RG_01M_2021_4326_LEVL_0.cpg',
'NUTS_RG_01M_2021_4326_LEVL_0.dbf',
'NUTS_RG_01M_2021_4326_LEVL_0.prj',
'NUTS_RG_01M_2021_4326_LEVL_0.shp',
'NUTS_RG_01M_2021_4326_LEVL_0.shx']
nuts0 = gpd.read_file(f"zip://{DATA_FILE}!NUTS_RG_01M_2021_4326_LEVL_0.shp")
nuts0.head()
| NUTS_ID | LEVL_CODE | CNTR_CODE | NAME_LATN | NUTS_NAME | MOUNT_TYPE | URBN_TYPE | COAST_TYPE | FID | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | CZ | 0 | CZ | Česko | Česko | 0 | 0 | 0 | CZ | POLYGON ((14.49122 51.04353, 14.49945 51.04610... |
| 1 | DE | 0 | DE | Deutschland | Deutschland | 0 | 0 | 0 | DE | MULTIPOLYGON (((10.45444 47.55580, 10.43954 47... |
| 2 | DK | 0 | DK | Danmark | Danmark | 0 | 0 | 0 | DK | MULTIPOLYGON (((15.19308 55.32014, 15.19056 55... |
| 3 | AL | 0 | AL | Shqipëria | Shqipëria | 0 | 0 | 0 | AL | MULTIPOLYGON (((19.83100 42.46645, 19.83568 42... |
| 4 | CY | 0 | CY | Kýpros | Κύπρος | 0 | 0 | 0 | CY | MULTIPOLYGON (((34.60609 35.70767, 34.60060 35... |
nuts0.crs
<Geographic 2D CRS: EPSG:4326>
Name: WGS 84
Axis Info [ellipsoidal]:
- Lat[north]: Geodetic latitude (degree)
- Lon[east]: Geodetic longitude (degree)
Area of Use:
- name: World.
- bounds: (-180.0, -90.0, 180.0, 90.0)
Datum: World Geodetic System 1984 ensemble
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich
# filter for Ireland and UK
nuts0 = nuts0[nuts0["CNTR_CODE"].isin(["IE", "UK"])]
nuts0
| NUTS_ID | LEVL_CODE | CNTR_CODE | NAME_LATN | NUTS_NAME | MOUNT_TYPE | URBN_TYPE | COAST_TYPE | FID | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|
| 16 | IE | 0 | IE | Éire/Ireland | Éire/Ireland | 0 | 0 | 0 | IE | MULTIPOLYGON (((-6.00177 53.49551, -5.99821 53... |
| 34 | UK | 0 | UK | United Kingdom | United Kingdom | 0 | 0 | 0 | UK | MULTIPOLYGON (((-4.43205 57.49435, -4.43844 57... |
base = nuts0.plot(
color="navajowhite",
figsize=(7.5, 7.5),
edgecolor="darkslategrey",
linewidth=0.4,
)
plt.tick_params(labelbottom=False, labelleft=False)
plt.title("NUTS0 Regions of Ireland and UK")
plt.text(-8.75, 49.5, "© EuroGeographics for the administrative boundaries")
plt.tight_layout()
plt.show()
NUTS1#
DATA_FILE = os.path.join(DATA_DIR_TEMP, "NUTS_RG_01M_2021_4326_LEVL_1.shp.zip")
nuts1 = gpd.read_file(f"zip://{DATA_FILE}!NUTS_RG_01M_2021_4326_LEVL_1.shp")
nuts1.head()
| NUTS_ID | LEVL_CODE | CNTR_CODE | NAME_LATN | NUTS_NAME | MOUNT_TYPE | URBN_TYPE | COAST_TYPE | FID | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | CY0 | 1 | CY | Kýpros | Κύπρος | 0 | 0 | 0 | CY0 | MULTIPOLYGON (((34.60609 35.70767, 34.60060 35... |
| 1 | DEA | 1 | DE | Nordrhein-Westfalen | Nordrhein-Westfalen | 0 | 0 | 0 | DEA | POLYGON ((8.70301 52.50044, 8.69906 52.48690, ... |
| 2 | CH0 | 1 | CH | Schweiz/Suisse/Svizzera | Schweiz/Suisse/Svizzera | 0 | 0 | 0 | CH0 | POLYGON ((8.61383 47.80108, 8.62155 47.79372, ... |
| 3 | FRE | 1 | FR | Hauts-de-France | Hauts-de-France | 0 | 0 | 0 | FRE | MULTIPOLYGON (((2.60704 50.91269, 2.60665 50.9... |
| 4 | BG3 | 1 | BG | Severna i Yugoiztochna Bulgaria | Северна и Югоизточна България | 0 | 0 | 0 | BG3 | POLYGON ((22.67516 44.21566, 22.69084 44.20456... |
# filter for Ireland and UK
nuts1 = nuts1[nuts1["CNTR_CODE"].isin(["IE", "UK"])]
nuts1
| NUTS_ID | LEVL_CODE | CNTR_CODE | NAME_LATN | NUTS_NAME | MOUNT_TYPE | URBN_TYPE | COAST_TYPE | FID | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|
| 67 | IE0 | 1 | IE | Ireland | Ireland | 0 | 0 | 0 | IE0 | MULTIPOLYGON (((-6.00177 53.49551, -5.99821 53... |
| 82 | UKN | 1 | UK | Northern Ireland | Northern Ireland | 0 | 0 | 0 | UKN | MULTIPOLYGON (((-5.97653 55.05660, -5.96650 55... |
| 83 | UKF | 1 | UK | East Midlands (England) | East Midlands (England) | 0 | 0 | 0 | UKF | POLYGON ((0.01738 53.52537, 0.02249 53.52063, ... |
| 85 | UKG | 1 | UK | West Midlands (England) | West Midlands (England) | 0 | 0 | 0 | UKG | MULTIPOLYGON (((-1.59751 52.70043, -1.59088 52... |
| 91 | UKL | 1 | UK | Wales | Wales | 0 | 0 | 0 | UKL | MULTIPOLYGON (((-3.08419 53.25612, -3.08051 53... |
| 92 | UKM | 1 | UK | Scotland | Scotland | 0 | 0 | 0 | UKM | MULTIPOLYGON (((-0.73118 60.42356, -0.72621 60... |
| 94 | UKK | 1 | UK | South West (England) | South West (England) | 0 | 0 | 0 | UKK | MULTIPOLYGON (((-1.66573 51.98749, -1.66456 51... |
| 95 | UKE | 1 | UK | Yorkshire and the Humber | Yorkshire and the Humber | 0 | 0 | 0 | UKE | MULTIPOLYGON (((0.14090 53.59524, 0.14480 53.5... |
| 97 | UKJ | 1 | UK | South East (England) | South East (England) | 0 | 0 | 0 | UKJ | MULTIPOLYGON (((-0.59177 52.11069, -0.60049 52... |
| 102 | UKH | 1 | UK | East of England | East of England | 0 | 0 | 0 | UKH | MULTIPOLYGON (((1.67548 52.74269, 1.68427 52.7... |
| 103 | UKI | 1 | UK | London | London | 0 | 0 | 0 | UKI | POLYGON ((-0.01188 51.68088, -0.01029 51.67666... |
| 104 | UKC | 1 | UK | North East (England) | North East (England) | 0 | 0 | 0 | UKC | MULTIPOLYGON (((-1.46169 55.07439, -1.45175 55... |
| 106 | UKD | 1 | UK | North West (England) | North West (England) | 0 | 0 | 0 | UKD | MULTIPOLYGON (((-2.31204 54.79108, -2.31380 54... |
# filter for Ireland and Northern Ireland
nuts1 = nuts1[nuts1["NUTS_ID"].isin(["IE0", "UKN"])]
nuts1
| NUTS_ID | LEVL_CODE | CNTR_CODE | NAME_LATN | NUTS_NAME | MOUNT_TYPE | URBN_TYPE | COAST_TYPE | FID | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|
| 67 | IE0 | 1 | IE | Ireland | Ireland | 0 | 0 | 0 | IE0 | MULTIPOLYGON (((-6.00177 53.49551, -5.99821 53... |
| 82 | UKN | 1 | UK | Northern Ireland | Northern Ireland | 0 | 0 | 0 | UKN | MULTIPOLYGON (((-5.97653 55.05660, -5.96650 55... |
base = nuts1.plot(
color="navajowhite",
figsize=(7.5, 7.5),
edgecolor="darkslategrey",
linewidth=0.4,
)
plt.tick_params(labelbottom=False, labelleft=False)
plt.title("NUTS1 Regions of Ireland")
plt.text(-8.75, 51.275, "© EuroGeographics for the administrative boundaries")
plt.tight_layout()
plt.show()
NUTS2#
DATA_FILE = os.path.join(DATA_DIR_TEMP, "NUTS_RG_01M_2021_4326_LEVL_2.shp.zip")
nuts2 = gpd.read_file(f"zip://{DATA_FILE}!NUTS_RG_01M_2021_4326_LEVL_2.shp")
nuts2.head()
| NUTS_ID | LEVL_CODE | CNTR_CODE | NAME_LATN | NUTS_NAME | MOUNT_TYPE | URBN_TYPE | COAST_TYPE | FID | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | FRB0 | 2 | FR | Centre — Val de Loire | Centre — Val de Loire | 0.0 | 0 | 0 | FRB0 | POLYGON ((1.50153 48.94105, 1.51118 48.93461, ... |
| 1 | CZ04 | 2 | CZ | Severozápad | Severozápad | 0.0 | 0 | 0 | CZ04 | POLYGON ((14.49122 51.04353, 14.49945 51.04610... |
| 2 | CZ07 | 2 | CZ | Střední Morava | Střední Morava | 0.0 | 0 | 0 | CZ07 | POLYGON ((16.90792 50.44945, 16.92475 50.43939... |
| 3 | DK02 | 2 | DK | Sjælland | Sjælland | 0.0 | 0 | 0 | DK02 | MULTIPOLYGON (((12.27222 55.05490, 12.28522 55... |
| 4 | ES12 | 2 | ES | Principado de Asturias | Principado de Asturias | 0.0 | 0 | 0 | ES12 | MULTIPOLYGON (((-4.51230 43.39320, -4.51142 43... |
nuts2 = nuts2[nuts2["NUTS_ID"].str.contains("IE|UKN")]
nuts2
| NUTS_ID | LEVL_CODE | CNTR_CODE | NAME_LATN | NUTS_NAME | MOUNT_TYPE | URBN_TYPE | COAST_TYPE | FID | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|
| 185 | IE06 | 2 | IE | Eastern and Midland | Eastern and Midland | 0.0 | 0 | 0 | IE06 | MULTIPOLYGON (((-6.00177 53.49551, -5.99821 53... |
| 252 | IE04 | 2 | IE | Northern and Western | Northern and Western | 0.0 | 0 | 0 | IE04 | MULTIPOLYGON (((-7.25607 55.06703, -7.26560 55... |
| 256 | UKN0 | 2 | UK | Northern Ireland | Northern Ireland | 0.0 | 0 | 0 | UKN0 | MULTIPOLYGON (((-5.97653 55.05660, -5.96650 55... |
| 259 | IE05 | 2 | IE | Southern | Southern | 0.0 | 0 | 0 | IE05 | MULTIPOLYGON (((-9.00931 53.14082, -9.02484 53... |
nuts2.total_bounds.round(2)
array([-10.66, 51.42, -5.43, 55.44])
base = nuts2.plot(
color="navajowhite",
figsize=(7.5, 7.5),
edgecolor="darkslategrey",
linewidth=0.4,
)
plt.tick_params(labelbottom=False, labelleft=False)
plt.title("NUTS2 Regions of Ireland")
plt.text(-8.75, 51.275, "© EuroGeographics for the administrative boundaries")
plt.tight_layout()
plt.show()
NUTS3#
DATA_FILE = os.path.join(DATA_DIR_TEMP, "NUTS_RG_01M_2021_4326_LEVL_3.shp.zip")
nuts3 = gpd.read_file(f"zip://{DATA_FILE}!NUTS_RG_01M_2021_4326_LEVL_3.shp")
nuts3.head()
| NUTS_ID | LEVL_CODE | CNTR_CODE | NAME_LATN | NUTS_NAME | MOUNT_TYPE | URBN_TYPE | COAST_TYPE | FID | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | NO0B2 | 3 | NO | Svalbard | Svalbard | 3 | 3 | 1 | NO0B2 | MULTIPOLYGON (((33.09131 80.24908, 33.09929 80... |
| 1 | NO0B1 | 3 | NO | Jan Mayen | Jan Mayen | 3 | 3 | 1 | NO0B1 | POLYGON ((-7.96242 71.16199, -7.95530 71.15968... |
| 2 | HR064 | 3 | HR | Krapinsko-zagorska županija | Krapinsko-zagorska županija | 4 | 3 | 3 | HR064 | POLYGON ((16.25128 46.07165, 16.24254 46.06220... |
| 3 | DE21A | 3 | DE | Erding | Erding | 4 | 3 | 3 | DE21A | POLYGON ((12.01712 48.43068, 12.02210 48.42585... |
| 4 | DE94E | 3 | DE | Osnabrück, Landkreis | Osnabrück, Landkreis | 4 | 2 | 3 | DE94E | POLYGON ((8.01815 52.68391, 8.03442 52.67338, ... |
nuts3 = nuts3[nuts3["NUTS_ID"].str.contains("IE|UKN")]
nuts3
| NUTS_ID | LEVL_CODE | CNTR_CODE | NAME_LATN | NUTS_NAME | MOUNT_TYPE | URBN_TYPE | COAST_TYPE | FID | geometry | |
|---|---|---|---|---|---|---|---|---|---|---|
| 900 | IE041 | 3 | IE | Border | Border | 4 | 3 | 1 | IE041 | MULTIPOLYGON (((-7.25607 55.06703, -7.26560 55... |
| 906 | IE051 | 3 | IE | Mid-West | Mid-West | 4 | 3 | 1 | IE051 | MULTIPOLYGON (((-9.00931 53.14082, -9.02484 53... |
| 907 | IE063 | 3 | IE | Midland | Midland | 4 | 3 | 3 | IE063 | POLYGON ((-7.34383 53.79906, -7.34168 53.79263... |
| 1034 | IE062 | 3 | IE | Mid-East | Mid-East | 4 | 2 | 1 | IE062 | POLYGON ((-6.26802 54.10234, -6.26085 54.09145... |
| 1055 | IE042 | 3 | IE | West | West | 4 | 3 | 1 | IE042 | MULTIPOLYGON (((-9.13226 54.16236, -9.12055 54... |
| 1070 | IE052 | 3 | IE | South-East | South-East | 4 | 3 | 1 | IE052 | MULTIPOLYGON (((-6.14452 52.73770, -6.14220 52... |
| 1151 | IE053 | 3 | IE | South-West | South-West | 4 | 3 | 1 | IE053 | MULTIPOLYGON (((-9.36519 52.57212, -9.35648 52... |
| 1152 | IE061 | 3 | IE | Dublin | Dublin | 4 | 1 | 1 | IE061 | MULTIPOLYGON (((-6.00177 53.49551, -5.99821 53... |
| 1266 | UKN0B | 3 | UK | Mid Ulster | Mid Ulster | 4 | 3 | 2 | UKN0B | POLYGON ((-6.49990 54.91875, -6.49891 54.91682... |
| 1275 | UKN0C | 3 | UK | Causeway Coast and Glens | Causeway Coast and Glens | 4 | 3 | 1 | UKN0C | MULTIPOLYGON (((-5.97653 55.05660, -5.97802 55... |
| 1276 | UKN0D | 3 | UK | Antrim and Newtownabbey | Antrim and Newtownabbey | 4 | 2 | 1 | UKN0D | POLYGON ((-5.86834 54.68877, -5.87261 54.68564... |
| 1292 | UKN06 | 3 | UK | Belfast | Belfast | 4 | 1 | 1 | UKN06 | POLYGON ((-5.91293 54.64804, -5.89672 54.64403... |
| 1312 | UKN09 | 3 | UK | Ards and North Down | Ards and North Down | 4 | 1 | 1 | UKN09 | MULTIPOLYGON (((-5.64604 54.45903, -5.65029 54... |
| 1316 | UKN0A | 3 | UK | Derry City and Strabane | Derry City and Strabane | 4 | 2 | 1 | UKN0A | POLYGON ((-7.25607 55.06703, -7.25543 55.06272... |
| 1433 | UKN07 | 3 | UK | Armagh City, Banbridge and Craigavon | Armagh City, Banbridge and Craigavon | 4 | 2 | 2 | UKN07 | POLYGON ((-6.01853 54.37048, -6.02731 54.36425... |
| 1491 | UKN08 | 3 | UK | Newry, Mourne and Down | Newry, Mourne and Down | 4 | 3 | 1 | UKN08 | MULTIPOLYGON (((-5.64604 54.45903, -5.64359 54... |
| 1493 | UKN0G | 3 | UK | Fermanagh and Omagh | Fermanagh and Omagh | 4 | 3 | 2 | UKN0G | POLYGON ((-6.94001 54.77359, -6.93652 54.76505... |
| 1494 | UKN0E | 3 | UK | Lisburn and Castlereagh | Lisburn and Castlereagh | 4 | 2 | 2 | UKN0E | POLYGON ((-6.04554 54.60589, -6.04399 54.60068... |
| 1495 | UKN0F | 3 | UK | Mid and East Antrim | Mid and East Antrim | 4 | 2 | 1 | UKN0F | MULTIPOLYGON (((-5.86834 54.68877, -5.88089 54... |
base = nuts3.plot(
color="navajowhite",
figsize=(7.5, 7.5),
edgecolor="darkslategrey",
linewidth=0.4,
)
plt.tick_params(labelbottom=False, labelleft=False)
plt.title("NUTS3 Regions of Ireland")
plt.text(-8.75, 51.275, "© EuroGeographics for the administrative boundaries")
plt.tight_layout()
plt.show()
Island of Ireland boundary#
ie = nuts1.dissolve()
ie
| geometry | NUTS_ID | LEVL_CODE | CNTR_CODE | NAME_LATN | NUTS_NAME | MOUNT_TYPE | URBN_TYPE | COAST_TYPE | FID | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | MULTIPOLYGON (((-10.18425 51.60914, -10.17367 ... | IE0 | 1 | IE | Ireland | Ireland | 0 | 0 | 0 | IE0 |
ie = ie[["geometry"]]
base = ie.plot(
color="navajowhite",
figsize=(7.5, 7.5),
edgecolor="darkslategrey",
linewidth=0.4,
)
plt.tick_params(labelbottom=False, labelleft=False)
plt.title("Boundary of the Island of Ireland")
plt.text(-8.75, 51.275, "© EuroGeographics for the administrative boundaries")
plt.tight_layout()
plt.show()
Island of Ireland boundary in Irish transverse mercator#
Useful for plotting
EPSG:2157
ie = ie.to_crs(cplt.ITM_EPSG)
ie
| geometry | |
|---|---|
| 0 | MULTIPOLYGON (((448722.913 541888.069, 449455.... |
base = ie.plot(
color="navajowhite",
figsize=(7.5, 7.5),
edgecolor="darkslategrey",
linewidth=0.4,
)
plt.tick_params(labelbottom=False, labelleft=False)
plt.title("Boundary of Ireland derived from NUTS data")
plt.text(
550000,
505000,
"© EuroGeographics for the administrative boundaries",
)
plt.tight_layout()
plt.show()
ie.to_file(GPKG_BOUNDARY, layer="NUTS_RG_01M_2021_2157_IE")
Bounding box#
ie_bound = gpd.GeoDataFrame(geometry=ie.envelope.buffer(100000).envelope)
ie_bound
| geometry | |
|---|---|
| 0 | POLYGON ((317563.324 419961.445, 866304.033 41... |
base = ie_bound.boundary.plot(color="crimson", figsize=(7.5, 7.5))
ie.boundary.plot(ax=base, color="darkslategrey", linewidth=0.4)
plt.tick_params(labelbottom=False, labelleft=False)
plt.title("Boundary of Ireland")
plt.text(
540000,
505000,
"© EuroGeographics for the administrative boundaries",
)
plt.tight_layout()
plt.show()
ie_bound.to_file(GPKG_BOUNDARY, layer="NUTS_RG_01M_2021_2157_IE_BBOX")
ie_bound = ie_bound.overlay(ie, how="difference")
ie_bound
| geometry | |
|---|---|
| 0 | MULTIPOLYGON (((317563.324 1065632.020, 866304... |
base = ie_bound.plot(color="navajowhite", figsize=(7.5, 7.5))
ie.boundary.plot(ax=base, color="darkslategrey", linewidth=0.4)
plt.tick_params(labelbottom=False, labelleft=False)
plt.title("Boundary of Ireland")
plt.text(
540000,
505000,
"© EuroGeographics for the administrative boundaries",
)
plt.tight_layout()
plt.show()
ie_bound.to_file(GPKG_BOUNDARY, layer="NUTS_RG_01M_2021_2157_IE_BBOX_DIFF")