Comments (3)
I think this has been implemented in inst/extras/create_municipality_keys.R and "kunta" has been added afterwards. This might be for compatibility reasons with other data sources (@muuankarski ?).
I also think that "Pedersöre" would be more handy. Things brings in mind two topics to decide:
-
Should we stick to the original names in the default data table, and then provide a separate wrapper that can be used if one likes to further harmonize the names or convert them into different formats, depending on the compatibility needs
-
The field "kunta_name" might be better renamed as "municipality_fi" or something?
from geofi.
Most probably Pedersören kunta
is correct name in Finnish. Had a quick look at few kuntadata resources (code below) and they all had Pedersören kunta
in Finnish and Pedersöre
in Swedish. Also wikipedia and their website (at the bottom) uses Pedersören kunta
. It is odd and there must be a reason for this, but I think we better stick to Pedersören kunta
in Finnish names.
As for column names, there are also name_fi
and name_sv
columns. name_fi
equals kunta_name
and therefore kunta_name
could be completely removed
# Lets query some kuntadata to see how pedersöre is written
library(dplyr)
library(rvest)
# 1. Tilastokeskuksen kuntaluokitus
## In Finnish
read_html("https://www.tilastokeskus.fi/meta/luokitukset/kunta/001-2019/index.html") %>%
html_table(fill = TRUE) %>%
.[2] %>%
.[[1]] %>%
as_tibble(.name_repair = "universal") %>%
filter(grepl("Pedersö", X2))
# X1 X2
# <int> <chr>
# 599 Pedersören kunta
## In Swedish
read_html("https://www.tilastokeskus.fi/meta/luokitukset/kunta/001-2019/index_sv.html") %>%
html_table(fill = TRUE) %>%
.[2] %>%
.[[1]] %>%
as_tibble(.name_repair = "universal") %>%
filter(grepl("Pedersö", X2))
# X1 X2
# <int> <chr>
# 599 Pedersöre
## In English
read_html("https://www.tilastokeskus.fi/meta/luokitukset/kunta/001-2019/index_en.html") %>%
html_table(fill = TRUE) %>%
.[2] %>%
.[[1]] %>%
as_tibble(.name_repair = "universal") %>%
filter(grepl("Pedersö", X2))
# X1 X2
# <int> <chr>
# 599 Pedersöre
# 2. Kuntaliitto: Alueluokat ja kuntanumerot 2019
fly <- tempfile()
download.file("https://www.kuntaliitto.fi/sites/default/files/media/file/Alueluokat%20ja%20kuntanumerot%202019.xlsx",
fly)
readxl::read_excel(fly, skip = 12) %>%
filter(grepl("Pedersö", `Kunnan nimi`)) %>%
select(1:3)
# Kuntanumero `Kunnan nimi` `Ruotsinkielilinen nimi`
# <chr> <chr> <chr>
# 599 Pedersören kunta Pedersöre
# 3. MML:n kuntarajat Paituli paikkatietopalvelusta
library(ows4R)
wfs <- WFSClient$new("http://avaa.tdata.fi/geoserver/paituli/wfs",
serviceVersion = "2.0.0",
logger = "INFO")
caps <- wfs$getCapabilities()
ft <- caps$findFeatureTypeByName("paituli:mml_hallinto_2018_10k", exact = TRUE)
shape <- ft$getFeatures()
shape %>%
filter(grepl("Pedersö", NAMEFIN)) %>%
select(NATCODE,NAMEFIN,NAMESWE)
# NATCODE NAMEFIN NAMESWE the_geom
# 599 Pedersören kunta Pedersöre MULTISURFACE (POLYGON ((287...
from geofi.
I think it is good to use the official names by default (and yes let's remove "kunta_name" field).
The data generation script in inst/extras/create_municipality_keys.R seems to make some modifications so let us make sure that the names are kept in their official formats.
If there is a need we can add wrappers that can convert the official names to shorter or other alternative forms for the names.
from geofi.
Related Issues (20)
- Add Finnish Digital Elevation Model (DEM) HOT 1
- Improve wfs_api() error reporting HOT 4
- Add population grid
- Remove outdated branches HOT 2
- CRAN checks HOT 1
- Check that the test coverage is sufficient
- Check that vignette is OK after the package updates
- Data catalog HOT 5
- Add a separate vignette on how to use `ows4r`package with all Finnish WFS-apis
- Use data.stat.fi/api/classifications/ as base for municipality_keys
- Mappings of municipalities to other region types for history data HOT 5
- Add postinumerotiedostot by Posti
- Visualizing certain values with a color on a map HOT 1
- Travis-CI to GitHub Actions HOT 1
- municipality_key data seems to hold duplicates for year 2016 HOT 1
- geofi::get_municipalities returns municipality codes and region codes without leading zeroes HOT 5
- Hyvinvointialueet HOT 2
- Error: Topics missing from index: municipality_key_2022 HOT 5
- `get_municipalities` argument `codes_as_character` seems to not work HOT 7
- WFS connection HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geofi.