Comments

You must log in or register to comment.

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

CeruleanDragon1 t1_jdnrznn wrote

Good visualization. Is the white unknown or inaccessible?

69

jugliss t1_jdnuzio wrote

This is very cool. I know a lot of emergency care clinics have sprung up in Virginia in the last decade or so. It would be interesting to see an overlay with those too to see if they coalesce around hospitals and metropolitan areas with money or if they help relieve the congestion at all.

8

jxj24 t1_jdnvqli wrote

I was an EMT in upstate NY in the late '80s, in a territory that was on the opposite side of one of the Finger Lakes from the main hospital for the area.

It could be well over 40 minutes even while running lights and siren.

It was particularly frustrating as the lake is at most a mile wide, so you could see the hospital while knowing you weren't getting there any time soon.

(Oh, and the intersection you needed to get through was frequently blocked by train traffic.)

27

nightb4xmas t1_jdo096h wrote

this is outstanding and very useful in healthcare and rural population outcome analysis. wondering if you could produce this for Maryland.

44

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_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

jxj24 t1_jdozkk6 wrote

There are definite benefits to living somewhere that’s not the middle of nowhere, that’s for damn sure.

I live close to several hospitals now because I left NY and went to grad school for biomedical engineering, and that’s where this sort of thing gets done.

It’s pretty comforting to know that I am within mere minutes of world-class hospitals and a Level 1 Trauma center, but it’s not at the front of my mind very often.

6

thekaleshake t1_jdp036a wrote

This is super cool! Whats the source data for this? Or how to you make the source data for a state?

2

Gllizzy t1_jdp20q3 wrote

this should be the standard for this sub. well done!

3

chaztizer90 t1_jdp3hre wrote

Very, very cool. Interesting to see this type of visualization, particularly as I work in EMS in this general region. I am guessing some of the data from your source may be a bit outdated. In the eastern shore of VA, the hospital that was in the Exmore area moved to Onancock a few years ago. The map currently seems to show there are two hospitals in the eastern shore, and there is only one in the VA portion of the peninsula.

1

half_integer t1_jdp4f6z wrote

The differences are stark in these two maps, since you used the same color scale.

BTW you can see some of the cross-border anomalies here, where locations in VA have a shorter time indicated on the MD map than the VA one.

7

burninater44 t1_jdp7kav wrote

Excellent map, and painful to see how uncovered parts of the state are (my hometown incl)

A possible small issue I see with the dataset, is the inclusion of in-patient psychiatric facilities that are labeled as hospitals. (Western State, Cumberland, Central State, Eastern State). Definitely a difficult choice to include or exclude these but I think excluding them might be better if this map is trying to show how much access localities have to healthcare. These facilities mostly do 'long term care' for the statewide patients.

7

TerryTowellinghat t1_jdp96h1 wrote

Am I missing something, or do the colours not match the legend? It may be my eyes but it looks like the darker purple colour is used for < 40 minutes, but the lighter purple is between the darker purple and the white on the map. The < 10 also looks like yellow in the legend, but there seem to be two greens on the map. Apologies if it is just my eyes.

7

BeeStunning t1_jdpammg wrote

Unfortunately, the hospital outside of Exmore,VA closed. That lower green on the Eastern Shore of VA shouldn’t be there at all. I lived there while it closed, now it’s an old folks home and specialist center. Hope this helps your data.

3

trophycloset33 t1_jdpb4f7 wrote

Can you overlay it with a map of major roads and population heat map?

I suspect that over 95% of the population can be served in less than 20 minutes.

1

took_a_bath t1_jdpd3tj wrote

Funny, I live in a relatively small town. I actually wish I could live in a smaller town. But for some reasons (maybe because I’m getting old and have a history of heart disease in my family), I find it a huge comfort to know I’m close to two hospitals.

2

wcedmisten OP t1_jdpd6od wrote

