Pin in the correct map first with different state boundary line.

#install.packages("readxl")
library(readxl)
library(RColorBrewer)
# add landfill
lf <-read_excel("/Users/joanneyang/Documents/HU/512-51-B-2020-Spring-DataVisualization/Assign-maps/lmopdata.xlsx") 
## New names:
## * `` -> ...3
lf2 <-read_excel("/Users/joanneyang/Documents/HU/512-51-B-2020-Spring-DataVisualization/Assign-maps/lmopdata-2.xlsx") 
#summary(lf2)
#View(lf2)
# add interaction with density of population
bins <- c(0, 10, 20, 50, 100, 200, 500, 1000, Inf)
pal <- colorBin("YlOrRd", domain = states$density, bins = bins)

m %>% setView(-100,40.8,zoom=3.5) %>%
  addCircleMarkers(data=lf2,radius = 4,weight = .3)
## Assuming "Longitude" and "Latitude" are longitude and latitude, respectively
## Warning in validateCoords(lng, lat, funcName): Data contains 332 rows with
## either missing or invalid lat/lon values and will be ignored

Create and pin the landfill locations in the map that I pinned from the last step.

## Assuming "Longitude" and "Latitude" are longitude and latitude, respectively
## Warning in validateCoords(lng, lat, funcName): Data contains 332 rows with
## either missing or invalid lat/lon values and will be ignored

Map with different current landfill status including closed, open, and unknow.

## Warning in is.na(values): is.na() applied to non-(list or vector) of type
## 'closure'
## Assuming "Longitude" and "Latitude" are longitude and latitude, respectively
## Warning in validateCoords(lng, lat, funcName): Data contains 332 rows with
## either missing or invalid lat/lon values and will be ignored

From the last map, add another layer, population density, to see if there’s a relationship between the two. From the map, we can see in the map above, which makes sense that we do have more landfills where we have the higher population density.

## Assuming "Longitude" and "Latitude" are longitude and latitude, respectively
## Warning in validateCoords(lng, lat, funcName): Data contains 332 rows with
## either missing or invalid lat/lon values and will be ignored

In this map, I’d like to see the allocation between the amount of waste compared to the number of landfills. I was expecting they’re in a positive relationship; however, as we can see in the map, only North Carolina matches my estimation.