-
Notifications
You must be signed in to change notification settings - Fork 0
/
rural.Rmd
39 lines (32 loc) · 984 Bytes
/
rural.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
title: "Rural"
output: html_document
date: '2022-06-30'
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(tidyverse)
library(tidycensus)
library(ggthemes)
library(tigris)
```
Rural is defined as the population not included within an urbanized cluster. The plot shown below maps the percentage of each state which is considered rural.
```{r warning = FALSE, include = FALSE}
rural_data <- get_decennial(geography = "state",
variables = c("P001001","P002005"),
year = 2010,
output = "wide",
geometry = TRUE)
```
```{r}
rural_data |>
shift_geometry()|>
ggplot(aes(fill = (P002005 / P001001) * 100))+
scale_fill_viridis_c(option = "plasma", direction = -1) +
geom_sf() +
theme_void() +
labs(title = "Rural Geography of the United States",
subtitle= "Central, landlocked states tend to be more rural",
fill = "Percent Rural",
caption = "Source: Census 2010")
```