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 × 16
## camis dba boro build…¹ street zipcode phone inspection_date action
## <int> <chr> <chr> <int> <chr> <int> <dbl> <dttm> <chr>
## 1 30075445 MORR… BRONX 1007 MORRI… 10462 7.19e9 2015-02-09 00:00:00 Viola…
## 2 30075445 MORR… BRONX 1007 MORRI… 10462 7.19e9 2014-03-03 00:00:00 Viola…
## 3 30075445 MORR… BRONX 1007 MORRI… 10462 7.19e9 2013-10-10 00:00:00 No vi…
## 4 30075445 MORR… BRONX 1007 MORRI… 10462 7.19e9 2013-09-11 00:00:00 Viola…
## 5 30075445 MORR… BRONX 1007 MORRI… 10462 7.19e9 2013-09-11 00:00:00 Viola…
## 6 30075445 MORR… BRONX 1007 MORRI… 10462 7.19e9 2013-08-14 00:00:00 Viola…
## 7 30075445 MORR… BRONX 1007 MORRI… 10462 7.19e9 2013-08-14 00:00:00 Viola…
## 8 30075445 MORR… BRONX 1007 MORRI… 10462 7.19e9 2013-08-14 00:00:00 Viola…
## 9 30075445 MORR… BRONX 1007 MORRI… 10462 7.19e9 2013-08-14 00:00:00 Viola…
## 10 30075445 MORR… BRONX 1007 MORRI… 10462 7.19e9 2013-08-14 00:00:00 Viola…
## # … with 480,611 more rows, 7 more variables: violation_code <chr>,
## # score <int>, grade <chr>, grade_date <dttm>, record_date <dttm>,
## # inspection_type <chr>, cuisine_code <dbl>, and abbreviated variable name
## # ¹building
🚧 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