#|message: false
#|warning: false
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(readr)
library(plotly)
Attaching package: 'plotly'
The following object is masked from 'package:ggplot2':
last_plot
The following object is masked from 'package:stats':
filter
The following object is masked from 'package:graphics':
layout
raw_data<- read.csv("infantmortality.csv")
glimpse(raw_data)Rows: 60
Columns: 9
$ Year <int> 2016, 2016, 2016, 2016, 2016, 2016, 2015, …
$ Maternal.Race.or.Ethnicity <chr> "Puerto Rican", "Asian and Pacific Islande…
$ Infant.Mortality.Rate <dbl> 3.4, 2.9, NA, 8.0, 2.6, 3.8, 6.1, 2.7, NA,…
$ Neonatal.Mortality.Rate <dbl> 2.4, 2.0, NA, 4.9, 1.6, 2.4, 4.5, 1.8, NA,…
$ Postneonatal.Mortality.Rate <dbl> NA, 0.9, NA, 3.2, 1.0, 1.4, 1.6, 0.9, NA, …
$ Infant.Deaths <int> 24, 62, NA, 180, 105, 102, 46, 110, NA, 18…
$ Neonatal.Infant.Deaths <int> 17, 43, NA, 109, 65, 65, 34, 75, NA, 112, …
$ Postneonatal.Infant.Deaths <int> 7, 19, NA, 71, 40, 37, 12, 35, NA, 74, 21,…
$ Number.of.Live.Births <int> 7159, 21566, 1534, 22465, 40633, 26915, 75…