Skip to content

Commit

Permalink
Actualitza bases de dades amb correccions d'OSM + capital i admin_cen…
Browse files Browse the repository at this point in the history
…tre a loc_admin_centre_municipis
  • Loading branch information
jmaspons committed Sep 13, 2023
1 parent 25a468a commit f6d11b3
Show file tree
Hide file tree
Showing 7 changed files with 1,684 additions and 1,680 deletions.
3,348 changes: 1,674 additions & 1,674 deletions data-raw/loc_admin_centre_municipis.tsv

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions data-raw/localitats.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,26 @@ usethis::use_data(loc_admin_centre_municipis, overwrite = TRUE, compress = "xz")

loc_admin_centre_municipis_osm <- consulta_etiquetes_osm(
x = loc_admin_centre_municipis,
etiquetes = c("name:ca", "osm_id", "osm_type", "name", "wikidata", "wikipedia", "place")
etiquetes = c("name:ca", "osm_id", "osm_type", "name", "wikidata", "wikipedia", "place", "capital", "admin_level")
)
lapply(loc_admin_centre_municipis_osm, unique)

# TODO: afegeix capital segons l'admin_level de la relació que fan d'admin_centre
edita <- loc_admin_centre_municipis_osm[is.na(loc_admin_centre_municipis_osm$capital), ]

loc_admin_centre_municipis_osm <- loc_admin_centre_municipis_osm[, c(
"name:ca", "regio", "comarca", "osm_id", "osm_type", "name", "wikipedia", "wikidata", "place"
"name:ca", "regio", "comarca", "osm_id", "osm_type", "name", "wikipedia", "wikidata",
"place", "capital", "admin_level"
)]


#### Compara nova base de dades amb la del paquet instal·lat ----

library(compareDF)

cols <- intersect(names(loc_admin_centre_municipis_osm), names(monitorOSM::loc_admin_centre_municipis_osm))
cols <- intersect(names(loc_admin_centre_municipis_osm), names(monitorOSM::loc_admin_centre_municipis))
diff_loc_admin_centre_muni <- compare_df(
loc_admin_centre_municipis_osm[, cols], monitorOSM::loc_admin_centre_municipis_osm[, cols],
loc_admin_centre_municipis_osm[, cols], monitorOSM::loc_admin_centre_municipis[, cols],
group_col = c("osm_type", "osm_id")
)
view_html(diff_loc_admin_centre_muni)
Expand Down
2 changes: 1 addition & 1 deletion data-raw/municipis.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@
"Miramar" "PV" "la Safor" "343647" "relation" "Miramar" "ca:Miramar" "Q2041829" "8"
"Oliva" "PV" "la Safor" "342677" "relation" "Oliva" "ca:Oliva (Safor)" "Q918586" "8"
"Palma de Gandia" "PV" "la Safor" "340014" "relation" "Palma de Gandía" "ca:Palma de Gandia" "Q1992985" "8"
"Palmera" "PV" "la Safor" "342670" "relation" "Palmera" "ca:Fuente Palmera" "Q1443622" "8"
"Palmera" "PV" "la Safor" "342670" "relation" "Palmera" "ca:Palmera (Safor)" "Q2356806" "8"
"Piles" "PV" "la Safor" "346850" "relation" "Piles" "ca:Piles" "Q2041837" "8"
"Potries" "PV" "la Safor" "346845" "relation" "Potries" "ca:Potries" "Q2041797" "8"
"Rafelcofer" "PV" "la Safor" "346552" "relation" "Rafelcofer" "ca:Rafelcofer" "Q1313084" "8"
Expand Down
2 changes: 1 addition & 1 deletion data-raw/territoris.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"el Carxe" "Múrcia" "11755232" "relation" "El Carche" "ca:El Carxe" "Q1765102"
"Català com a llengua pròpia a Catalunya" "Principat" "11746917" "relation" "Català com a llengua pròpia a Catalunya" "ca:Catalunya"
"Catalunya" "Principat" "349053" "relation" "Catalunya" "ca:Catalunya" "Q5705"
"Comunitat Valenciana" "PV" "349043" "relation" "Comunitat Valenciana" "es:Comunidad Valenciana" "Q5720"
"Comunitat Valenciana" "PV" "349043" "relation" "Comunitat Valenciana" "ca:País Valencià" "Q5720"
"Municipis de Predomini Lingüístic Valencià" "PV" "11739086" "relation" "Municipis de Predomini Lingüístic Valencià" "ca:Valencià" "Q32641"
Binary file modified data/loc_admin_centre_municipis.rda
Binary file not shown.
Binary file modified data/municipis.rda
Binary file not shown.
Binary file modified data/territoris.rda
Binary file not shown.

0 comments on commit f6d11b3

Please sign in to comment.