You will first need to download the NPPES dataset and extract it to this directory (see step on of Programming Steps below).
In the current dirrectory, start Julia and run the following commands:
> ] # enters the package manager
> activate .
> instantiate
> # backspace to exit the package manager
> using Pluto
> Pluto.run()
This will open a browser window with the Pluto notebook. Open the NPI_Exploration.jl
file and click "Run Notebook".
- Download the most recent version of the NPPES dataset
- Read it in as a Table
- Verify NPIs with the check digit algorithm found here.
- Filter to rows that have a US state abbreviation in the
Provider Business Practice Location Address State Name
column. I am currently just checking to see if the string is two characters long. - Filter for active providers (
NPI Deactivation Date
is null ORNPI Reactivation Date) is not null
) - Flag counseling/psychology (101Y* or 103T*), physical therapy (2251*), oncology (207RX0202X) in the
Healthcare Provider Taxonomy Code_*
columns - Approximate tenure of each provider by using
Provider Enumeration Date
as a proxy for the date of starting to practice - merge on
Estimate!!Percent!!Civilian population 18 years and over
andEstimate!!Total!!Civilian population 18 years and over
from the 2020 ACS 5-year estimates by Practice Zip Code (./ACSST5Y2022.S2101-Data.csv
). Nppes data has aProvider Business Practice Location Address Postal Code
column that can be used to merge with the ACS data - Use total population to calculate the rate of each specialty group per 1,000 people in each zip code
- Graph relationship between veteran population and specialist density
- Graph relationship between veteran population and average specialist tenure
On my machine, the code takes about four minutes to run. This is after the notebook has been run once so all the packages are precompiled. I am happy to discuss any of the code or results with you.
You can view the pre-rendered notebook in the NPI_Exploration.html
file. This file was generated by running the notebook and saving it as an HTML file.