I’ve been thinking about this for a while, and finally took a few evenings to do it. I built a Mastodon bot that toots each Grand Forks 311 request: https://botsin.space/@hackgfk_311. It also crossposts at https://twitter.com/hackgfk_311.
The code can be found at https://github.com/mattbk/hack-grand-forks. Yes, I built it in R.
Why “hack”? In the sense that this is information that should be more available to people, and I’m making it more available without going to a separate location. Perhaps something good can come of it.
If you try to use
sum() directly in
raster::aggregate() and have
NA values, you’ll get
NA as a result. You need to build a tiny function and pass the
rm.na=T command to
sum(). More succintly:
# Dissolve duplicate geometries and sum OOIP
fm <- raster::aggregate(fm.raw,
a <- data.frame(name=old$NAME)
a$status <- "old"
b <- data.frame(name=allfields[allfields$StateAbbre=="ND",]$name)
b$status <- "new"
Make two data frames, one for each list, create a column identifying each one (
old), then join on the common column (
See also: http://stackoverflow.com/questions/17598134/compare-two-lists-in-r/17599048#17599048