Introduction

This code through explores the Number of Accidents by Time and Day


Content Overview

Specifically, we’ll explain and demonstrate the caracteristics of traffic accident in Tempe.


Why You Should Care

This topic is valuable especially for those who live in Tempe because it is important to know the time and days with higher traffic accident.


Learning Objectives

Specifically, you’ll learn how to use data to visualy communicate some real facts



Body Title

Here, we’ll show the Number of Accidents by Time and Day through a heatmap

# ggplot(sub_day, aes(hour, day, fill= n)) + 
#        geom_tile() +
#        scale_fill_gradient(low="white", high="blue")


Advanced Examples

More specifically, you first need to replace les differents variables with the imputs id chpices

# sub_day<-d3[d3$day==input$days & d3$hour==input$hour, ]


Furthermore the count function should count the different variable of interest

# d3 <- 
#  dat %>% 
#  count( hour, day )


Most notably, it’s valuable to remove all NA with

# d3 <- na.omit( d3 )

Further Resources

Learn more about [package, technique, dataset] with the following:




Works Cited

This code through references and cites the following sources: