R PROGRAMMING Fatal Accidents

Description

I CANT upload the files because they are too big to upload.
We are using the data for 2019.2020,2021 on this website https://www.nhtsa.gov/file-downloads?p=nhtsa/downl…
we need the NationalCSV.zip
I actually started but I don’t have much knowledge about R studio the finish this.
Keep in mind it should not be very complicated.
Tables should be very neat and beautiful.
I can’t upload as Rmd file,thats why I uploaded as text.

Don't use plagiarized sources. Get Your Custom Assignment on
R PROGRAMMING Fatal Accidents
From as Little as $13/Page

This is what my professor gave me as a rubric

Fatal Accidents.

Imagine that you have been hired as a consultant to a state traffic agency. Your task is to provide

valuable insights to the agency on how to improve travel safety and identify factors associated with

fatal crashes. Your main resource for this task is the FARS dataset. Based on this data, what advice

will you provide to the district?

This assignment includes the following steps:

Introduction.
Reading and merging data.
Cleaning and preparing selected variables.
Posing questions related to the purpose of the analysis.
Exploring the variables
Creating tables to display variable counts and percentages.
Generating contingency tables for two or more variables
Comparing data for the US and NJ
Observing trends over three years
Creating graphs, such as bar graphs and boxplots (Age versus another variable)
Conclusion and prospects , to see if my graphs support it.

I need to have at least two more variables. He made a comment on the file I submit here.””Improve your table by adding captions. Avoid repetitions in tables. Last table needs the name of the county and not the codes”

He cares about the graphs and tables looking good a lot. If you can mark everything as the rubric above I will really appreciate it. An excellent project has a relevant introduction to data and questions with cited references. The variables are well-selected, and the codes used are simple and efficient with full comments. The tables are well-organized, annotated, and ordered properly, and explained in detail. The graphs used are suitable. All the questions are justified and answered properly.


Unformatted Attachment Preview


title: “My Data ”
author: “”
date: “2023”
output:
html_document:
toc: true
toc_depth: 3
editor_options:
markdown:
wrap: 72

# Introduction to Mydata
Prepare an introduction to the FARS data, collect information from the web and published papers on google scholar.
(about half page to one page)
Focusing on incidents involving impaired drivers, the Fatality Analysis Reporting System (FARS), managed by the National Highway Traffic Safety Administration (NHTSA), provides important insights into fatal crashes. Specifically, it offers detailed information on the dynamics of crashes where alcohol impairment is a causing factor. It provides a detailed look at critical factors like time of day and demographics related to crashes caused by drunk drivers. This information empowers researchers to identify patterns and design targeted interventions to reduce alcohol-related fatalities. FARS is a valuable resource, guiding efforts to address the ongoing challenge of drunk driving and promoting safer roadways. Through detailed analyses, we explore the complicated relationships between alcohol-involved crashes, demographic profiles, and evolving trends over time. In doing so, FARS becomes a record-keeper and a dynamic tool that informs evidence-based strategies, guides efforts to address the ongoing challenge of drunk driving, and helps create safer roadways.
Add an image of an accident. Describe what happens in the image.
“`{r , echo=FALSE, fig.cap=”Boxplot Diagram”, out.width = ‘75%’,fig.align = ‘center’}
knitr::include_graphics(“greenville.jpg”)
“`
“`{r , echo=FALSE, fig.cap=”Boxplot Diagram”, out.width = ‘75%’,fig.align = ‘center’}
knitr::include_graphics(“carrolton.jpg”)
“`
another example using snipe
“`{r , echo=FALSE, fig.cap=”Snipe Example”, out.width = ‘90%’,fig.align = ‘center’}
knitr::include_graphics(“new-city.jpg”)
“`
## Link to your data
Important step in reproduction For example The R project webpage:
**My data source** is obtained from this website [FARS data set
2021](https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars)
(https://abc7ny.com/clarkstown-north-high-school-teen-killed-dwi-alan-mendoza/10594724/)
(https://abcnews.go.com/US/30-years-27-died-worst-drunk-driving-crash/story?id=55119258)
(https://www.wcvb.com/article/drunk-driver-crossed-center-line-killing-man-seriously-injuring-another-nh-police-say/38412355)
## Questions/ Reasons
Identify few questions about your data that you would like to address.
Reasons that motivated you to select your data
# Packages
List and Load all packages that will be used in your project and include
one line comment explaining the nature of the list. For example: (dplyr:
to wrangle and manipulate data)
“`{r}
library(tidyverse)# this includes many data wrangling packages
library(dplyr) #this package is used for data manipulation
library(maps) # this package to draw maps
library(lubridate)# for date/time manipulation
library(descr) # to show feq for exploration
library(knitr)
“`
# reading the data
include a chunk to read the data and names
1. download data sets 2021, 2020, 2019 separately
2. read files accident form 2021, 2020 and 2019
and combine them in one file call that accident_all
show dim(file). How many rows and columns and use the
table(accidents_all$YEAR)
3. repeat same steps for the file person. Make sure to add the variable YEAR for 2021 , 2019 , 0r 2020
4. Filter NJ data for the combined accident and the combined person file.
Challenge question:
Write one function that reads all file in year 2021
“`{r, message=FALSE}
ac21
Purchase answer to see full
attachment