For this project, I will be mapping data from the CalEnvironScreen 3.0 (https://oehha.ca.gov/calenviroscreen/report/calenviroscreen-30), which is the tool created by the Office of Environmental Health Hazard Assessment (OEHHA), on behalf of the California Environmental Protection Agency (CalEPA), to assist with Communities Environmental Health Screening. According to OEHAA, CalEnviroScreen is a screening methodology that can be used to help identify California communities that are disproportionately burdened by multiple sources of pollution. In a state-wide evaluation, the CalEnviroScreen risk score considers both population burden, which includes exposures and environmental effects, and population characteristics, which includes sensitive population and socioeconomic factors. This analysis will be situated in the City of Los Angeles.

This project utilizes the leaflet widget to create four maps. The first two explores the composite CalEnrivoScreen risk score and P.M. 2.5 concentration.These two maps will also show the locations of toxic release facilities, which comes from data collected by the Environmental Protection Agency’s Toxic Release Inventory Program (https://www.epa.gov/toxics-release-inventory-tri-program). The second two maps explore health outcomes such as asthma and low birth weight. These maps can be used to identify areas that are at higher risk of poor health outcomes and environmental exposure. I learned about spatial mapping using R from the Spatial Data Visualization for Global Health workshop hosted by Carrie Fahey, a Ph.D student at the UC Berkeley School of Public Health.

## OGR data source with driver: ESRI Shapefile 
## Source: "LA_census.shp", layer: "LA_census"
## with 632 features
## It has 22 fields
## Integer64 fields read as strings:  FID_1 Population ZIP

Section 1: This is a map of the CalEnviroScreen composite risk score in the city of Los Angeles, displayed using equal interval classification. The points displayed are the locations of the toxic release facilities. The pop-up for each census tract, which appears when the user hovers the mouse over it, displays the census tract number and the composite risk score.

pal <- colorBin("Reds", LA_census$CIscore, bins=4, pretty=F)

#layer control 
map1 <- leaflet(TRF_LA) %>%
  # Base groups
  addProviderTiles(providers$CartoDB) %>%
  # Overlay groups
  addPolygons(data = LA_census, color = c("grey"), weight = 0.5, smoothFactor = 0.5,
              fillColor = ~pal(CIscore),
              opacity = 1.0, fillOpacity = 0.7,
              label = ~paste0("tract #", TRACTCE, "| CES score: ", CIscore),
              popup = ~paste0("<b>", TRACTCE, "</b>", "<br>",
                              "CalEnvironScreen Risk Score: ", CIscore),
              highlightOptions = highlightOptions(color = "white",
                                                  weight = 2,
                                                  bringToFront = TRUE),
              group = "Census Tract") %>%
  # adding legends
  addLegend("bottomleft", pal = pal, values = ~LA_census$CIscore, opacity = 0.7,
            title = "CalEnvironScreen Risk Score",
            labFormat = labelFormat(suffix ="")
  ) %>%
  #adding point layer
  addCircleMarkers (~LONGITUDE, ~LATITUDE, radius = 5, color = c("white"), weight=0.8, opacity=1, 
                   fillColor="red", fillOpacity = 1, group = "TRF")%>%
  # Layers control
  addLayersControl(
    overlayGroups = c("Census Tract", "Toxic release facilities"),
    options = layersControlOptions(collapsed = FALSE)
  )
## Warning in validateCoords(lng, lat, funcName): Data contains 4 rows with
## either missing or invalid lat/lon values and will be ignored
# Render the "map" Widget
map1

####Note: the following maps are produced using similar codes as Map #1. To streamline the final output layout, these codes are not displayed.

Section 2: This is a map of the PM 2.5 concentration level in the city of Los Angeles, displayed using equal interval classification. The points displayed are the locations of the toxic release facilities. The pop-up for each census tract displays the census tract number and the PM 2.5 concentration level.

Section 3: This is a map of age-adjusted rate of emergency department visits for asthma displayed by census tract and using equal interval classification. The pop-up displays the census tract number and the asthma visit rates.

Section 4: This is a map of percent of low birth weight displayed by census tract and using equal interval classification. The pop-up displays the census tract number and percent of low birth weight

Based on these maps, we can see that certain areas of Los Angeles city have worse health outcomes and bear a heavier burden of environmental exposure. Thus, mapping these pattern will benefit our research project by visualizing the relationships between childhood cancer clusters and environmental exposure. Furthermore, R and leaflet can be used to communicate our findings to a broader audience, since these tools are more accessible than ArcGIS. Moving forward, I hope to explore other R packages that also create maps such as ggplot2, as well as methods to compare maps quantitatively in R.