Giter Site home page Giter Site logo

demotools's Introduction

DemoTools

Build Status AppVeyor Build Status codecov issues lifecycle

Tools for the evaluation, adjustment, and standardization of demographic data

Date: 2018-10-13

This repository contains simple functions in a package format, and is in active development. This project is commissioned by the UN Population Division and financed by the Bill and Melinda Gates Foundation as part of the Making Family Planning Count project. Work is also done in collaboration with Sean Fennell, and Jose Manuel Aburto, with minor contributions from several more(thank you!). This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).

If you detect a bug or have a suggestion please notify us using the Issues tab on github. Even better if you fix it and make a pull request! See CONTRIBUTING.md for more tips on reporting bugs or offering patches.

You can load the DemoTools package in R like so:

# install.packages("devtools")

library(devtools)
install_github("timriffe/DemoTools")

(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.)

You can then get started like so:

library(DemoTools)
# interesting top-level functions include:

# for age heaping:
?Whipple
?Myers
?Bachi
?CoaleLi
?Noumbissi
?Spoorenberg

# other age-structure quality measures:
?ageRatioScore  # methods including "UN", "Zelnick", "Ramachandran"
?sexRatioScore
?ageSexAccuracy # methods including "UN", "Zelnick", "Ramachandran", and "Das Gupta"
?AHI
?WI
?IRD
?ID
?survRatioError

# graduation methods
?sprague
?beers # methods including "ord" and "mod", as well as johnson option for young ages
?grabill
?splitMono
?monoCloseout
?splitOscillate # accepting e.g. spragueSimple, beersSimple as split methods

# various smoothing methods
?agesmth # including Carrier-Farrag, Arriaga, Karup-King-Newton, United Nations, Strong, Zigzag, and MAV methods
?spencer
?zelnik
?mav
?zigzag

# various lifetable evaluation and calculation functions
?ADM # and ?RDM, implementing PAS LIFIT
?LTabr # with options to replicate PAS and Mortpak

# interpolation
?interp

# adjustment
?rescaleAgeGroups

Note, at the moment the Sprague family of functions is being updated, and things may not work as expected until changes are complete. Please stand by.

These top-level functions have implied an even larger set of simple utilities, which itself is growing fast. Presently top-level + utilities = 97 documented functions, with more in development.

Presently all functions are in first drafts, 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.

about those icons

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. We've not yet set up units tests, but when we start to do so, the aim will be to push this percentage as high as possible. For now, such testing is happening on an ad hoc basis inside the examples sections of functions.

demotools's People

Contributors

dtburk avatar fennells avatar gergness avatar ikashnitsky avatar jmaburto avatar juangaleano avatar timriffe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.