/newpage

Milestone #2

1.Description of data set.

What is the data source? (1-2 sentences on where the data is coming from, dates included, etc.)

How does the data set relate to the group problem statement and question? The mortality data set is from the provisional mortality statistics by multiple causes of death available on WONDER from 2018 and later. The mortality data includes all death certificates filed in the 50 states and the District of Columbia. Death of non-resident and fetal deaths have been excluded.The population data set. The population data figures are available by single race categories, different from the mortality date related to 2018-2020 data. The Medicare and Medicaid data on health expenditures in the US and the original data set is from the Kaiser Family Medical Foundation.the primary source for these data is from the Centers for Medicare & Medicaid Services, Office of Enterprise Data and Analytics, and Chronic Conditions Data Warehouse.

In this data set, we have access to population data from different states and age groups and information about diseases and mortality rates. Additionally, we have data on the expenditure of beneficiaries enrolled in the two CMS programs. The data set would enable us to analyze various variables and compare how mortality rates relate to healthcare expenditures in the United States. With the state variable, we could also analyze if there is a difference in public healthcare expenditures across various states in the US.

#Install necessary packages

library(dplyr)
library(tidyverse)

##1.Import statements for all datasets

NOTE: Please use datasets available in the PHW251 Project Data github repo Links to an external site. (this is important to make sure everyone is using the same datasets)

Use appropriate import function and package based on the type of file Utilize function arguments to control relevant components (i.e. change column types, column names, missing values, etc.)

Document the import process

#Import statements for mortality,population and medicare data sets
mortality_data<-read_csv('cdc_wonder_mortality.csv',col_names = TRUE, col_types = NULL)

population_data<-read_csv('cdc_wonder_population.csv',col_names = TRUE, col_types= NULL)

medicare_data<-read_csv('kff_cms_medicare_state_summary.csv',col_names = TRUE, col_types = NULL)
medicare_data<-as.data.frame(medicare_data)

/newpage

##2.Clean up column names (recommend using snake case, which is lower case text with underscores between words)

#Clean up column names
mortality_data_1<-mortality_data 
mortality_data_1 <- mortality_data %>%
  rename(disease = "UCD - ICD Sub-Chapter")
colnames(mortality_data_1) <- gsub("[-/ ]", "_", tolower(colnames(mortality_data_1)))


population_data_1<-population_data
colnames(population_data_1) <- gsub("[-/ ]", "_", tolower(colnames(population_data_1)))

medicare_data_1<-medicare_data
colnames(medicare_data_1) <- gsub("[-/ ]", "_", tolower(colnames(medicare_data_1)))

/newpage

##3.Identify data types for 5+ data elements/columns/variables Identify 5+ data elements required for your specified scenario. If <5 elements are required to complete the analysis, please choose additional variables of interest in the data set to explore in this milestone. Utilize functions or resources in RStudio to determine the types of each data element (i.e. character, numeric, factor) Identify the desired type/format for each variable—will you need to convert any columns to numeric or another type?

ANSWERS Data elements with character as data type and are required for this study: residence_state disease ten_year_age_groups total_medicare_part_a_and_or_part_b_program_payments total_medicare_part_b_program_payments total_medicare_part_a_program_payments

Data elements with numeric double as data type and are required for this study: deaths population total_traditional_medicare_part_a_and_or_part_b_enrollees total_medicare_part_a_and_or_part_b_persons_with_utilization total_traditional_medicare_part_a_enrollees total_traditional_medicare_part_b_enrollees total_medicare_part_a_persons_with_utilization total_medicare_part_b_persons_with_utilization

Columns that need to be converted to numeric: In medicare_data_1,

total_medicare_part_a_and_or_part_b_program_payments total_medicare_part_b_program_payments total_medicare_part_a_program_payments

str(mortality_data_1)
## spc_tbl_ [14,688 × 7] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
##  $ residence_state           : chr [1:14688] "Alabama" "Alabama" "Alabama" "Alabama" ...
##  $ residence_state_code      : chr [1:14688] "01" "01" "01" "01" ...
##  $ disease                   : chr [1:14688] "Intestinal infectious diseases" "Intestinal infectious diseases" "Intestinal infectious diseases" "Intestinal infectious diseases" ...
##  $ ucd___icd_sub_chapter_code: chr [1:14688] "A00-A09" "A00-A09" "A00-A09" "A00-A09" ...
##  $ ten_year_age_groups       : chr [1:14688] "55-64 years" "65-74 years" "75-84 years" "85+ years" ...
##  $ ten_year_age_groups_code  : chr [1:14688] "55-64" "65-74" "75-84" "85+" ...
##  $ deaths                    : num [1:14688] 15 28 42 25 17 38 94 232 379 296 ...
##  - attr(*, "spec")=
##   .. cols(
##   ..   `Residence State` = col_character(),
##   ..   `Residence State Code` = col_character(),
##   ..   `UCD - ICD Sub-Chapter` = col_character(),
##   ..   `UCD - ICD Sub-Chapter Code` = col_character(),
##   ..   `Ten-Year Age Groups` = col_character(),
##   ..   `Ten-Year Age Groups Code` = col_character(),
##   ..   Deaths = col_double()
##   .. )
##  - attr(*, "problems")=<externalptr>
str(population_data_1)
## spc_tbl_ [515 × 3] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
##  $ state              : chr [1:515] "01-Alabama" "01-Alabama" "01-Alabama" "01-Alabama" ...
##  $ ten_year_age_groups: chr [1:515] "55-64 years" "65-74 years" "75-84 years" "85+ years" ...
##  $ population         : num [1:515] 672373 541944 261671 85202 656423 ...
##  - attr(*, "spec")=
##   .. cols(
##   ..   State = col_character(),
##   ..   `Ten-Year Age Groups` = col_character(),
##   ..   Population = col_double()
##   .. )
##  - attr(*, "problems")=<externalptr>
str(medicare_data_1)
## 'data.frame':    52 obs. of  10 variables:
##  $ location                                                    : chr  "UNITED STATES" "ALABAMA" "ALASKA" "ARIZONA" ...
##  $ total_traditional_medicare_part_a_and_or_part_b_enrollees   : num  35681342 528983 105831 767513 430724 ...
##  $ total_medicare_part_a_and_or_part_b_persons_with_utilization: num  33193839 512627 90717 720762 409441 ...
##  $ total_medicare_part_a_and_or_part_b_program_payments        : chr  "$395,342,489,207" "$5,653,598,984" "$1,051,813,241" "$7,745,898,078" ...
##  $ total_traditional_medicare_part_a_enrollees                 : num  35377335 522820 105399 757650 429009 ...
##  $ total_medicare_part_a_persons_with_utilization              : num  6627749 116144 13055 135153 81568 ...
##  $ total_medicare_part_a_program_payments                      : chr  "$187,231,365,080" "$2,684,356,995" "$467,738,024" "$3,352,520,020" ...
##  $ total_traditional_medicare_part_b_enrollees                 : num  30726771 456357 93234 662898 384774 ...
##  $ total_medicare_part_b_persons_with_utilization              : num  32592838 499789 89885 703776 403599 ...
##  $ total_medicare_part_b_program_payments                      : chr  "$208,111,124,126" "$2,969,241,988" "$584,075,217" "$4,393,378,059" ...

/newpage

##4. Provide a basic description of the 5+ data elements

Considering the data set is not clean now based on our goal. We chose the following functions to perform in our data.

#summaries mortality data
 mortality_glimpse <- glimpse(mortality_data_1)
## Rows: 14,688
## Columns: 7
## $ residence_state            <chr> "Alabama", "Alabama", "Alabama", "Alabama",…
## $ residence_state_code       <chr> "01", "01", "01", "01", "01", "01", "01", "…
## $ disease                    <chr> "Intestinal infectious diseases", "Intestin…
## $ ucd___icd_sub_chapter_code <chr> "A00-A09", "A00-A09", "A00-A09", "A00-A09",…
## $ ten_year_age_groups        <chr> "55-64 years", "65-74 years", "75-84 years"…
## $ ten_year_age_groups_code   <chr> "55-64", "65-74", "75-84", "85+", "25-34", …
## $ deaths                     <dbl> 15, 28, 42, 25, 17, 38, 94, 232, 379, 296, …
# grouping the data by their age range 
population_mean<- population_data_1 %>% group_by(ten_year_age_groups) %>%
summarize_all(mean)

 
# Exclude the first row and calculate the mean of enrollees
mean_enrollees <- round(mean(medicare_data_1$total_traditional_medicare_part_a_and_or_part_b_enrollees[-1]),0)


