library(tidyverse)
The goal of this exercise is to visualize health code violations in New York City restaurants.
library(mdsr)
Violations
## # A tibble: 480,621 x 16
## camis dba boro building street zipcode phone inspection_date action
## <int> <chr> <chr> <int> <chr> <int> <dbl> <dttm> <chr>
## 1 3.01e7 MORR~ BRONX 1007 MORRI~ 10462 7.19e9 2015-02-09 00:00:00 Viola~
## 2 3.01e7 MORR~ BRONX 1007 MORRI~ 10462 7.19e9 2014-03-03 00:00:00 Viola~
## 3 3.01e7 MORR~ BRONX 1007 MORRI~ 10462 7.19e9 2013-10-10 00:00:00 No vi~
## 4 3.01e7 MORR~ BRONX 1007 MORRI~ 10462 7.19e9 2013-09-11 00:00:00 Viola~
## 5 3.01e7 MORR~ BRONX 1007 MORRI~ 10462 7.19e9 2013-09-11 00:00:00 Viola~
## 6 3.01e7 MORR~ BRONX 1007 MORRI~ 10462 7.19e9 2013-08-14 00:00:00 Viola~
## 7 3.01e7 MORR~ BRONX 1007 MORRI~ 10462 7.19e9 2013-08-14 00:00:00 Viola~
## 8 3.01e7 MORR~ BRONX 1007 MORRI~ 10462 7.19e9 2013-08-14 00:00:00 Viola~
## 9 3.01e7 MORR~ BRONX 1007 MORRI~ 10462 7.19e9 2013-08-14 00:00:00 Viola~
## 10 3.01e7 MORR~ BRONX 1007 MORRI~ 10462 7.19e9 2013-08-14 00:00:00 Viola~
## # ... with 480,611 more rows, and 7 more variables: violation_code <chr>,
## # score <int>, grade <chr>, grade_date <dttm>, record_date <dttm>,
## # inspection_type <chr>, cuisine_code <dbl>
🚧 Following the instructions given in Section 18.6, Problem 1, modulo the following comments.
1.a. Geocoding
NA values for either lat or lon (nb. putting na.omit() into your pipeline will filter out all rows with NA values for any field.)1.b. Static Mapping
1.c. Interactive Mapping