Hacker News new | past | comments | ask | show | jobs | submit login
Mapping hospital accessibility with OpenStreetMap (wcedmisten.fyi)
151 points by wcedmisten on April 5, 2023 | hide | past | favorite | 33 comments



I built a similar website when working for a research lab ~2009. The lab is now closed, and thus so is the website but you can see some screen shots in this old time article: https://content.time.com/time/health/article/0,8599,2083636,...

What was interesting how many jurisdictions got mad at me, because they thought I was targeting them. A hospital in Chicago that shut down their trauma center to save money but caused the south side of Chicago to loose 1 hour access thought I was targeting them as revenge over that action. The Florida Keys was mad at me because they had a hospital but no access and I'd be like "I'm sorry but that hospital is not a Trauma center and this is a Trauma Center access map, if the hospital gets certified I'd be happy to update the data".

The hardest part was the data. I had to join the list of Trauma centers (levels 1 - 5, about 500 hospitals) with a hospital database (~5500 hospitals) to get additional information. I had to verify manually all the joins as well as the GPS coordinates.

Its a shame the app got shut down, it had some useful tools. You could see trauma center access via ambulance, air ambulance, or both for 45 and 60 minutes. It also had overlays for hospitals, trauma centers (levels 1, 2,..5), stroke centers, VA hospitals, and helipads. I also built an additional tool in a similar app to 'build your own hospital system' by clicking on available hospitals and 'upgrading' them to a TC or stroke center and then see how many people in the state gained access.


That's really cool. I'll probably end up trying to reproduce this by following your work step-by-step. I'm not too familiar with OSM, besides having used Nominatim.

Along the same lines we're crowdsourcing a database of hospital prices, starting this week. I'm reviewing our first pull request as we speak. You can follow our progress live. The data is here: https://www.dolthub.com/repositories/dolthub/standard-charge...

We talked a little about the problems we're encountering here: https://docs.google.com/document/d/1uMx1sUYwP_uE7ebd3PtGvF0t... and here https://docs.google.com/document/d/1NifwgKHBCeF35ZRZsfpgg4bE...


Thanks! You're doing awesome work, I read the blog post about the insurance data mess you're working through.

I'll see if I can incorporate that into my project!

I'd love to see what this map looks like filtered for specific services.


> I'd love to see what this map looks like filtered for specific services.

Sure. I did something like that with our insurance data. Did a quick folium visualization. You can start from here:

https://www.dolthub.com/repositories/dolthub/hospital-prices...

A limitation of our dataset is it excludes percentage-based contracts. So those won't show up.

Anyways, if you have the hospital NPI you want, you can look up all of its dollar-amount negotiated rates in this table. You can link that to the `hospital` table, geocode however you want, and make a map of the different rates. Note, however, that the insurance data published here is kind of a mess and, I think, contains many many mistakes (originating in the source data.)

BTW, I'm not sure if this insurance-derived hospital data exists anywhere else. I believe it doesn't.


See https://github.com/emigre459/hospital-chargemaster for an older study of hospitals. It gets the chargemaster prices that hospitals are supposed to publish. The procedures offered could be mapped to your "services".


Awesome, thanks! I'll look into that


I applaud the effort, but the challenges of rural health are even greater than just proximity to a hospital. For example, in my area we have multiple hospitals and clinics, but... have heart issues? Hour drive. Need cancer care? Likely driving between 3-5 hours toward one of the bigger metro areas. There is exactly one (!!) urologist in town. Need some kind of basic surgery (gall bladder, for example) guess what - there are a couple guys that rotate here every few weeks from one of the major cities (where they actually live). That's before we get into the clusterF that is the American insurance system.

Our rural hospitals are basically triage care and basic immunizations / antibiotics.


Isn't that a straightforwardly expected result of low population density?

If your area doesn't have many people, that means less demand for certain things, potentially not enough demand to keep permanent staff for particular types of care.

Of course, the other issue is that doctors (and nurses?) may simply not want to live in rural areas, even with the financial advantages.


I don’t really disagree, but for what it’s worth within an hour radius of my location there are roughly 400,000 people… so how dense do things have to be before it’s enough to support specialty care?


