-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attibute datasets previously downloaded from internet, now included w…
…ith package
- Loading branch information
Markus Kainu
committed
Mar 13, 2024
1 parent
58593a9
commit 18c8c7f
Showing
14 changed files
with
172 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Create datasets to be used in Vignettes | ||
|
||
library(sotkanet) | ||
library(dplyr) | ||
sotkadata_population <- GetDataSotkanet(indicators = 127, years = 2000:2022) %>% | ||
filter(region.category == "KUNTA") %>% | ||
mutate(municipality_code = as.integer(region.code)) %>% | ||
select(municipality_code,primary.value,year) | ||
|
||
save(sotkadata_population, file = "./data/sotkadata_population.rda", | ||
compress = "bzip2") | ||
|
||
karttasovellus::document_data(dat = sotkadata_population, | ||
neim = "sotkadata_population", | ||
description = "This dataset contains population data at municipality level pulled from THL (Sotkanet) from 2000 to 2022") | ||
|
||
|
||
# ****************** | ||
sotkadata_swedish_speaking_pop <- GetDataSotkanet(indicators = 2433, years = 2000:2022) %>% | ||
filter(region.category == "KUNTA") %>% | ||
mutate(municipality_code = as.integer(region.code)) %>% | ||
select(municipality_code,indicator.title.fi,primary.value) | ||
|
||
save(sotkadata_swedish_speaking_pop, file = "./data/sotkadata_swedish_speaking_pop.rda", | ||
compress = "bzip2") | ||
|
||
karttasovellus::document_data(dat = sotkadata_swedish_speaking_pop, | ||
neim = "sotkadata_swedish_speaking_pop", | ||
description = "This dataset contains Swedish speaking population figures at municipality level pulled from THL (Sotkanet) from 2000 to 2022") | ||
|
||
|
||
# ****************** | ||
library(pxweb) | ||
px_data <- read.csv("https://pxdata.stat.fi:443/PxWeb/sq/43d3d0aa-636e-4a4b-bbe1-decae45fc2b4", | ||
header = TRUE, sep = ";", fileEncoding = "Latin1") | ||
px_data$posti_alue <- sub(" .+$", "", px_data$Postinumeroalue) | ||
statfi_zipcode_population <- px_data %>% select(posti_alue,X2022) | ||
|
||
save(statfi_zipcode_population, file = "./data/statfi_zipcode_population.rda", | ||
compress = "bzip2") | ||
|
||
karttasovellus::document_data(dat = statfi_zipcode_population, | ||
neim = "statfi_zipcode_population", | ||
description = "This dataset contains population for each zipcode in Finland. Data is doanloaded from Statistics Finland") | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters