ID: 10e974e5
This package allows users to make an analysis of the road accidents in the Lombardy region from 2010 to 2016. It is possible to calculate the mean for injured and dead people in a specific district or in a specific year.
# first install the R package "devtools" if not installed
devtools::install_github('unimi-dse/10e974e5')
# load the package
require(roadaccidents)
The project provides a dataset which is imported from the Regione Lombardia website (Open Data), https://dati.lombardia.it.
The dataset is compsed by 490 observations and 8 variables:
- anno incidente: year of the accidents
- codice istat provincia: identification code for the district
- provincia: district
- codice istat comune: identification code for the city
- comune: city
- numero incidenti: number of accidents
- totale morti: total number of dead people
- totale feriti: total number of injured people
It is possible to see the documentation of the developed functions using:
?getDataset()
?year_dead()
?year_injured()
?district_dead()
?district_injured()
?roadaccidents()
To run the Shiny App use the function:
# Run Shiny App
roadaccidents()
- R language
- Shiny App
Antonella D'Amico