# Calculate the median of enrollees (excluding the first row)
median_enrollees <- median(medicare_data_1$total_traditional_medicare_part_a_and_or_part_b_enrollees[-1])


# Calculate the range of enrollees (excluding the first row)
range_enrollees <- max(medicare_data_1$total_traditional_medicare_part_a_and_or_part_b_enrollees[-1]) - min(medicare_data_1$total_traditional_medicare_part_a_and_or_part_b_enrollees[-1])

/newpage

##5. Describe cleaning that each data source may need.

A. The group with less than 1 year age may need to be removed. B. The total spending figures may need to be converted into readable numbers to make them easier to interpret.. C. We need to eliminate the states with NA information. D. We should Check for and remove duplicate rows if they exist. E. We should make sure that data types of columns are appropriate.

/newpage

MILESTONE #3

##Part -I Subsetting age group from 65-74 and 75-85 for data sets-CDC_wonder_mortality,CDC_wonder_population, kff_cms_medicare_state_summary changing columns and states in to two different columns Variable #1 aggregate of population for each age group Variable #2 aggregate death for each group to calculate mean death rate

#Subsetting datasets into required age groups and separting columns into state and ID
library(tidyr)
#A. subset population dataset by separating the state column into ID and state

population1<- separate(population_data_1, col = state, into = c("id", "state"), sep = "-")

# filtering age groups into 65-74, 75-85, and 85+
population1 <- population1 %>%
  filter(`ten_year_age_groups` >= 65)

population1<- separate(population1, col = `ten_year_age_groups` , into = c("ten_year_age_groups" , "years"), sep = " ")
population1$years<-NULL

#B.Subset mortality data set into same age groups as of population dataset

mortality1 <- mortality_data_1 %>%
  filter(ten_year_age_groups >= 65) %>% 
  rename(id= residence_state_code)

mortality1<- separate(mortality1, col = `ten_year_age_groups` , into = c('ten_year_age_groups' , "years"), sep = " ")
mortality1$years<-NULL

mortality1<-mortality1%>%rename(state="residence_state")

##cleaning Dataframe Medicare:

# Rename "Location" to "State"in Medicare data frame
medicare1 <- medicare_data_1 %>%
  rename(state = location)

# Change the index of the United States from 1 to "total"
medicare1$state[medicare1$State == "UNITED STATES"] <- "Z"

# Convert state names to title case (e.g., "ALABAMA" to "Alabama")
medicare1$state <- tolower(medicare1$state)
medicare1$state <- stringr::str_to_title(medicare1$state)
medicare1$state <- ifelse(medicare1$state == "District Of Columbia", "District of Columbia", medicare1$state)

# Create a data frame with the mapping of state names to index values
medicare1 <- medicare1 %>%
  arrange(state) %>%  # Sort the data frame by state name
  mutate(id = 1:n())

#creating numeric columns

medicare1$total_medicare_part_a_program_payments <- as.numeric(gsub("\\$","",gsub
                                                                    (",","", medicare1$total_medicare_part_a_program_payments)))
medicare1$total_medicare_part_b_program_payments <- as.numeric(gsub("\\$","",gsub
                                                                    (",","", medicare1$total_medicare_part_b_program_payments)))

medicare1$total_medicare_part_a_and_or_part_b_program_payments <- as.numeric(gsub("\\$","",gsub(",","", medicare1$total_medicare_part_b_program_payments))) 

medicare1$total_medicare_part_a_and_or_part_b_program_payments <- as.numeric(gsub("\\$","",gsub(",","", medicare1$total_medicare_part_b_program_payments)))

#percentage of spending of each of part A and part B
medicare1 <- medicare1 %>%
  mutate(Total_Spending_AB = total_medicare_part_a_program_payments + total_medicare_part_b_program_payments,
         Percentage_Part_A = (total_medicare_part_a_program_payments / Total_Spending_AB) * 100,
         Percentage_Part_B = (total_medicare_part_b_program_payments / Total_Spending_AB) * 100)

medicare1$state[medicare1$state=="Z"]<-"Total"

medicare_clean<-medicare1%>%select(-total_traditional_medicare_part_a_enrollees,-total_medicare_part_a_persons_with_utilization,
                                   -total_medicare_part_a_program_payments,-total_traditional_medicare_part_b_enrollees,
                                   -total_medicare_part_b_persons_with_utilization,-total_medicare_part_b_program_payments)%>%
  rename(total_payments_AB="total_medicare_part_a_and_or_part_b_program_payments",
         utilization="total_medicare_part_a_and_or_part_b_persons_with_utilization",
         enrollees="total_traditional_medicare_part_a_and_or_part_b_enrollees")

medicare_clean<-medicare_clean%>%mutate(percent=round((utilization/enrollees)*100,2))%>%
  select(id,everything())
 medicare_clean$total_payments<-as.numeric(gsub("\\$","",gsub(",","",medicare_clean$total_payments)))

##Merging data sets mortality1 and population1 to calculate death rate for each age group and calculate the mean

pop_mortality<-merge(x=mortality1,y=population1, by.x=c("id","state","ten_year_age_groups"), 
      by.y=c("id","state","ten_year_age_groups"))

##Create two new variables-resubmitting for grading Teams will be asked to aggregate mortality data for a chosen category of cause of death and age group, calculate mortality rate for the specified cause and age group, and compare with a population-adjusted measure of Medicare utilization/enrollment.

#cause of death in 65+ age group with highest number of deaths 
mortality1cause <- mortality1 %>%
  #mutate(ten_year_age_groups = "65+") %>% 
  group_by(state, disease) %>%
  summarize(total_death_per_cause = sum(deaths)) %>% 
  group_by(state) %>% 
  top_n(1, total_death_per_cause) %>% #disease with highest number of deaths
  arrange(state, total_death_per_cause) 

# total population 65+ age group in each state
population2 <- population1 %>% 
  group_by(state) %>%
  summarize (total_population = sum (population))

#join 
mortality1cause <- full_join (x=population2, y=mortality1cause, by = "state")

#mortality rate for specified cause in 65+ age group with highest number of deaths
mortality1cause <- mortality1cause %>%
  mutate (mortality_rate_per_1000 = 1000*(total_death_per_cause/total_population)) 
  
#total spending per enrollee:
medicare1 <- medicare1 %>%
  mutate(Total_Spending_Per_Enrollee = Total_Spending_AB / total_traditional_medicare_part_a_and_or_part_b_enrollees) 

medicare2 <- medicare1 %>% select (state, Total_Spending_Per_Enrollee)

mortality1cause <- full_join (medicare2, y=mortality1cause, by = "state")

state_deaths<-pop_mortality %>%select(c(id,state,ten_year_age_groups,deaths,population,`disease`))%>%
  group_by(state,`ten_year_age_groups`) %>%
 mutate(total_deaths = sum(deaths, na.rm = TRUE),
            total_population = sum(population, na.rm = TRUE))

#state_deaths<-state_deaths %>%
#  mutate(age_category = ifelse(`ten_year_age_groups` >= 65, "65+", #as.character(`ten_year_age_groups`,`id`))) %>% 
#  select(-`ten_year_age_groups`) %>%
#  rename (above_65 = age_category)
#
#state_deaths %>%
#  group_by(state, `ten_year_age_groups`) %>%
#  summarize(mean_death = mean(total_deaths, na.rm = TRUE))

##Clean variables needed for analysis (minimum 2) Examples Recode invalid values Handle missing data Recode categories Data re-structured as needed (aggregated/summarized and/or pivoted)

#checking for number of NA
#sum(is.na(state_deaths$Deaths))
#sum(is.na(state_deaths$ID))
#sum(is.na(state_deaths$State))
#sum(is.na(state_deaths$'Ten-Year Age Groups'))
#sum(is.na(state_deaths$Population))
#sum(is.na(state_deaths$'UCD - ICD Sub-Chapter'))
#sum(is.na(state_deaths$total_population))
#sum(is.na(state_deaths$total_deaths))
#sum(is.na(medicare1$State))
#sum(is.na(medicare1$total_traditional_medicare_part_a_and_or_part_b_enrollees))
#sum(is.na(medicare1$total_medicare_part_a_and_or_part_b_persons_with_utilization))
#sum(is.na(medicare1$total_medicare_part_a_and_or_part_b_program_payments))
#sum(is.na(medicare1$total_traditional_medicare_part_a_enrollees))
#sum(is.na(medicare1$total_medicare_part_a_persons_with_utilization))
#sum(is.na(medicare1$total_medicare_part_a_program_payments))
#sum(is.na(medicare1$total_traditional_medicare_part_b_enrollees))
#sum(is.na(medicare1$total_medicare_part_b_persons_with_utilization))
#sum(is.na(medicare1$total_medicare_part_b_program_payments))
#sum(is.na(medicare1$ID))
#sum(is.na(pop_mortality$ID))
#sum(is.na(pop_mortality$State))
#sum(is.na(pop_mortality$`Ten-Year Age Groups`))
#sum(is.na(pop_mortality$`UCD - ICD Sub-Chapter`))
#sum(is.na(pop_mortality$`UCD - ICD Sub-Chapter Code`))
#sum(is.na(pop_mortality$`Ten-Year Age Groups Code`))
#sum(is.na(pop_mortality$Deaths))
#sum(is.na(pop_mortality$Population))

