This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.2.2
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6 ✔ purrr 0.3.5
## ✔ tibble 3.1.8 ✔ dplyr 1.0.10
## ✔ tidyr 1.2.1 ✔ stringr 1.4.1
## ✔ readr 2.1.3 ✔ forcats 0.5.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
library(stats)
data<-read_csv('TH05_20221019-212413.csv');
## Rows: 11 Columns: 2
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (2): Years, Traffic accidents with the participation of drunk drivers De...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# 1. Go to https://andmed.stat.ee/en/stat and create a data set you want to explore. Import the data into R.
#2. Prepare EDA (Explanatory Data Analysis). Write at least 5 questions and provide your answers during the first stage of EDA.
# Q1- which month data was taken place
# 1- Ans December
#Q2 - what was the years range of data set
#2 - 2002 - 2012 (10 years data set)
#Q3 was the years accidents with the participat drunk drivers December increased
#3 It was increased and decreased year wise
#Q4 Data was perfect example data analysis
# No it was not mention which age grouped and gender for me it was
#Q5 Discrete uniform distribution
# No
summary(data)
## Years
## Min. :2002
## 1st Qu.:2004
## Median :2007
## Mean :2007
## 3rd Qu.:2010
## Max. :2012
## Traffic accidents with the participation of drunk drivers December
## Min. : 7.00
## 1st Qu.:13.00
## Median :19.00
## Mean :24.27
## 3rd Qu.:33.50
## Max. :59.00
str(data)
## spec_tbl_df [11 × 2] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
## $ Years : num [1:11] 2002 2003 2004 2005 2006 ...
## $ Traffic accidents with the participation of drunk drivers December: num [1:11] 34 25 33 19 59 35 19 10 7 15 ...
## - attr(*, "spec")=
## .. cols(
## .. Years = col_double(),
## .. `Traffic accidents with the participation of drunk drivers December` = col_double()
## .. )
## - attr(*, "problems")=<externalptr>
You can also embed plots, for example: