Row

Group Housing

Crowding

No Vehicle

Mobile Homes

Multi Unit

Minority

Single Parent

Senior

18-24 Year Olds

Children

Uninsured

Disabled

No Diploma

Unemployed

Poverty

Population Density

SVI Rank

Income Per Capita

Population Density

The Index

Foundations for Social Vulnerabiility

Because health outcomes and our ability to provide services to our citizens during times of emergency are affected by our understanding social, geographic and economic situations within and across communities, a tool was needed. The complexity of relationships between the social factors makes it difficult to see clearly the unique challenges and circumstances of individual communities. To help quantify and visualize the disparities, New Hampshire Department of Health and Human Services Department of Public Health Services, Bureau of Health Statistics and Data Management set about to designing a tool to do just that, using the resources and guidance of others before us.

The statistical methods for the social vulnerability were developed by my co-worker at New Hampshire Department of Health and Human Services, Dennis Holt, prior to my arrival at the state and can be seen at New Hampshire Social Vulnerability Index.

Work done on the New Hampshire portal, and this subsequent document, followed the guidelines set for the the U.S. Centers for Disease Control (2) in Since joining the team I have helped refactor the initial script which exported a simple csv file adding new indicators within the module, restructuring the appearance and converting this from an ESRI ArcGISOnline map to a self-contained mapping application which we can host directly on our own website.

St Louis Maps

This particular series of maps grew out my dissatisfaction with social and politic events of the last year. I kept hearing from friends and loved ones how wonderful a place St Louis is to live, then seeing on the new a story which painted a clearly different picture for many of the cities residents. My aim was simply to see for myself what might be contributing to the disparate situations I had heard about and to try understand them better. I used the work we had done for my home state to increase my awareness about the unique situations and social vulnerabilities for people building lives in St Louis.

Although not trivial work, this kind of index could be converted relatively quickly to reflect any given state, county or metropolitan area with some minor adjustments to this code and the four other scripts which gathered, modeled sorted and structure the data the mapping scripts pull together.

References

Flanagan, B.E., Gregory, E.W., Hallisey, E.J., Heitgerd, J.L., and Lewis, B. (2011). A social vulnerability index for disaster management. Journal of Homeland Security and Emergency Management: Vol. 8: Iss. 1, Article 3

“NH Social Vulnerability Overview.” Nhvieww.maps.arcgis.com. New Hampshire Department of Health and Human Services, Division of Public Health Services, Web. 03 Oct. 2017.

Code

library(leaflet)
library(magrittr)
load("popupSTL.RData")



indicator = plotMerge$popDensity
vals = (indicator)

legendOutput <- leaflet::colorBin(("YlOrBr"),domain = indicator, bin=cBins(indicator), pretty=FALSE, reverse = TRUE)

leaflet()%>%
  mapOptions(zoomToLimits = "first")%>%
  addProviderTiles(providers$CartoDB.Positron,
                   options=providerTileOptions(minZoom=9, maxZoom =16))%>%
  #setView(lng = -90.1194, lat = 38.627350, zoom =11.75)%>%
  addPolygons(data = plotMerge,
              fillOpacity = .80,
              fillColor = ~legendOutput(popDensity),
              color = "#555555",
              weight = 0.5,
              popup=popup3, 
              popupOptions =popupOptions(maxHeight = 350 , minWidth = 350, autoPan =FALSE, autoPanPadding=c(1,1), closeOnClick = TRUE))%>%
   
   addLegend(pal= legendOutput,
             values  = round(vals,2),
             opacity= .80,
             labFormat = labelFormat(suffix = '  per mile^2', digits=0),
             position = "topright",
             title = "<center>Tract Populations Density </br>(people per square mile)</center>")

Creating Index

This code represents the final 5% - 10% of the work which went into gathering, structuring and producing the Social Vulnerability Maps. The data and polygons for this project were pulled from American Community Survey using the fabulous package acsmade by the renowned urban planner, Ezra Glenn, at Massachusetts Institute of Technology and tigris.

The data has been stored in two SpatialPolygonsDataFrame objects which were called using load().SpatialPolygonsDataFrame is a data structure specifically used to store geographic data, it is an S4 class of object and takes on methods specifically designed to address the structure and data stored in it.

Originally individual maps were generated using a function, which called a variety of other functions.

One was used to generate 3 types of necessary binning methods for categorizing levels of data, coloring the individual tracts and conveying levels to the legends.

Another built the popup, which we are simply calling up using load("popupSTL.RData") This is simply a very long string containing HTML code used to build the tables and insert the .svg chart, a popup is built for each associated tract with tract specific data.

A loop was used to iterate through a list of indicators, calling the appropriate binning function for each and producing a free-standing HTML page which we could insert using iFrames, directly into our own site.

In this case, I opted to call each map separately, setting indicator equal to the desired measure and inserting each one directly into the web dashboard.

Getting the basic map up and running is relatively simple (on a scale of 1-5 in R I would say 4.5), but tuning them to perform as you hope and play nicely within the scope of the dashboards requires pretty intense research, tweaking and debugging.