Yeah, the legend doesn't quite match due to the boundaries being layered on top of each other. Since the yellow is the smallest, it's being mixed with all the other colors that are stacked behind it semi-transparently.

−2

pcthrowaway35 t1_jdpds93 wrote

It’s like that cuz he layered the colors on top of each other in the graph, but not in the legend. Something less than 10 is also less than 20 and also less than 30. So it’s not the yellow of the legend, it’s all the colors layered on top of each-other. Very confusing and not good

16

trophycloset33 t1_jdpe2qs wrote

Aa way to visualize it may be dots. Lighter red for less densely packed, darker red for more densely packed and size of the dot represents area of the city centered around the center of population. Not sure what software you are using or how difficult it would be to show this though….

But cool math. Less than I thought or would hope for. Probably poor access to high ways is the main driver to this.

1

Hocoti t1_jdpfazq wrote

I was wondering how old the hospital data is? It seems to be missing a newer hospital located at Rt. 29 & Profitt Rd (Northern Albemarle County).

2

obfuscatron t1_jdpfp56 wrote

Great! But please fix the colors on the legend

2

Khelek7 t1_jdpibb0 wrote

This doesn't seem to account for hospitals out of state. I can see some that should be accounted for in WV. (probably other, but those are the ones I know)

1

slopmarket t1_jdpoe43 wrote

By my count this means Virginia has almost exactly 50 hospitals (by OP’s definition)

1

FahkDizchit t1_jdpsh72 wrote

I get why they did that, but it’s a little frustrating the colors don’t match the legend. Not sure there is a way to fix that.

Edit: actually, since all <10 mins are within <20 mins, etc. the colors on the legend should be able to match the map exactly.

5

ATastyBagel t1_jdpsrqf wrote

It's cool to see this posted, If you ever go back to update it for anything I would suggest adding filters for whether the hospital has certain specialties, like does it have a CATH lab, what level of stroke care does it provide, is it a trauma center and if so what level, does it have pediatrics, is it a full hospital or just a freestanding ER. Or just overall re filtering the map by specialty

With those filters you'll see a pretty massive change in how this would look. Even a lot of the areas surrounding Richmond might show a <10 trip but in some of those areas it's only because of the freestanding facilities.

for disclosure i'm saying this as an EMT in the state, from where I work depending on type of patient their distance from an appropriate facility could go from <10 to 30+

Overall though I love this map, it provides a good outline of hospital coverage in Virginia.

&#x200B;

*edit I will add on that looking at the regions where I respond it does line up with the distances you've shown.

2

mizinamo t1_jdpvkbi wrote

> I was wondering how old the hospital data is?

The data is from OpenStreetMap, crowdsourced by volunteers.

So it might be at most a day old if we're talking about an area with several active volunteers, and a lot older if we're talking about an area that nobody cares for especially.

It's not a government or company dataset where somebody is specifically responsible for updating it at certain intervals that you can rely on.

2

fillmorecounty t1_jdq16qk wrote

I wonder what this looks like for states with extremely low population density like Alaska

1

Flimsy-Win-9925 t1_jdq853y wrote

white areas: “MA! PA FELL DOWN THE STAIRS! GET THE SHOTGUN!”

1

wcedmisten OP t1_jdqouwt wrote

So it looks like this is in the dataset, but it's classified as a clinic and not a hospital. I believe the distinction for OSM is whether inpatient services are offered.

1

wcedmisten OP t1_jdqu4i9 wrote

Yeah I'd definitely be interested to add filters like that.

Unfortunately I'm not sure where to get that data of specialties/services offered by hospitals.

If anyone knows where I can find that data, please let me know!

1

cellus5000 t1_jdrbu17 wrote

I dont think people often know exactly how rural most of VA is

1

alehanro t1_jdrw3a4 wrote

If it’s “Driving Distance to Nearest Hospital” shouldn’t the metric be miles? If the metric is in time (minutes) wouldn’t it be “Driving Time to Nearest Hospital”?

1