Spectator compiled data on open emergency hospitals and bed counts in New York City neighborhoods using the NY State Department of Health database and emergency hospitals that have closed since 2000 using NYC Open Data.
Neighborhood zipcodes were queried for and hospital addresses geocoded using Google's Places API. The script can be found here and is applied to our public dataset which can be found here.
-
Make sure you have Python 3 installed.
-
We are going to use
pipenvto manage the packages we use. Install it by running this command in the terminal (you may have to first installbrew):
brew install pipenv
- Copy this repository onto your machine. To do this, run this command in the terminal:
git clone git@github.com:graphicsdesk/hospital-data.git
- Navigate to the newly created
hospital-datafolder by running:
cd hospital-data
-
Now run
pipenv installto install all the packages listed in thePipfile. (The Pipfile is a file in this repository that lists all the packages we need sopipenvknows which ones to get.) -
Run
pipenv shellto be able to access the newly installed packages. -
We will be using Jupyter Notebooks to do this analysis. Please watch this short introduction on Jupyter.
-
Run
jupyter notebookto start the notebook. Go into thenotebooksdirectory, then open thefetcher.ipynbnotebook. -
You're ready to do data reporting!