0 NA’s found across all columns of state_deaths, pop_mortality, and medicare1.

Data dictionary based on clean dataset (minimum 4 data elements), including:

ID Variable name Data type Description

  1. population_mean, Numeric, describes the ten year age groups means

  2. range_enrollees, Numeric, calculated from min and max of medicare data

  3. median_enrollee, Numeric, calculated from total traditional medicare enrollees

  4. total_death, Numeric, total death of each ten year age group in each state

  5. Mortality_rate/ 1000 Numeric, Total deaths that occured per 1000 enrollees

  6. Total death per cause Numeric, Total deaths that occurred per specific disease/UCD-ICD Sub chapter

7.percent=Numeric- percentage of part A and part B for each state

8.Total spending/enrollee Numeric, Calculated total spending for each enrollee for both Part A and Part B

One or more tables with descriptive statistics for 4 data elements

#using summarytools package for descriptive statistics

#install.packages("summarytools")
#library(summarytools)
#descr(medicare_data)

Html output that is professionally prepared for presentation Only the necessary information is outputted (you should suppress, for example, entire data frame outputs) Use of headers and sub headers to create an organized document

Milestone 4

##1.Final Visualization creation

Join all datasets together Calculate any remaining data elements needed for analysis Show code used to create joined dataset, but please do not print full data frame output (showing data structure with str() is okay)

library(dplyr)

pop_mortality<-pop_mortality %>%
  distinct(id, .keep_all = TRUE)

state_deaths<-state_deaths %>%
  distinct(id, .keep_all = TRUE)

medicare_clean<-medicare_clean%>%distinct(id,.keep_all=TRUE)

merge_1<-merge(x=pop_mortality,y=state_deaths, by.x=c('id','state','ten_year_age_groups'), 
      by.y=c('id','state','ten_year_age_groups'))

#grouping by intestinal infectious disease

scenario_2<-merge(medicare_clean,merge_1,by=NULL)

#removing unwanted/duplicate columns

scenario_2<-scenario_2 %>%
  select(-(11:12), -c(15:18),-(21))

#scenario_2<-scenario_2 %>%
  #distinct(id.x, .keep_all = TRUE)

scenario_2 <- scenario_2 %>%
  filter(disease.x %in% c("Intestinal infectious diseases", 
                          "Malignant neoplasms", "Other bacterial diseases"))

#Calculate any remaining data elements needed for analysis

#Visualization: 1
total_enrollees <- scenario_2 %>%
  group_by(state.x, disease.x) %>%
  summarise(total_enrollees = sum(enrollees))%>%
  mutate(enrollees_perc = (total_enrollees / sum(total_enrollees)) * 100)

#Visualization :2

selected_columns <- scenario_2 %>%
  select(state.x, ten_year_age_groups, population.y,utilization)

# Calculate the population-adjusted measure
adjusted_measure <- selected_columns %>%
  group_by(state.x, ten_year_age_groups) %>%
  summarise(adjusted_utilization = sum(utilization) / sum(population.y) * 1000)

# Display the adjusted measure
#print(adjusted_measure)

#total_enrollees<-total_enrollees %>%
  #distinct(state.x, .keep_all = TRUE)

##2. Visualizations (at least one per group member) One print quality table as requested in scenario One print quality plot or chart as requested in scenario For groups of 3, one additional print quality table or plot of your choice (can support the requested data in the scenario, or answer a different question using the same data sources)

ˆ

library(ggplot2)

#Data visualisation :1

