Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# n_infractions: numbers of infractions committed at a particular date of inspection
closure_n_infractions <- closure %>%
group_by(camis,date) %>%
summarise(n_infractions = n())%>%
# n_closures: number of closures a restaurant has had within the past 5 years.
closure_n_closures <- closure_n_infractions %>%
summarise(n_closures = n())%>%
# days_diff: number of days a restaurant took to reopen after being closed by the Health Department
dates_diff <- overall_unique_closed_noreclose %>%
mutate(days_diff = date[action=='closed'][1] - date[action=='reopened'][1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.