Hmm, that does seem like it should be enough to support things like heart care or general surgery, there should be enough demand. I imagine people who actually work in the industry might have some insights on why this would happen.


The Malaria Atlas Project worked on a global hospital accessibility dataset, base on OSM roads + other data :

Travel Time to Nearest Healthcare Facility with Access to Motorized Transport https://data.malariaatlas.org/maps?layers=Malaria:202206_Glo...

Paper : https://researchonline.lshtm.ac.uk/id/eprint/4657237/1/weiss...


This is an amazing write-up and I’m super excited to play around with a lot of the open source projects you referenced. Thanks so much for sharing.


Nice to see the localhost solution! I (my team) did very similar when I was a postdoc. In 2015 we used the HERE API (www.here.com) to map geographical access to hospitals in the entirety of two countries, USA and Brazil.

As starting point, I used the lat/lon of the population center of each census block group as provided by Census.gov. In Brazil the closest geographical equivalent is the setor censitário (census sector). I used Haversine distance (great circle distance between lat/lon's) to narrow the search space to the 5 closest hospitals, from the hospital database by the American Hospital Association, and the Brazilian CNES registry (Cadastro Nacional de Estabelecimentos de Saúde). From those 5 closest candidates, I then asked the HERE API for the true driving time to their address. Many many API calls.

We plotted average driving time against variables from the census block group provided by the American Community Survey to show how values change as driving distances change. Mostly just to demonstrate the kind of analyses possible. I presented the work at the NLM Informatics Training confereces, e.g. with many pictures of maps: https://github.com/fabkury/drithop/raw/master/Kury%20-%20dri... . Source code (but not data) are in the GitHub repo `drithop`. The maps are self-contained HTML files and interactive using OpenStreetMap.


Interesting -- I have reservations on the breadth of OSM, but maybe that's different for hospital locations. I've looked into how representative it is for some large public companies like Target and Walmart, but I've found that consistently, less than half of all stores are actually represented; plus, with the addition of smaller out-patient locations like urgent care centers, I'm not sure how truthful this picture really is.


I think where OSM really shines is when you plug in other data sources that have large institutional support keeping them accurate and timely. You’re then providing mapping data off of that data, “drafting” off of it if you will.

For example, if you want to keep hospital state up to date, ingest public payment data from Medicare/Medicaid and distill down by location. When fiat is at stake, there is more at stake wrt data accuracy.

Edit: fsflyer points this out in a below comment, mea culpa

https://news.ycombinator.com/item?id=35434775


Yeah, I think using another data source for hospitals would be better, I'll look into using supplemental data as the other comment suggested.

I suspect that hospitals are better represented than other POIs because their building footprints are large and distinctive, allowing them to be mapped from aerial imagery.

I limited this analysis to facilities providing inpatient care to avoid that problem. I suspect clinics are less accurate POIs. They're pretty much indistinguishable from other retail businesses from aerial imagery alone.


hospitals can be challenging. lots get shut down, and the smaller ones have severely misplaced coordinates because these surveys go out to the hospitals and a clerk will fill them out with an address, and that address gets geocoded. The address they give is sometimes an address to a branch hospital, or a different building than the treatment center of interest. Very large hospitals have an issue in this way too, and since they are so big that difference can effect the map and access a lot.


Awesome work, love stuff like this!

Also amazing to see how much open source software already exists for GIS, lowering the entry requirements to almost zero.


Thank you!

Being able to create interactive map visualizations without needing a server or paying for an API key is a real game changer!

Big shoutout to the Protomaps project and all the other open source projects in the ecosystem.


This is awesome.

As someone who has designed and commissioned quite a few hospitals over the years, this data is really interesting to me, especially as I have been on the front of how much hospital projects cost - from vendors selling "hospital grade" electronics (snake oil), to managing design build of full facilities from greenfield to clinical operations go live... Hospitals are ridiculously expensive "just because thats how it is"

Another interesting data point to add to this would be the mapping of reported income by city/county... I did this for Cannabis Dispensaries a few years ago - where I mapped out all the licenses granted by the BCC (now DCC) to dispensaries, and the average income level of the population surrounding each dispensary...

Then, I looked at reports to the BCC for reported income, where the average dispensary (at the time) was making $2MM/y -- its got to be much higher now....

It would be interesting to see the average income for the various populations in each time-strata as well.


Really cool project and great writeup!

I'm a physician and have been brainstorming a project with similar data acquisition concerns regarding services available. One of the most difficult things is that it's frustratingly fluid. As another poster mentioned, in my large rural state (NM) we have only one level 1 trauma center. In the 5th large state in the nation, there may be specialty services that completely depend on whether a single physician is on holiday or has transferred to a neighboring hospital, etc.

Neurosurgical services are a good example -- a handful of neurosurgeons in ABQ may be taking call for multiple hospitals, but only on certain days of the week, and the same neurosurgeon may be able to care for a trauma case at one hospital but not another (depending on equipment, staff, and most of all policy).


Related: me and my colleagues at Georgia Tech created something similar for multiple types of Points of Interest and developed and accessibility index. Our methodology was a bit different though: https://arxiv.org/abs/2212.06954


I'm curious how confident you are that all hospitals in the state are listed in the OSM database. In my experience, the point of interest data in OSM is highly variable, with many being totally absent. I know you mentioned a few mis-tagged hospitals, but did you look for missing ones?


I don't have a great data source for hospitals to cross reference, but I suspect hospitals are better represented than other POIs in OSM. Hospitals generally have very large and distinctive building footprints, which means "armchair mappers" using aerial imagery can still map them.

If I was looking at clinics, I believe this would be a bigger problem, because they're indistinguishable from other retail businesses in the aerial imagery.


Fascinating - and well written.

Regarding the problem of roads "leaking" into neighbouring states... is that an issue? If your nearest hospital was either 60 minutes away in-state or 10 minutes away across state lines - which would people generally choose?


Thank you!

The roads leaking is only an issue for determining the percentage of state residents within an area, because the regions also include out of state residents.

But what you describe is another limitation of my approach. Currently, only Virginia hospitals are considered in this, so some regions will actually have better hospital accessibility than presented here, particularly near state borders.

Now that I've polished this setup for one state, my plan is to expand the project to the US (or maybe all of North America), which should fix the issue you describe.


> [The Global Human Settlement Layer (GHS) Population dataset 6.] is formatted as an image of 100m x 100m squares, each containing the estimated population residing in each square. [...] due to the unconventional projection used (Mollweide 7), the image appears slanted and skewed compared to a more traditional projection.

How do you divide a Mollweide projection into 100m x 100m squares? In fact, how do you divide any projected globe into 100m x 100m squares?! Do they actually mean 10,000 m2 squares? Because you could do that, they would just get narrower and longer towards the poles.


Apologies for the confusion!

I meant that the data is represented as an image (of square pixels). But you're right, the actual land that each pixel represents won't be a square.

The dataset just says "100m resolution", so that may have been a misinterpretation on my part.

https://ghsl.jrc.ec.europa.eu/download.php?ds=pop


Great analysis, thank you for sharing.

A (maybe obvious) corollary is that you can use this data to easily evaluate the effect of a hospital closure (or other change in services/access) in terms of number of people affected.


keyword search "medically underserved"

Similar to the recent news item "why does nobody live in 90% of New Zealand" .. in the wealthy and wonderful US of A, there are vast areas where there are no general practitioner doctors on call, and some areas where there are no hospitals at all.

As mentioned in other comments, the road network is less than half of the accessibility story, the rest is about money.


> in the wealthy and wonderful US of A, there are vast areas where there are no general practitioner doctors on call,

If by that you mean doctors who make home visits then I have news for you: there are entire western countries where doctors do not make house calls. In Norway you are expected to to make an appointment to visit your GP, or make your own way to an outpatient clinic (legevakt) or the accident and emergency department at a hospital. If you can't do any of that you are expected to call an ambulance.

I haven't heard of GPs making home visits in the UK either in recent and not so recent decades.


great greetings to Norway ! .. no, I don't mean "house call" .. that disappeared here more than fifty years ago. I mean that in an entire area, there is not one single doctor in any way.


This is super cool!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: