This repository has been archived by the owner on Jan 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Prototype codes #9
Comments
sf_data <- getKSJData("http://nlftp.mlit.go.jp/ksj/gml/data/P17/P17-12/P17-12_01_GML.zip", cache_dir = "../kokudosuuchi/cached_zip")
colnames(sf_data$`P17-12_01_FireStationJurisdiction`)
#> [1] "P17_005" "P17_006" "P17_007" "P17_008" "P17_009" "P17_010" "P17_011" "P17_012" "P17_013" "P17_014"
#> [11] "P17_015" "P17_016" "P17_017" "P17_018" "P17_019" "P17_020" "P17_021" "P17_022" "P17_023" "P17_024"
#> [21] "P17_025" "P17_026" "geometry"
sf_data <- getKSJData("http://nlftp.mlit.go.jp/ksj/gml/data/P18/P18-12/P18-12_01_GML.zip", cache_dir = "../kokudosuuchi/cached_zip")
colnames(sf_data$`P18-12_01_PoliceStationJurisdiction`)
#> [1] "P18_005" "P18_006" "P18_007" "P18_008" "P18_009" "P18_010" "P18_011" "P18_012" "P18_013" "P18_014"
#> [11] "P18_015" "P18_016" "P18_017" "P18_018" "P18_019" "P18_020" "geometry" |
These are prototypes for layer names. Ignore for now. |
library(dplyr)
library(kokudosuuchi)
sf_data <- getKSJData(
"http://nlftp.mlit.go.jp/ksj/gml/data/A22-m/A22-m-14/A22-m-14_01_GML.zip",
cache_dir = "../kokudosuuchi/cached_zip",
translate_colnames = FALSE
)
sf_data$`A22-m-14_MaxSnowDepth_01` %>%
rename(avg = A22_010001, max_depth = A22_010002) %>%
tidyr::gather(key = "year", value = "yearly_max_depth", starts_with("A22_01")) %>%
mutate(year = stringr::str_extract(year, "(?<=A22_01)\\d{4}")) %>%
split(.year) |
Close this for now. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: