-
Notifications
You must be signed in to change notification settings - Fork 31
/
index.html
239 lines (207 loc) · 14 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
235
236
237
238
239
<!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>Standardize, Evaluate, and Adjust Demographic Data • DemoTools</title>
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png">
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png">
<!-- 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 href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/yeti/bootstrap.min.css" rel="stylesheet" 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="Standardize, Evaluate, and Adjust Demographic Data">
<meta property="og:description" content="A collection of classic demographic methods used to evaluate, adjust, and standardize demographic data.">
<meta property="og:image" content="https://timriffe.github.io/DemoTools/logo.png">
<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">DemoTools</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.2.5</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/Age-heaping_quality_with_Demotools.html">Age-heaping indices with DemoTools</a>
</li>
<li>
<a href="articles/case_study_1.html">DemoTools: A case study</a>
</li>
<li>
<a href="articles/graduation_with_demotools.html">Graduation with DemoTools</a>
</li>
<li>
<a href="articles/lifetable_with_demotools.html">The lifetable with DemoTools</a>
</li>
<li>
<a href="articles/smoothing_with_demotools.html">Smoothing with DemoTools</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">
<p><a href="https://timriffe.github.io/DemoTools/"><img src="logo.png" align="left" width="100"></a></p>
<div id="demotools" class="section level1">
<div class="page-header"><h1 class="hasAnchor">
<a href="#demotools" class="anchor"></a>DemoTools</h1></div>
<p><a href="https://travis-ci.org/timriffe/DemoTools"><img src="https://travis-ci.org/timriffe/DemoTools.svg?branch=master" alt="Build Status"></a> <a href="https://ci.appveyor.com/project/timriffe/DemoTools"><img src="https://ci.appveyor.com/api/projects/status/github/timriffe/DemoTools?branch=master&svg=true" alt="AppVeyor Build Status"></a> <a href="https://codecov.io/gh/timriffe/DemoTools"><img src="https://codecov.io/gh/timriffe/DemoTools/branch/master/graph/badge.svg" alt="codecov"></a> <a href="https://github.com/timriffe/DemoTools"><img src="https://img.shields.io/badge/devel%20version-01.02.05-yellow.svg"></a> <a href="https://github.com/timriffe/DemoTools/issues"><img src="https://img.shields.io/github/issues-raw/timriffe/DemoTools.svg" alt="issues"></a> <a href="https://www.tidyverse.org/lifecycle/#maturing"><img src="https://img.shields.io/badge/lifecycle-maturing-blue.svg" alt="lifecycle"></a></p>
</div>
<div id="tools-for-the-evaluation-adjustment-and-standardization-of-demographic-data" class="section level1">
<h1 class="hasAnchor">
<a href="#tools-for-the-evaluation-adjustment-and-standardization-of-demographic-data" class="anchor"></a>Tools for the evaluation, adjustment, and standardization of demographic data</h1>
<p>Date: 2019-11-25</p>
<p><code>DemoTools</code> is an R package that contains simple functions often used in demographic analysis. It is in active development. This project is commissioned by the <a href="http://www.un.org/en/development/desa/population/">UN Population Division</a> and financed by the <a href="https://www.gatesfoundation.org/">Bill and Melinda Gates Foundation</a> as part of the <a href="http://www.un.org/en/development/desa/population/projects/making-family-planning-count/index.shtml">Making Family Planning Count</a> project. Work is also done in collaboration with Sean Fennell, and <a href="https://github.com/jmaburto">Jose Manuel Aburto</a>, <a href="https://ikashnitsky.github.io/">Ilya Kashnitsky</a>, <a href="https://github.com/mpascariu">Marius Pascariu</a>, <a href="https://github.com/cimentadaj">Jorge Cimentada</a>, <a href="https://www.monicaalexander.com/">Monica Alexander</a>, and with minor contributions from <a href="https://github.com/timriffe/DemoTools/graphs/contributors">several more</a> (thank you!). This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 IGO (<a href="https://creativecommons.org/licenses/by-sa/3.0/igo/">CC BY-SA 3.0 IGO</a>).</p>
<p>If you detect a bug or have a suggestion please notify us using the <a href="https://github.com/timriffe/DemoTools/issues">Issues</a> tab on github. Even better if you fix it and make a pull request! See <a href="https://github.com/timriffe/DemoTools/blob/master/CONTRIBUTING.md">CONTRIBUTING.md</a> for more tips on reporting bugs or offering patches.</p>
<div id="getting-started" class="section level2">
<h2 class="hasAnchor">
<a href="#getting-started" class="anchor"></a>Getting started</h2>
<p>If you are getting started with <code>DemoTools</code> we recommend taking a look at the tutorial articles and the examples in the package documentation.</p>
<p>We’ll soon add a primer here, but for now you can get started by loading the package and calling up help files, which contain worknig examples to demonstrate usage and options.</p>
<p>You can load the <code>DemoTools</code> package in R like so:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="co"># install.packages("devtools")</span></a>
<a class="sourceLine" id="cb1-2" title="2"></a>
<a class="sourceLine" id="cb1-3" title="3"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(devtools)</a>
<a class="sourceLine" id="cb1-4" title="4"><span class="kw">install_github</span>(<span class="st">"timriffe/DemoTools"</span>)</a></code></pre></div>
<p>(if either of the first two icons at the top of this README are red, then this might not be working at the moment. You can assume we’re fixing it. If they’re green, then it’ll probably work.)</p>
</div>
<div id="note" class="section level2">
<h2 class="hasAnchor">
<a href="#note" class="anchor"></a>Note</h2>
<p>Sometime soon there will be an overhaul of function names. We plan to switch to snake case, with method families as the first element. This is to make naming more regular and memorable, and also to activate autocomplete in RStudio or similar.</p>
<pre><code>library(DemoTools)
# interesting top-level functions include:
# for age heaping:
?Whipple
?Myers
?Bachi
?CoaleLi
?Noumbissi
?Spoorenberg
?KannistoHeap #(Kannisto's old-age heaping index)
?Jdanov (Jdanov's old-age heaping index)
?heapify # induce heaping, to test evaluation functions
# test if 5-year smoothing recommended:
?zero_pref_sawtooth # is heaping much worse on 0s than on 5s?
?five_year_roughness # measure of total roughness
# other age-structure quality measures:
?ageRatioScore # methods including "UN", "Zelnick", "Ramachandran"
?sexRatioScore
?ageSexAccuracy # methods including "UN", "Zelnick", "Ramachandran", and "Das Gupta"
# Comparison methods
?IRD (index of relative difference)
?ID (index of dissimilarity)
?survRatioError
# graduation methods
?graduate # methods include "sprague", "beers(ord)", "beers(mod)", "mono","uniform", and "pclm"
# various smoothing methods
# * for 5-year age groups
?agesmth # including Carrier-Farrag, Arriaga, Karup-King-Newton, United Nations, Strong, Zigzag, and MAV methods
# * for single ages
?agesmth1 # including loess and polynomial
?spencer
?zelnik
# various lifetable evaluation and calculation functions
?ADM # and ?RDM, implementing PAS LIFIT
?LTabr # with fine control over a(x) assumptions, extrapolation, and open age groups
# interpolation
?interp (arithmetic, logarithmic, power)
# redistribution
?OPAG_simple # increase population open age, redistributing using a supplied standard.
?rescaleAgeGroups (including for cases of different age groupings)</code></pre>
<p>These top-level functions have implied an even larger set of simple utilities, which itself is growing fast. Presently top-level + utilities = 121 documented functions, with more in development.</p>
<p>Presently all functions are in a testing phase, but the aim is to end up with a set of robust generic functions around which wrappers can be easily built for various institutional data production needs. As-is, these functions may also be useful for DIY demographers. This set of methods is a cherry-pick from legacy methods collections, including PAS, DAPPS, MPCDA, MortPack, IREDA, UN Manual X, G. Feeney Spreadsheets, formulas found in Siegel and Swanson or Shyrock and Siegel, and various (apparent) first-implementations from formulas in papers, or ad hoc DIY approximations from old pros.</p>
</div>
<div id="about-those-icons" class="section level2">
<h2 class="hasAnchor">
<a href="#about-those-icons" class="anchor"></a>about those icons</h2>
<p>Every time this repository is updated the entire code base is rebuilt on a server somewhere, and undergoes a series of checks. This happens on a Linux machine and on a Windows machine. Any warnings or errors in these builds will yield a red fail tag, and successes are green passes. Code coverage indicates what percentage of lines of code undergo formal unit testing of some kind.</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>Report a bug at <br><a href="https://github.com/timriffe/DemoTools/issues">https://github.com/timriffe/DemoTools/issues</a>
</li>
</ul>
</div>
<div class="license">
<h2>License</h2>
<ul class="list-unstyled">
<li>file <a href="LICENSE-text.html">LICENSE</a>
</li>
</ul>
</div>
<div class="community">
<h2>Community</h2>
<ul class="list-unstyled">
<li><a href="CONTRIBUTING.html">Contributing guide</a></li>
<li><a href="CODE_OF_CONDUCT.html">Code of conduct</a></li>
</ul>
</div>
<div class="dev-status">
<h2>Dev status</h2>
<ul class="list-unstyled">
<li><a href="https://timriffe.github.io/DemoTools/"><img src="logo.png" width="100"></a></li>
</ul>
</div>
</div>
</div>
<footer><div class="copyright">
<p>Developed by .</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>