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

Create raster dataset of cycling uptake each year 2010-2019 relative to 2011 cycling levels #57

Open
Robinlovelace opened this issue Oct 29, 2020 · 14 comments
Assignees

Comments

@Robinlovelace
Copy link
Contributor

The confidence intervals associated with this dataset is a separate question. A pre-requisite for estimating spatio-temporal distribution of risk rates.

@mem48
Copy link
Collaborator

mem48 commented Jan 27, 2021

@Robinlovelace quick update on this:

making good progress currently splitting the rnet to match the 500m grid. I expect this will take a few hours to run so will come back to it after lunch.

image

@Robinlovelace
Copy link
Contributor Author

Looking good but I thought we already created this dataset? cc @joeytalbot .

@mem48
Copy link
Collaborator

mem48 commented Jan 27, 2021

I'm doing this for #75 (sorry got issue #57 and #75 mixed up). I asked in last weeks meeting if this had been done and @joeytalbot said no.

@joeytalbot
Copy link
Contributor

I generated the cycle count -based correction factors but I haven't split the PCT-derived rnet into a 500m spatial grid so that looks like useful work.

@Robinlovelace
Copy link
Contributor Author

This has been done and documented here: #54

@Robinlovelace
Copy link
Contributor Author

But no harm in doing it again. Heads-up @mem48 this is the split-up network - will be good to compare your result with this but does seem a bit like reinventing the wheel: https://github.com/saferactive/saferactive/releases/download/0.1.1/rnet_split.Rds

@Robinlovelace
Copy link
Contributor Author

Robinlovelace commented Jan 27, 2021

I think this is the .tif I generated already. Would be good to know how what you're doing is different - one reason preemptive and 'agile' communication is good, especially when there's lot's going on making it hard to recall what has and what has not been done yet: https://github.com/saferactive/saferactive/releases/download/0.1.1/raster_rnet_bicycle.tif

@mem48
Copy link
Collaborator

mem48 commented Jan 27, 2021

@Robinlovelace I think you have split the lines into 50m segments? What I've done is make a 50 x 50 m grid to match the GAM outputs and then cut the lines along the grid boundaries.

@mem48
Copy link
Collaborator

mem48 commented Jan 27, 2021

See Example

image

The grid cell is defined by the GAM outputs, the red lines are the roads that intersect with the grid cell, the blue lines are the roads that are clipped to the grid cell.

I can now count the lenght of roads in the grid cell and the number of cyclists to get total km cycled in each grid cell. Which will be tomorrows task.

@Robinlovelace
Copy link
Contributor Author

Both can be used as inputs needed to create https://github.com/saferactive/saferactive/releases/download/0.1.1/raster_rnet_bicycle.tif. Will be good to compare/contrast in any case although I'm not sure resplitting the network is an optimal use of time. Can you push the code that's doing it and link to it also? If it's taking a long time I would start with the .tif file already generated but open minded to +s/-s of other ways of doing things. Best to communicate 1st in any case, I suggest your approach, shown above, will be slow and 50m segments with centroids allocated to cells will be sufficiently accurate for our purposes.

@Robinlovelace
Copy link
Contributor Author

On a methods/software side I'd be interested to see how the approach compares with this - not sure if you saw that but I created that in the process of generating the .tif shown above: https://docs.ropensci.org/stplanr/reference/line_breakup.html

@mem48
Copy link
Collaborator

mem48 commented Jan 28, 2021

Yeh, but st_split is not very stable with large datasets. I tried it and it just keeps crashing

@Robinlovelace
Copy link
Contributor Author

Yeh, but st_split is not very stable with large datasets. I tried it and it just keeps crashing

Could you provide a reproducible example? Would be great if we can improve on line_breakup().

@Robinlovelace
Copy link
Contributor Author

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

3 participants