Technical Methods

This page outlines the process and methods used throughout this project.

Project Overview

Page: Project Overview

The data for hurricane evacuation centers, hurricane evacuation zones, and NYC boroughs was downloaded from New York City’s open data portal, NYC OpenData. I performed some spatial joins to associate boroughs with centers and zones.

I used altair to create the contextual map and bar plot shown on this Project Overview page.

Part 1

Corresponding Page: Part 1: Exploratory Analysis of Population Density & Social Vulnerability

Part 1 of this project involved conducting an exploratory analysis on demographic data (population) and social vulnerability. Tabular data for the population variable for each census tract - as well as the geometries for each tract - were extracted from the US Census using Cenpy. The population density variable was calculated using the total population estimate and the total land area estimate for each tract.

The CDC/ATSDR Social Vulnerability Index (SVI) uses 15 US Census variables to determine the social vulnerability of every census tract. The SVI can help public health officials, City personnel, and planners help prepare for and respond to disaster events - like hurricanes and tropical storms. I therefore elected to use SVI data in this project since it already encompasses the demographic and socioeconomic variables in the Census that I sought to factor into my analysis. I downloaded the SVI data directly from the CDC for the entirety of New York State. I then filtered the data down to the five counties (which correspond to the five boroughs) of New York City, performed extensive data cleanup, and joined this data with the census data based on unique census tract IDs. I also created a dictionary to map the borough names with corresponding county codes and created a column in the final merged dataframe for these names.

All visualizations on this page used iterations of the final dataframe as the data source (for instance, I created several copies and trimmed only to include relevant columns). These visualizations are:

  • Bar chart of total population by borough
    • Performed a groupby() by borough, calculated size(), and used altair to produce the chart
  • Histogram of population density across NYC
    • Used altair to create the chart using count() for the y-axis
  • Map of the five NYC boroughs
    • Used matplotlib to create the map
  • Choropleth map of population density across NYC
    • Used hvPlot to create the chart with crs=3857, which also included a custom tooltip using Bokeh’s HoverTool customization and formatting options
  • Choropleth map of overall SVI across NYC
    • Used hvPlot to create the chart with crs=3857
  • Four static choropleth maps, one for each SVI theme across NYC
    • Used matplotlib to create the maps for each
  • Four interactive box and whisker plots, one for each SVI theme, data by borough
    • Performed a groupby() by borough, calculated size(), and used altair to produce each chart

Part 2

Corresponding Page: Part 2: Evaluating Accessibility to Hurricane Evacuation Centers

Part 2 of this project centered around a Pandana network analysis to explore walking access to evacuation centers from each intersection. Main steps included:

  • Creating a pandanas network
  • Loading data for the walkable street network using OSMnx and adding locations of the hurricane evacuation centers to the network
  • Mapping the walking distance to the nearest center with a maximum distance of 2000 meters, which involved the following:
    • For each point on the walking street network, I used network_nearest_poi to obtain distances from the nodes to the nearest evacuation center.
    • I merged coordinates of the network nodes with obtained distances to the nearest centers (in meters by default)

I used matploblib to create the static version of the walking accessibility map, and I used hvPlot for interactive version.

The code for all data wrangling, exploratory analysis, visualizations, and network analysis is provided in the Jupyter notebook in this project’s GitHub repository called finalproject_EDA_networkanalysis.ipynb

Part 3

Corresponding Page: Part 3: Mapping the Elements Together

Using the results from parts 1 and 2, I then created a map using Folium to show the centers and the walkable street network. The map includes a layer control toggle, allowing users to switch between different overlays for population density and social vulnerability, as well as toggle on/off the base layers of hurricane evacuation zones (proxy for hurricane flooding and other stormwater-related risks), and accessible nodes (a half mile or less from the nearest evacuation center).

The process of creating the folium map involved chaining facets of the map together using several blocks of folium.GeoJson for each part. It also involved creating a folium.FeatureGroup for the static base map layer to ensure that users would not be able to switch off the basemap for NYC. The full code that produced this map is provided in the Jupyter notebook in this project’s GitHub repository called folium_map_notebook.ipynb.

Note: Copies of both Jupyter notebooks with the same names are also provided in the final-project-jenna_epstein repository for MUSA550 final project submissions.

Next: Part 1

Updated: