Rapidly measuring spatial accessibility of COVID-19 healthcare resources: a case study of Illinois, USA

This notebook briefly walks through calculating spatial accessibility to hospital ventilators in across the state of Illinois. This work uses the code from the following paper:

Kang, JY., Michels, A., Lyu, F. et al. Rapidly measuring spatial accessibility of COVID-19 healthcare resources: a case study of Illinois, USA. Int J Health Geogr 19, 36 (2020). https://doi.org/10.1186/s12942-020-00229-x

Paper Authors: Jeon-Young Kang, Alexander Michels, Fangzheng Lyu, Shaohua Wang, Nelson Agbodo, Vincent L. Freeman & Shaowen Wang

Notebook Authors: Alexander Michels, Zimo Xiao, Anand Padmanabhan, Zhiyu Li, Shaowen Wang, Mit Kotak and Taylor Ziegler

In [1]:
import contextily as cx
import geopandas as gpd
import os

Let's connect to the CyberGIS-Compute server:

In [2]:
from cybergis_compute_client import CyberGISCompute

cybergis = CyberGISCompute(url="cgjobsup.cigi.illinois.edu", isJupyter=True, protocol="HTTPS", port=443, suffix="v2")

When the UI comes up, we will select "covid-access" from the Job Configuration tab's "Job Templates" dropdown. Then select submit.

Note that this will take approximately 20 minutes. If you close the browser or if the kernel goes to sleep at some point, you can restore the job from the "Your Jobs" tab.

In [3]:
cybergis.show_ui()

Wait for the job to finish to run more cells. These cells all depend on the results of the job!

When the job finishes, go to the "Download Job Result" tab and select "/" from the dropdown (it should be the default choice). Then click the "Download" button and wait for the download to finish.

Once the download is finished, you can run the cell below to get the download path:

In [4]:
download_path = cybergis.recentDownloadPath
print(f"Our outputs are at {download_path}")
Our outputs are at /home/jovyan/work/globus_download_1658246985T6nKU

Let's list the stuff we downloaded from the HPC resource:

In [5]:
!ls {download_path}
map.png  result.geojson  slurm_log

Now, let's load the result GeoJSON object:

In [6]:
result_path = os.path.join(download_path, "result.geojson")
gdf = gpd.read_file(result_path)
gdf.head()
Out[6]:
left top right bottom id area hospital_vents geometry
0 271377.129808 4.361113e+06 277150.6325 4.356113e+06 5072 21640788.47 0.000081 POLYGON ((271377.130 4358613.330, 272820.505 4...
1 271377.129808 4.326113e+06 277150.6325 4.321113e+06 5079 21640786.83 0.000049 POLYGON ((271377.130 4323613.330, 272820.505 4...
2 271377.129808 4.331113e+06 277150.6325 4.326113e+06 5078 21640786.18 0.000131 POLYGON ((271377.130 4328613.330, 272820.505 4...
3 271377.129808 4.336113e+06 277150.6325 4.331113e+06 5077 21640787.63 0.000131 POLYGON ((271377.130 4333613.330, 272820.505 4...
4 271377.129808 4.341113e+06 277150.6325 4.336113e+06 5076 21640787.37 0.000153 POLYGON ((271377.130 4338613.330, 272820.505 4...

We can plot the spatial accessibility output with the cell below:

In [7]:
ax = gdf.plot(column="hospital_vents", cmap="OrRd", figsize=(8,10), legend=True)
cx.add_basemap(ax, crs=gdf.crs.to_string())

...or we can create an interactive visualization with the geopandas explore function:

In [8]:
gdf.explore(column="hospital_vents", cmap="OrRd")
Out[8]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [ ]: