source(here::here("_rinit.R"))source(here::here("data", "paris", "_paris.R")) # wkb2sfc(), paris_basemap(), arrondissements_sf()invisible(Sys.setlocale("LC_TIME", "fr_FR.UTF-8"))# cd ~/iCloud/website/data/paris; /usr/local/bin/R -e 'quarto::quarto_render("velib-emplacement-des-stations.qmd")'knitr::opts_chunk$set(echo =TRUE, message =FALSE, warning =FALSE,fig.width =8, fig.height =5, dpi =150)velib_path <- here::here("data", "paris", "velib-emplacement-des-stations.parquet")velib <- arrow::read_parquet(velib_path)n_tot <-nrow(velib)n_docks <-sum(velib$capacity, na.rm =TRUE)arr_sf <-arrondissements_sf()pts_sf <- velib |> dplyr::mutate(geometry =wkb2sfc(coordonnees_geo)) |> sf::st_as_sf(crs =4326)# Pas de colonne arrondissement dans ce jeu (ni adresse) -> jointure spatiale# avec le fond de carte des arrondissements ; les stations hors Paris# intra-muros (réseau Vélib' métropolitain) restent NA.pts_ar <- sf::st_join(pts_sf, arr_sf["c_ar"], join = sf::st_within)theme_carte <-theme_void(base_size =12) +theme(plot.title =element_text(face ="bold"),plot.subtitle =element_text(colour ="grey35"),plot.margin =margin(5, 12, 5, 5))theme_barres <-theme_minimal(base_size =12) +theme(plot.title =element_text(face ="bold"),plot.subtitle =element_text(colour ="grey35"),panel.grid.major.y =element_blank())
1519 stations Vélib’, pour 49 271 points d’attache au total (32.4 en moyenne par station) — le réseau métropolitain déborde largement de Paris intra-muros, jusqu’en petite couronne.