Package: geofi 1.0.15

Markus Kainu

geofi: Access Finnish Geospatial Data

Designed to simplify geospatial data access from the Statistics Finland Web Feature Service API <>, the geofi package offers researchers and analysts a set of tools to obtain and harmonize administrative spatial data for a wide range of applications, from urban planning to environmental research. The package contains annually updated time series of municipality key datasets that can be used for data aggregation and language translations.

Authors:Markus Kainu [aut, cre], Joona Lehtomaki [aut], Juuso Parkkinen [ctb], Jani Miettinen [ctb], Pyry Kantanen [ctb], Sampo Vesanen [ctb], Leo Lahti [aut]

geofi.pdf |geofi.html
geofi/json (API)

# Install geofi in R:
install.packages('geofi', repos = c('', ''))

Peer review:

Bug tracker:




8 exports 17 stars 2.58 score 40 dependencies 413 downloads

Last updated 14 days agofrom:1926b9adbe9a847c19429829501ee406a7134c1a



Datasets in geofi-package

Rendered fromgeofi_datasets.Rmdusingknitr::rmarkdownon Jun 07 2024.

Last update: 2024-03-13
Started: 2020-10-29

Joining attribute data with geofi data

Rendered fromgeofi_joining_attribute_data.Rmdusingknitr::rmarkdownon Jun 07 2024.

Last update: 2024-03-13
Started: 2021-02-09

Making maps using geofi-package

Rendered fromgeofi_making_maps.Rmdusingknitr::rmarkdownon Jun 07 2024.

Last update: 2023-11-01
Started: 2020-10-29

Spatial data manipulation and analysis R and geofi-package

Rendered fromgeofi_spatial_analysis.Rmdusingknitr::rmarkdownon Jun 07 2024.

Last update: 2023-11-01
Started: 2020-10-29

Readme and manuals

Help Manual

Help pageTopics
Check access to
Convert regional codes in on-board municipality key data sets into variable length charactersconvert_municipality_key_codes
Get Finnish municipality (multi)polygons for different years and/or scales.get_municipalities
Get Number of population by Finnish municipality (multi)polygons for different years.get_municipality_pop
Get Finnish Population grid in two different resolutions for years 2010-2022 Thin wrapper around Finnish population grid data provided by Statistics Finland.get_population_grid
Get Statistical grid data polygons at two different resolutionget_statistical_grid
Get Finnish zip code (multi)polygons for different years.get_zipcodes
custom geofacet grid for Ahvenanmaa regiongrid_ahvenanmaa
custom geofacet grid for Etelä-Karjala region as in 2020grid_etela_karjala
custom geofacet grid for Etelä-Pohjanmaagrid_etela_pohjanmaa
custom geofacet grid for Etelä-Savogrid_etela_savo
custom geofacet grid for Wellbeing services countiesgrid_hyvinvointialue
custom geofacet grid for Kainuu regiongrid_kainuu
custom geofacet grid for Kanta-Häme regiongrid_kanta_hame
custom geofacet grid for Keski-Pohjanmaa regiongrid_keski_pohjanmaa
custom geofacet grid for Keski-Suomi region as in 2020grid_keski_suomi
custom geofacet grid for Kymenlaakso regiongrid_kymenlaakso
custom geofacet grid for Lappi region as in 2020grid_lappi
custom geofacet grid for regionsgrid_maakunta
custom geofacet grid for Päijät-Häme regiongrid_paijat_hame
custom geofacet grid for Pirkanmaa regiongrid_pirkanmaa
custom geofacet grid for Pohjanmaa regiongrid_pohjanmaa
custom geofacet grid for Pohjois-Karjala regiongrid_pohjois_karjala
custom geofacet grid for Pohjois-Pohjanmaa regiongrid_pohjois_pohjanmaa
custom geofacet grid for Pohjois-Savo regiongrid_pohjois_savo
custom geofacet grid for health care districtsgrid_sairaanhoitop
custom geofacet grid for Satakunta regiongrid_satakunta
custom geofacet grid for Uusimaa regiongrid_uusimaa
custom geofacet grid for Varsinais-Suomi regiongrid_varsinais_suomi
A simple feature point data containing locations of municipalities central localitiesmunicipality_central_localities
Aggregated municipality key table for years 2013-2023municipality_key
Municipality key table for 2013municipality_key_2013
Municipality key table for 2014municipality_key_2014
Municipality key table for 2015municipality_key_2015
Municipality key table for 2016municipality_key_2016
Municipality key table for 2017municipality_key_2017
Municipality key table for 2018municipality_key_2018
Municipality key table for 2019municipality_key_2019
Municipality key table for 2020municipality_key_2020
Municipality key table for 2021municipality_key_2021
Municipality key table for 2022municipality_key_2022
Municipality key table for 2023municipality_key_2023
Municipality key table for 2024municipality_key_2024
Municipality level population data from Sotkanetsotkadata_population
Municipality level Swedish speaking population numbers from Sotkanetsotkadata_swedish_speaking_pop
Zipcode level population data from Statistics Finlandstatfi_zipcode_population
Transform a wfs_api object into a sf object.to_sf
WFS APIwfs_api