#interpretation: This visualization describes the most common disease group for each state and the percentage of enrollee for teh specific disease. This will help determine the highest rate of enrollees disease group with a median of close to 30% enrollees.


total_enrollees$disease.x <- factor(total_enrollees$disease.x, 
      levels = unique(total_enrollees$disease.x[order(total_enrollees$enrollees_perc)]))

total_enrollees$state <-factor(total_enrollees$state.x, 
      levels = unique(total_enrollees$state.x[order(total_enrollees$enrollees_perc)]))

total_enrollees$state <- as.factor(total_enrollees$state)

med_val <- median(total_enrollees$enrollees_perc)
# med_val



plot_1<- ggplot(total_enrollees, 
                aes(x = state.x, y = enrollees_perc, fill = disease.x, group = state)) +
  geom_bar(position = position_dodge2(width = 0.8), stat = "identity") +
  geom_hline(yintercept = med_val, linetype = 2) +
  geom_text(aes(label = "median %"), y = med_val, vjust = -2, hjust = -0.2) +
  labs(x = "%", y = "State",
       title = "Percent of Part A and Part B enrollees age 65+ in the United States",
       fill = "state.x") +theme(axis.text.x=element_text(angle=45,size = rel(0.5),
                                                         margin = margin(1, unit = "cm"),
                                                         vjust =0.8))

#theme(axis.text.x = element_text(size = 8, angle = 45, hjust = 1, vjust = 0.9))+coord_cartesian(ylim = c(20, 100),(xlim = c(1000, 0)))
plot_1

#Plot: # Plotting the population-adjusted measure

adjusted_measure<- adjusted_measure %>%
  filter(state.x != "United States")

ggplot(adjusted_measure, aes(x = state.x, y = adjusted_utilization, fill = ten_year_age_groups)) +
  geom_bar(stat = "identity", position = "dodge") +
  labs(x = "State", y = "Adjusted Utilization per 1000 People",
       title = "Population-Adjusted Measure of Medicare Utilization by State and Age Group") +
  theme(axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1),
        legend.title = element_blank())

#Interpretation: We can see that california has the highest utilization of more than 5000 enrollees of part A and part B medicare program for ages of 65-74. It is interesting to see that Florida that is usually a. state with more senior residents show less utilization of medicare Part A and part B compared to California.

##3.For each visual, include Code used to generate visual Legend (if necessary) 1-2 sentence interpretation

library(tidyverse)
library(ggthemes)
library(magrittr)
library(scales)

#interpretation: This visualization shows Medicare spending per individual whoes age is above 65 years old in US
barchart <- ggplot(mortality1cause, aes(y = state, x = Total_Spending_Per_Enrollee, fill=Total_Spending_Per_Enrollee)) +
      theme(panel.grid.major.y = element_blank(), panel.grid.minor.y = element_blank()) +
    theme(panel.grid.major.x = element_blank(), panel.grid.minor.x = element_blank()) +
    geom_bar(stat = "identity") + guides(fill = "none") +
 labs(title = "Total Spending per Medicare Enrollee in the U.S.",
       x = "Total Spending per Medicare Enrollee", 
       y = "U.S. states")
barchart #re-run line 266 when object not found

#interpretation: This visualization describes the mortality rate of Malignant Neoplasm in each U.S. state. 
barchart <- ggplot(mortality1cause, aes(y = state, x = mortality_rate_per_1000, fill=Total_Spending_Per_Enrollee)) +
      theme(panel.grid.major.y = element_blank(), panel.grid.minor.y = element_blank()) +
    theme(panel.grid.major.x = element_blank(), panel.grid.minor.x = element_blank()) +
    geom_bar(stat = "identity") + guides(fill = "none") +
 labs(title = "Mortality Rate of Malignant Neoplasm in each state per 1,000 individuals",
       x = "Mortality Rate", 
       y = "U.S. states")
barchart #re-run line 266 when object not found

#install.packages("kableextra")
#install.packages("kableExtra", dependencies = TRUE)

#library(kableExtra)

# Display the original column names
#print(colnames(mortality1cause))

# Modify column names
#colnames(mortality1cause) <- c("State", "Total Spending per Enrollee", 
    #"Total Population", "Disease", "Total Deaths per Cause", "Mortality Rate per 1000")

#kable(head(mortality1cause), align=c('l', 'l', 'l', 'l', 'l'))
#kable (mortality1cause)