knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
This vignette is a brief explanation of this package.
The project is an interface that allow firem men from New York to quickly access and visualize informations about the pas incidents in New York City.
It takes the form of a Shiny app that can be run using the function run_app()
.
The Shiny app contains 3 'main' tabs : - Project - App - Authors
A brief description of the project.
The main app.
Appears on the left hand side.
Filters used to filter the data set to analyse.
Allow the user to choose the map to display
The map on which some infos are displayed.
Some ineresting and useful statistic from the filtered data
The complete list of the incidents (that follow the filter)
Some nice information about the authors of this marvellous project.
It take as an input the full tidy_incidents
df.
This is the function that returns the two data frame to be displayed :
- Statistics
- Full filtered datas
In order to do so it filters the data using the input
from the Shiny ui using filter_fdny
.
Then it compute some statistic on this data frame using : get-[...]
functions, build_stat_df
It plot the leaflet map of the project.
Depending on wether the user choose to plot the firebox :
- If yes it plots the fire box map using plot_firebox
function.
- If no it choose is the correct column for which it should draw a zip-code dependent heatmap.
Plot the firebox as dot of different size and color : - The bigger the more incidents happened at this fire box relative to other (in the filtered data) - The more red (to oppose to green) the longer the incident duration was (in the filtered data)
This shiny app is at the same time a usefule project that would worth to be worked on and improved even after the assignment ends, but also a really good project that allow us to put into application all the skills learned in the R course : - Dplyr data manipulation and combination - functionnal programming - unit testing - maps manipulations - building of a shiny app
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.