Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exmaple using missing dataset #3

Open
hulsiejames opened this issue Oct 19, 2022 · 0 comments
Open

Exmaple using missing dataset #3

hulsiejames opened this issue Oct 19, 2022 · 0 comments

Comments

@hulsiejames
Copy link

hulsiejames commented Oct 19, 2022

Frist step of the example 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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant