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
If you're not sure what 2015 ACS Census data variables you need, you'll want to investigate the variables.
106
106
@@ -113,9 +113,11 @@ I'm using Median income.
113
113
- B01003_001E = Total Population
114
114
- B06011_001E = Median income in the past 12 months
115
115
116
-
### Get Median Income
116
+
_Note: I realize mean and median are not the same measure. This is a demonstration of procedure, not a recommendation for research practice and data comparison. Of course, you will be more rigorous with your own research._
117
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).
118
+
### Get BLS mean income
119
+
120
+
Now that I know the Census ACS variable, I can use the `tidycensus::get_acs()` function to gather the mean income variable for each state, along with the geometry (i.e. shapefiles).
119
121
120
122
```{r get_median_income}
121
123
us_pop <-
@@ -129,15 +131,15 @@ us_pop <- us_pop %>%
129
131
rename(wages = estimate)
130
132
```
131
133
132
-
### Append Census Data
134
+
### Append Census data
133
135
134
136
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
137
136
138
```{r}
137
139
my_df <- bind_rows(my_df, us_pop)
138
140
```
139
141
140
-
### More Munging
142
+
### More munging
141
143
142
144
Make the category variable a categorical factor with levels. This will improve the order of the facets when displayed.
<h2id="get-population-data-tidycensus">Get Population Data – Tidycensus</h2>
2222
-
<h3id="identify-and-pick-census-variables">identify and pick census variables</h3>
2221
+
<h2id="get-census-data-tidycensus">Get census data – tidycensus</h2>
2222
+
<h3id="identify-and-pick-census-variables">Identify and pick census variables</h3>
2223
2223
<p>If you’re not sure what 2015 ACS Census data variables you need, you’ll want to investigate the variables.</p>
2224
2224
<divclass="layout-chunk" data-layout="l-body">
2225
2225
<divclass="sourceCode">
@@ -2233,8 +2233,9 @@ <h3 id="identify-and-pick-census-variables">identify and pick census variables</
2233
2233
</li>
2234
2234
<li>B06011_001E = Median income in the past 12 months</li>
2235
2235
</ul>
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>
2236
+
<p><em>Note: I realize mean and median are not the same measure. This is a demonstration of procedure, not a recommendation for research practice and data comparison. Of course, you will be more rigorous with your own research.</em></p>
2237
+
<h3id="get-bls-mean-income">Get BLS mean income</h3>
2238
+
<p>Now that I know the Census ACS variable, I can use the <code>tidycensus::get_acs()</code> function to gather the mean income variable for each state, along with the geometry (i.e. shapefiles).</p>
@@ -2249,15 +2250,15 @@ <h3 id="get-median-income">Get Median Income</h3>
2249
2250
</code></pre>
2250
2251
</div>
2251
2252
</div>
2252
-
<h3id="append-census-data">Append Census Data</h3>
2253
+
<h3id="append-census-data">Append Census data</h3>
2253
2254
<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