/
index.html
234 lines (215 loc) · 19 KB
/
index.html
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>A Convenient API for Accessing United States Census Bureau's Quarterly Workforce Indicator • tidyqwi</title>
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script><meta property="og:title" content="A Convenient API for Accessing United States Census Bureau's Quarterly Workforce Indicator">
<meta property="og:description" content="The purpose of this package is to access the
United States Census Bureaus Quarterly Workforce Indicator data. Additionally,
the data will be retrieved in a tidy format for further manipulation with full variable
descriptions added if desired. Information about the United States Census Bureaus
Quarterly Workforce Indicator is available at
<https://www.census.gov/data/developers/data-sets/qwi.html>.">
<meta name="twitter:card" content="summary">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-home">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">tidyqwi</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.2</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Articles
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="articles/multi_state_year.html">Gathering QWI Data Over Several Years for Multiple States</a>
</li>
</ul>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right"></ul>
</div>
<!--/.nav-collapse -->
</div>
<!--/.container -->
</div>
<!--/.navbar -->
</header><div class="row">
<div class="contents col-md-9">
<!-- end badges -->
<div id="tidyqwi" class="section level1">
<div class="page-header"><h1 class="hasAnchor">
<a href="#tidyqwi" class="anchor"></a>tidyqwi</h1></div>
<p>The goal of <code>tidyqwi</code> is to make accessing the US Census Bureau’s <em>Quarterly Workforce Indicators</em> easier in a tidy format. This package allows a user to specify the years and states of interest as well as some of the additional parameters (desired cross tabs, MSA vs county level data, firm size, etc) and submit them to the US Census API. This package then stays within the US Census guidelines for API submission for this data and returns a combined tidy dataframe for future analysis.</p>
<p>This is a work in progress!</p>
<div id="installation" class="section level2">
<h2 class="hasAnchor">
<a href="#installation" class="anchor"></a>Installation</h2>
<p>Install via CRAN with:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span>(<span class="st">"tidyqwi"</span>)</a></code></pre></div>
<p>Or the development version at:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">remotes<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/remotes/man/install_github.html">install_github</a></span>(<span class="st">"medewitt/tidyqwi"</span>)</a></code></pre></div>
</div>
<div id="use" class="section level2">
<h2 class="hasAnchor">
<a href="#use" class="anchor"></a>Use</h2>
<p>After installation you can load and retrieve the desired data!</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(tidyqwi)</a>
<a class="sourceLine" id="cb3-2" data-line-number="2"></a>
<a class="sourceLine" id="cb3-3" data-line-number="3">nc_qwi <-<span class="st"> </span><span class="kw"><a href="reference/get_qwi.html">get_qwi</a></span>(<span class="dt">years =</span> <span class="st">"2010"</span>, </a>
<a class="sourceLine" id="cb3-4" data-line-number="4"> <span class="dt">states =</span> <span class="st">"11"</span>, </a>
<a class="sourceLine" id="cb3-5" data-line-number="5"> <span class="dt">geography =</span> <span class="st">"county"</span>, </a>
<a class="sourceLine" id="cb3-6" data-line-number="6"> <span class="dt">apikey =</span> census_key, </a>
<a class="sourceLine" id="cb3-7" data-line-number="7"> <span class="dt">endpoint =</span> <span class="st">"rh"</span>,</a>
<a class="sourceLine" id="cb3-8" data-line-number="8"> <span class="dt">variables =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"sEmp"</span>, <span class="st">"Emp"</span>), <span class="dt">all_groups =</span> <span class="ot">FALSE</span>,</a>
<a class="sourceLine" id="cb3-9" data-line-number="9"> <span class="dt">industry_level =</span> <span class="st">"2"</span>, <span class="dt">processing =</span> <span class="st">"multiprocess"</span>)</a></code></pre></div>
<p>And look at your data:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/utils/head.html">head</a></span>(nc_qwi)</a>
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="co">#> # A tibble: 6 x 12</span></a>
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="co">#> year quarter agegrp sex ownercode seasonadj industry state county</span></a>
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="co">#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> </span></a>
<a class="sourceLine" id="cb4-5" data-line-number="5"><span class="co">#> 1 2010 1 A00 0 A00 U 11 37 001 </span></a>
<a class="sourceLine" id="cb4-6" data-line-number="6"><span class="co">#> 2 2010 1 A00 0 A00 U 11 37 003 </span></a>
<a class="sourceLine" id="cb4-7" data-line-number="7"><span class="co">#> 3 2010 1 A00 0 A00 U 11 37 005 </span></a>
<a class="sourceLine" id="cb4-8" data-line-number="8"><span class="co">#> 4 2010 1 A00 0 A00 U 11 37 007 </span></a>
<a class="sourceLine" id="cb4-9" data-line-number="9"><span class="co">#> 5 2010 1 A00 0 A00 U 11 37 009 </span></a>
<a class="sourceLine" id="cb4-10" data-line-number="10"><span class="co">#> 6 2010 1 A00 0 A00 U 11 37 011 </span></a>
<a class="sourceLine" id="cb4-11" data-line-number="11"><span class="co">#> # … with 3 more variables: Emp <chr>, sEmp <chr>, year_time <date></span></a></code></pre></div>
<p>And there are labels added if desired</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1">labelled_nc <-<span class="st"> </span><span class="kw"><a href="reference/add_qwi_labels.html">add_qwi_labels</a></span>(nc_qwi)</a></code></pre></div>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1">Hmisc<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/Hmisc/man/describe.html">describe</a></span>(labelled_nc<span class="op">$</span>Emp)</a>
<a class="sourceLine" id="cb6-2" data-line-number="2"><span class="co">#> labelled_nc$Emp : Beginning-of-Quarter Employment: Counts </span></a>
<a class="sourceLine" id="cb6-3" data-line-number="3"><span class="co">#> n missing distinct Info Mean Gmd .05 .10 </span></a>
<a class="sourceLine" id="cb6-4" data-line-number="4"><span class="co">#> 7345 411 2851 1 2018 3129 24 40 </span></a>
<a class="sourceLine" id="cb6-5" data-line-number="5"><span class="co">#> .25 .50 .75 .90 .95 </span></a>
<a class="sourceLine" id="cb6-6" data-line-number="6"><span class="co">#> 132 448 1550 4355 8099 </span></a>
<a class="sourceLine" id="cb6-7" data-line-number="7"><span class="co">#> </span></a>
<a class="sourceLine" id="cb6-8" data-line-number="8"><span class="co">#> lowest : 0 1 3 4 5, highest: 65243 81884 82723 84038 84674</span></a></code></pre></div>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(ggplot2)</a>
<a class="sourceLine" id="cb7-2" data-line-number="2"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(dplyr)</a>
<a class="sourceLine" id="cb7-3" data-line-number="3"><span class="co">#> </span></a>
<a class="sourceLine" id="cb7-4" data-line-number="4"><span class="co">#> Attaching package: 'dplyr'</span></a>
<a class="sourceLine" id="cb7-5" data-line-number="5"><span class="co">#> The following objects are masked from 'package:stats':</span></a>
<a class="sourceLine" id="cb7-6" data-line-number="6"><span class="co">#> </span></a>
<a class="sourceLine" id="cb7-7" data-line-number="7"><span class="co">#> filter, lag</span></a>
<a class="sourceLine" id="cb7-8" data-line-number="8"><span class="co">#> The following objects are masked from 'package:base':</span></a>
<a class="sourceLine" id="cb7-9" data-line-number="9"><span class="co">#> </span></a>
<a class="sourceLine" id="cb7-10" data-line-number="10"><span class="co">#> intersect, setdiff, setequal, union</span></a>
<a class="sourceLine" id="cb7-11" data-line-number="11"></a>
<a class="sourceLine" id="cb7-12" data-line-number="12">labelled_nc <span class="op">%>%</span></a>
<a class="sourceLine" id="cb7-13" data-line-number="13"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(county <span class="op">==</span><span class="st"> "067"</span>) <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb7-14" data-line-number="14"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="kw"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(year_time, Emp, <span class="dt">color =</span> county))<span class="op">+</span></a>
<a class="sourceLine" id="cb7-15" data-line-number="15"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/geom_path.html">geom_line</a></span>()<span class="op">+</span></a>
<a class="sourceLine" id="cb7-16" data-line-number="16"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/scale_continuous.html">scale_y_log10</a></span>()<span class="op">+</span></a>
<a class="sourceLine" id="cb7-17" data-line-number="17"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/facet_wrap.html">facet_wrap</a></span>(<span class="op">~</span>industry)<span class="op">+</span></a>
<a class="sourceLine" id="cb7-18" data-line-number="18"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(</a>
<a class="sourceLine" id="cb7-19" data-line-number="19"> <span class="dt">title =</span> <span class="st">"Quarterly Workforce Indicators for Forsyth County"</span>,</a>
<a class="sourceLine" id="cb7-20" data-line-number="20"> <span class="dt">subtitle =</span> <span class="kw"><a href="https://rdrr.io/r/base/attributes.html">attributes</a></span>(labelled_nc<span class="op">$</span>Emp)<span class="op">$</span>label,</a>
<a class="sourceLine" id="cb7-21" data-line-number="21"> <span class="dt">caption =</span> <span class="st">"Data: US Census Bureau QWI"</span>,</a>
<a class="sourceLine" id="cb7-22" data-line-number="22"> <span class="dt">x =</span> <span class="st">"Month"</span></a>
<a class="sourceLine" id="cb7-23" data-line-number="23"> )<span class="op">+</span></a>
<a class="sourceLine" id="cb7-24" data-line-number="24"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/ggtheme.html">theme_minimal</a></span>()</a></code></pre></div>
<p><img src="reference/figures/README-unnamed-chunk-8-1.png" width="100%"></p>
<p>Please note that the ‘tidyqwi’ project is released with a <a href="https://github.com/medewitt/tidyqwi/blob/master/CODE_OF_CONDUCT.md">Contributor Code of Conduct</a>. By contributing to this project, you agree to abide by its terms.</p>
</div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div class="links">
<h2>Links</h2>
<ul class="list-unstyled">
<li>Download from CRAN at <br><a href="https://cloud.r-project.org/package=tidyqwi">https://cloud.r-project.org/package=tidyqwi</a>
</li>
<li>Report a bug at <br><a href="https://github.com/medewitt/tidyqwi/issues">https://github.com/medewitt/tidyqwi/issues</a>
</li>
</ul>
</div>
<div class="license">
<h2>License</h2>
<ul class="list-unstyled">
<li>
<a href="https://opensource.org/licenses/mit-license.php">MIT</a> + file <a href="LICENSE-text.html">LICENSE</a>
</li>
</ul>
</div>
<div class="community">
<h2>Community</h2>
<ul class="list-unstyled">
<li><a href="CODE_OF_CONDUCT.html">Code of conduct</a></li>
</ul>
</div>
<div class="citation">
<h2>Citation</h2>
<ul class="list-unstyled">
<li><a href="authors.html">Citing tidyqwi</a></li>
</ul>
</div>
<div class="developers">
<h2>Developers</h2>
<ul class="list-unstyled">
<li>Michael DeWitt <br><small class="roles"> Author, maintainer </small> <a href="https://orcid.org/0000-0001-8940-1967" target="orcid.widget"><img src="https://members.orcid.org/sites/default/files/vector_iD_icon.svg" class="orcid" alt="ORCID"></a> </li>
<li>Mona Ahmadiani <br><small class="roles"> Author </small> <a href="https://orcid.org/0000-0002-1269-5685" target="orcid.widget"><img src="https://members.orcid.org/sites/default/files/vector_iD_icon.svg" class="orcid" alt="ORCID"></a> </li>
<li>Adam S. Hyde <br><small class="roles"> Author </small> <a href="https://orcid.org/0000-0003-1205-0032" target="orcid.widget"><img src="https://members.orcid.org/sites/default/files/vector_iD_icon.svg" class="orcid" alt="ORCID"></a> </li>
</ul>
</div>
<div class="dev-status">
<h2>Dev status</h2>
<ul class="list-unstyled">
<li><a href="https://cran.r-project.org/package=tidyqwi"><img src="https://www.r-pkg.org/badges/version/tidyqwi" alt="CRAN status"></a></li>
<li><a href="https://travis-ci.org/medewitt/tidyqwi"><img src="https://travis-ci.org/medewitt/tidyqwi.svg?branch=master" alt="Travis build status"></a></li>
<li><a href="https://ci.appveyor.com/project/medewitt/tidyqwi"><img src="https://ci.appveyor.com/api/projects/status/github/medewitt/tidyqwi?branch=master&svg=true" alt="AppVeyor build status"></a></li>
<li><a href="https://codecov.io/github/medewitt/tidyqwi?branch=master"><img src="https://codecov.io/gh/medewitt/tidyqwi/branch/master/graph/badge.svg" alt="Coverage status"></a></li>
<li><a href="https://www.tidyverse.org/lifecycle/#experimental"><img src="https://img.shields.io/badge/lifecycle-experimental-orange.svg" alt="lifecycle"></a></li>
<li><a href="https://cran.r-project.org/package=tidyqwi"><img src="https://cranlogs.r-pkg.org/badges/tidyqwi"></a></li>
<li><a href="https://doi.org/10.21105/joss.01462"><img src="http://joss.theoj.org/papers/10.21105/joss.01462/status.svg" alt="DOI"></a></li>
</ul>
</div>
</div>
</div>
<footer><div class="copyright">
<p>Developed by Michael DeWitt, Mona Ahmadiani, Adam S. Hyde.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>