You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- B06011_001E = Median income in the past 12 months
115
+
112
116
### Get Median Income
113
117
118
+
Now that I know the Census ACS variable, I can use the `tidycensus::get_acs()` function to gather the median income variable for each state, along with the geometry (i.e. shapefiles).
119
+
114
120
```{r get_median_income}
115
121
us_pop <-
116
122
get_acs(geography = "state",
@@ -120,12 +126,13 @@ us_pop <-
120
126
121
127
us_pop <- us_pop %>%
122
128
mutate(type = "USA Median Income") %>%
123
-
rename(wages = estimate) %>%
124
-
filter(NAME != "Puerto Rico")
129
+
rename(wages = estimate)
125
130
```
126
131
127
132
### Append Census Data
128
133
134
+
Now combine the tidycensus data and geometry (i.e. `us_pop` variable data & shapefiles) with the BLS data and previously associate shapefiles gatheried via `tigris::states()`
135
+
129
136
```{r}
130
137
my_df <- bind_rows(my_df, us_pop)
131
138
```
@@ -163,7 +170,7 @@ my_df %>%
163
170
facet_wrap(~ category,
164
171
nrow = 3, ncol = 2) +
165
172
theme(legend.position = "top") +
166
-
labs(title = "Median USA Wages by Professions",
173
+
labs(title = "2015 Median USA Wages by Professions",
<li>B06011_001E = Median income in the past 12 months</li>
2235
+
</ul>
2234
2236
<h3id="get-median-income">Get Median Income</h3>
2237
+
<p>Now that I know the Census ACS variable, I can use the <code>tidycensus::get_acs()</code> function to gather the median income variable for each state, along with the geometry (i.e. shapefiles).</p>
<spanclass='fu'>mutate</span><spanclass='op'>(</span>type <spanclass='op'>=</span><spanclass='st'>"USA Median Income"</span><spanclass='op'>)</span><spanclass='op'>%>%</span>
<h3id="append-census-data">Append Census Data</h3>
2253
+
<p>Now combine the tidycensus data and geometry (i.e. <code>us_pop</code> variable data & shapefiles) with the BLS data and previously associate shapefiles gatheried via <code>tigris::states()</code></p>
0 commit comments