itsleeds / itsleeds/cyclability

Exmaple using missing dataset

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
2
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Frist step of the [example](https://github.com/ITSLeeds/cyclability#lts-data-from-r5) is loading data generated by `r5r_setup.R`

First step:
`leeds_lts = readRDS("r5r/r5r_lts_osmtags.Rds")`

Within `r5r_setp.R` this dataset is not created, rather a geojson is:
```
# export network with osm_id and LTS levels
r5r_lts_shp = street_network_to_sf(r5r_lts)
r5r_lts_edges = r5r_lts_shp$edges
r5r_lts_vert = r5r_lts_shp$vertices
# nrow(r5r_lts_shp) # 10134 edges
# saveRDS(r5r_lts_edges, "r5r/r5r_lts_shp.Rds") <--- Commented out!
sf::st_write(r5r_lts_edges, "r5r/r5r_lts_shp.geojson")
```
You can either use the geojson by changing the filepath in the example to `leeds_lts = readRDS("r5r/r5r_lts_osmtags.geojson")`

OR uncomment this line in `r5r_setup.R` --> # saveRDS(r5r_lts_edges, "r5r/r5r_lts_shp.Rds")

Both the .geojson & .Rds are the same - it does not matter which is loaded.

![Screenshot from 2022-10-19 14-49-25](https://user-images.githubusercontent.com/58815827/196710044-d7d62e14-dc94-4537-9854-761247b8eae0.png)

Apart from that - everything runs smoothly and I have been able to reproduce plots!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.