library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.2.1 ✔ readr 2.2.0
## ✔ forcats 1.0.1 ✔ stringr 1.6.0
## ✔ ggplot2 4.0.3 ✔ tibble 3.3.1
## ✔ lubridate 1.9.5 ✔ tidyr 1.3.2
## ✔ purrr 1.2.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(readxl)
library(readr)
setwd("~/Desktop/Capstone Data Sets ")
air_quality <- read_csv("air_quality.csv")
## Rows: 527132 Columns: 11
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): district_id, air_quality_category, sensor_status
## dbl (7): pm25, pm10, no2, o3, co, synthetic_aqi, pollution_alert_flag
## dttm (1): timestamp
##
## ℹ 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.
#question 1 summary(data$x)
summary(air_quality$o3)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NAs
## 0.00 18.74 32.21 33.77 46.70 109.44 5441
Including Plots


## [1] NA
## [1] TRUE
## [1] 0.2766292