datalab-dev / graves-endocrine_surgeons

Claire Graves' 2022 collaboration to identify access to endocrine surgery centers
GNU General Public License v3.0
1 stars 1 forks source link

code for computing isochrones from addresses; data for head of the da… #12

Closed avkoehl closed 2 years ago

avkoehl commented 2 years ago

…taset #10

Before running on the full set I wanted to check a few things about the code. This code, as far as I can tell is working, but there are some modifications that we may want to make, and we probably want to confirm that the results are appropriate. It only runs on the first 6 addresses in this iteration.

Things to check:

things we can modify:

output format: Currently saving the output as an RDS containing a list of R objects derived from the json response of Valhalla. This way we keep the ID field that I derive from the row number. Alternatively we can save these directly as json files with geojson, or use the geojsonsf package.

output location: Currently saving the outputs in the data folder. We may want to make a new folder called outputs and add that folder to the gitignore. 6 isochrones in the format defined above is ~300kb, so 600 would be 30MB? Perhaps larger than we want to store on github.

performance: It takes about 1 minute to run this script on 6 addresses, so expect approximately 100 minutes to run on the full dataset. We can parallelize the GET requests to speed this up. Would take some work though.

Thoughts? Are you able to run this on your machine (when on staff VPN)?