wcedmisten

wcedmisten OP t1_jdpdeg4 wrote

Sad to hear that. It looks like OpenStreetMap is out of date in this regard, I'll make a note to update it (if no one beats me to it). https://www.openstreetmap.org/#map=18/37.47499/-75.86362

One of the disadvantages of crowdsourced data is that it's not always up to date. But the advantage is that it's quite easy to fix! Thanks for pointing this out!

Edit: I fixed this in OSM

3

wcedmisten OP t1_jdp1ad6 wrote

Glad you liked it! Made this for Maryland! https://i.imgur.com/8kYzyzU.png

Some caveats here are that my approach only references distances to hospital within the state, so it won't count hospitals that may be near the border but in another state. I hope to expand this to a country-wide analysis once I can optimize it a bit more.

26

wcedmisten OP t1_jdoyvmq wrote

Thank you!

I actually calculated this, but haven't had a chance to add it to the visualization yet.

Here are the numbers:

10 mins: 5,596,838 (65.3%)
20 mins: 7,635,539 (88.7%)
30 mins: 8,296,515 (96.1%)
40 mins: 8,552,706 (99.0%)
This was estimated using the EU's Global Population Density Estimate dataset GHS POP .

Not quite sure the best way to visualize this data. Add it to the legend?

Perhaps not surprisingly, the hospitals are centered around dense urban areas, and so even though the 10 minute boundary doesn't cover most of the state's area, it does cover most of the population.

9

wcedmisten OP t1_jdo2pc2 wrote

Yeah I'd like to see what this map looks like for NY. Those lakes would have a big impact on the shape of the boundaries, whereas most of the boundaries in VA are roughly circular because there aren't big geographic barriers.

I'm curious, did your experience as an EMT make you want to live closer to a hospital for that reason?

11

wcedmisten OP t1_jdnngzy wrote

Interactive version: https://wcedmisten.fyi/project/virginia-hospital-distance/ Disclaimer: this will be very slow to load because it fetches several MB of JSON files. Sorry! I'm looking into optimizing this.

Data source: OpenStreetMap

Tools: Valhalla Isochrones API, Python, PostGIS

Summary:For this project, my goal was to map out accessibility to hospitals as measured by travel time in a car.

The first step was to find all the hospitals in Virginia. To do so, I downloaded the OpenStreetMap extract for Virginia and loaded it into PostGIS. Then I searched for all features with the `amenity=hospital` tag. This was done for both Points and Polygons. Polygons were converted to points by their centroid.

Next, I loaded the same OSM extract for Virginia into a docker container running Valhalla. Valhalla is mostly known for point to point routing (like google maps provides). But, their API also provides a way to retrieve Isochrones from a point. Isochrones measure the area that can be travelled within a given amount of time.

I iterated over all hospital coordinates through the Isochrones API to retrieve an isochrone for each hospital at 10 minute increments from 10-40 minutes.

Then, for each contour level, I used the Python library Shapely to find the union of all polygons and exported them as GeoJSON.

Using MapLibreGL, I visualized these polygons with a custom style in the browser.

19