Opioid Environment Toolkit, OEPS R, and Methadone Clinic Coverage in the Chicago Area

Adapted from the Opioid Environment Toolkit

The Center for Spatial Data Science at UChicago created several tutorials for their Opioid Environment Toolkit focusing on how methadone clinics serve the chicago area. This code is adapted from their toolkit for use in the HEAL platform.

The Opioid Environment Policy Scan (OEPS) is a database providing access to data at multiple spatial scales to help characterize the multi-dimensional risk environment impacting opioid use in justice populations across the United States. The OEPS and the Opioid Environment Toolkit, from which this script was adapted, were developed for the JCOIN network by Marynia Kolak, Qinyun Lin, Susan Paykin, Moksha Menghaney, and Angela Li at the Center for Spatial Data Science at the University of Chicago as part of the Methodology and Advanced Analytics Resource Center (MAARC).

Citation:

Marynia Kolak, Qinyun Lin, Susan Paykin, Moksha Menghaney, & Angela Li. (2021, May 11). GeoDaCenter/opioid-policy-scan: Opioid Environment Policy Scan Data Warehouse (Version v0.1-beta). Zenodo. http://doi.org/10.5281/zenodo.4747876

In this notebook, I use three parts of the this tutorial:

  1. buffer analysis (ie what percent of the chicago area is close to a clinic?)
  2. using these buffers in the context of other meaningful community data (ie COVID case rates as use case)
  3. coverage by a designated regions (ie zip codes).

While much of the code is directly from the Toolkit tutorial, I also expanded to make it usable within the HEAL platform and within a R Kernel Jupyter Notebook environment and to learn a few additional functions to quantify results.

This notebook shows how to use both locally uploaded files in combination with HEAL platform specific files.

Specifically, COVID data has been uploaded locally while geometric and clinic files are taken from the OEPS database on the heal platform.

Geocoding from addresses

A common goal in opioid environment research is to calculate and compare access metrics to different providers of Medications for Opioid Overuse Disorder (MOUDs). Before we can run any analytics on the resource location data, we need to convert resource addresses to spatial data points, which can be then used to calculate access metrics.

Geocoding is the process of converting addresses (like a street address) into geographic coordinates using a known coordinate reference system. We can then use these coordinates (latitude, longitude) to spatially enable our data. This means we convert to a spatial data frame (sf) within R for spatial analysis within our R session, and then save as a shapefile (a spatial data format) for future use. In this tutorial we demonstrate how to geocode resource location addresses and convert to spatial data points that can be used for future mapping and geospatial analysis.

Show projection of points on interactive Open Street map:

Buffer analysis

Once we have spatially referenced resource locations, it's helpful to plot the data in the community of interest for some preliminary analysis. In this tutorial we will plot Methadone Providers in Chicago and community areas to provide some context. We will also generate a simple 1-mile buffer service area around each provider to highlight neighborhoods with better, and worse, access to resources. In order to accomplish this task, we will need to standardize our spatial data (clinic points, and community areas) with an appropriate coordinate reference system. Finally, we'll make some maps!

Our objectives are thus to:

Can do conditional buffers:

  1. Eg rural area generally you have larger buffer than urban/suburban.
  2. walking distance? generally smaller

Quantifying resource coverage from buffer analysis

You can then quantify what you are seeing above by creating a simple feature object from the intersection of the city and the buffers with the overall city boundaries using st_intersection and st_area

Next Steps

Linking Community Data

link additional pieces of information with the buffer analysis to target key vulnerable populations. The OEPS tutorial uses the COVID pandemic as a case study.

  1. connect Chicago COVID-19 Case data by ZIP Code, available as a flat file on the city’s data portal, to our environment.

  2. overlap the 1-mile buffers representing walkable access to the Methadone providers in the city. COVID impacts travel so conservative, "walkable" threshold used.

  1. identify zip codes most impacted by COVID that are outside our acceptable access threshold.

Significance

Of course, this visualization needs a more complete picture of opioid outcomes by zip. But, the red zip codes far from walking distance may be at risk for increased opioid overdoses without intervention (ie from pop up shops).

Next steps additional visualizations:

Insights from linking data with buffers

Zip centroid analysis

Next steps

To do for future mapping other data