wic <- read.csv("C:/Users/chrys/Documents/GitHub/DEM7093/data/wic_west_side.csv")
groc <- read.csv("C:/Users/chrys/Documents/GitHub/DEM7093/data/groc_west_side.csv")
wic <- wic[c(6, 12:14)]
groc <- groc[c(6, 12:14)]
names(wic)<-c("street", "city", "st", "zip")
names(groc)<-c("street", "city", "st", "zip")
library(censusxy)
results.wic<-cxy_geocode(wic,
street = "street",
city = "city",
state ="st",
zip = "zip",
class="sf",
output = "simple")
## Loading required namespace: sf
## 25 rows removed to create an sf object. These were addresses that the geocoder could not match.
results.wic$layer <- "WIC Services"
results.groc<-cxy_geocode(groc,
street = "street",
city = "city",
state ="st",
zip = "zip",
class="sf",
output = "simple")
## 27 rows removed to create an sf object. These were addresses that the geocoder could not match.
results.groc$layer <- "Grocery Stores"
results <- rbind(results.wic, results.groc)
The Census geocoding service correctly geocoded: WIC Addresses: 75.5% (77/102) Grocery Stores: 53.4% (31/58)
library(mapview)
mapview(results, zcol = "layer", burst = TRUE)