Skip to content

Commit c5c3e9a

Browse files
committed
export adresse un peu de rgt a faire
1 parent aaca45f commit c5c3e9a

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

Prétraitement_ETL/normalize_adressev2.R

+16-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ centre_cluster <- cluster.shp %>%
7474
sf::st_as_sf(sf_column_name = "geometry")
7575

7676

77-
table(centre_cluster$count)
77+
#table(centre_cluster$count)
7878

7979
# attention ici meme si on a plusieurs points ils peuvent :
8080
# - se superposer donc on ne peut calculer le polygones
@@ -98,7 +98,7 @@ centre_cluster_ligne <- aggregate(
9898
# match est utilise pour produire un vecteur d'indexation attribuant on va attribuer le point
9999
centre_cluster$geometry[centre_cluster$count == 2] <- st_sfc(centre_cluster_ligne$geometry)[match(centre_cluster$clust_100[centre_cluster$count == 2], centre_cluster_ligne$Group.1)]
100100

101-
st_write(centre_cluster, "data/verif/verif_cluster2.geojson")
101+
# st_write(centre_cluster, "data/verif/verif_cluster2.geojson")
102102

103103
# on prepare pour un rajout
104104
transit <- data.frame(
@@ -129,6 +129,20 @@ transit_passage <- centre_cluster %>%
129129
# # il y a l'ajout puis la mise en forme
130130
table_adresse.shp <- adresse_pre_cluster[!adresse_pre_cluster$ID_CARTO %in% centre_cluster$ID_CARTO,]
131131

132+
a_garder <- names(table_adresse.shp)
133+
134+
bob <- centre_cluster[,a_garder]
135+
table_adresse.shp <- rbind(table_adresse.shp, bob)
136+
137+
geocodage_clb.shp <- sf::st_read("data/sortie_15_04.shp" , stringsAsFactors = FALSE)
138+
139+
geocodage_clbv2.shp$date_start <- parse_date_time(geocodage_clbv2.shp$date_start, orders = c("my", "dmy"))
140+
geocodage_clbv2.shp$date_end_a <- parse_date_time(geocodage_clbv2.shp$date_end_a, orders = c("my", "dmy"))
141+
142+
geocodage_clbv2.shp <- geocodage_clbv2.shp %>%
143+
dplyr::select(ID_CARTO, Loc_name, Commune, CP, nb_rue_p, rue_p, compl_add_, pt_remarq_, lieudit_p ) %>%
144+
tidyr::unite("Adresse", nb_rue_p, rue_p, sep = " ", na.rm = TRUE) %>%
145+
tidyr::unite("Info_sup", lieudit_p, compl_add_, pt_remarq_, na.rm = TRUE)
132146

133147
# %>%
134148
# select(-c(date_start, date_end, commune, adresse, cp, info_sup, nb_cluster, nb_bigcluster)) %>%

0 commit comments

Comments
 (0)