life_exp | R Documentation |
A data frame with 3142 rows and 4 columns. County level data for life expectancy and median income in the United States.
life_exp
A data frame with 3142 observations on the following 4 variables.
Name of the state.
Name of the county.
Life expectancy in the county.
Median income in the county, measured in US $.
library(ggplot2)
# Income V Expectancy
ggplot(life_exp, aes(x = income, y = expectancy)) +
geom_point(color = openintro::IMSCOL["green", "full"], alpha = 0.2) +
theme_minimal() +
labs(
title = "Is there a relationship between median income and life expectancy?",
x = "Median income (US $)",
y = "Life Expectancy (year)"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.