many-to-many multi-modal routing aggregator
at main 23 lines 761 B view raw
1# script to generate `data/hampi.rda`, an `sc` version of `dodgr::hampi` (in `sf`) 2 3```{r load, echo = FALSE} 4library (dodgr) 5``` 6```{r} 7m4ra_hampi <- dodgr_streetnet_sc ("hampi india") 8``` 9Then need to get rid of columns, especially the ones with Kannada names which 10are non-UTF8 11```{r} 12nms <- c ("osm_id", "bicycle", "covered", "foot", "highway", "incline", 13 "motorcar", "motorcycle", "motor_vehicle", "oneway", "surface", 14 "tracktype", "tunnel", "width", "geometry") 15 16index <- which (m4ra_hampi$nodes$key %in% nms) 17m4ra_hampi$nodes <- m4ra_hampi$nodes [index, ] 18index <- which (m4ra_hampi$object$key %in% nms) 19m4ra_hampi$object <- m4ra_hampi$object [index, ] 20``` 21```{r} 22usethis::use_data (m4ra_hampi, overwrite = TRUE, compress = 'xz') 23```