Skip to content

Commit

Permalink
v0.2.1 (full country list)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Leasure committed Jul 9, 2020
1 parent 213048a commit 452daed
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 20 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: peanutButter
Title: peanutButter
Version: 0.2.0
Date: 2020-06-03
Version: 0.2.1
Date: 2020-07-09
Author: Douglas R Leasure, Claire A Dooley, Maksym Bondarenko, Andrew J Tatem
Maintainer: Doug Leasure <D.R.Leasure@soton.ac.uk>
License: GNU GPLv3
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
7 changes: 4 additions & 3 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,14 @@
<h1>peanutButter: An R package for rapid-response gridded population estimates from building footprints</h1>
<p>WorldPop Research Group<br />
University of Southampton</p>
<p>4 June 2020</p>
<p>9 July 2020</p>
<div id="introduction" class="section level2">
<h2>Introduction</h2>
<p>The <em>peanutButter</em> R package allows you to produce gridded population estimates from building footprints using the “peanut butter” method. This simple approach involves estimating the average household sizes for each settlement type (e.g. urban and rural) and then spreading those estimates evenly across buildings in each settlement type using high resolution maps of building footprints that are based on recent satellite imagery (Dooley and Tatem 2020, Ecopia.AI and Maxar Technologies 2020).</p>
<p>The <em>peanutButter</em> web application is available online from the <a href="https://apps.worldpop.org" target="_blank">WorldPop Applications</a> website.</p>
<p>Code for the <em>peanutButter</em> package is openly available on GitHub: <a href="https://github.com/wpgp/peanutButter" target="_blank">https://github.com/wpgp/peanutButter</a>.</p>
<p><strong>Recommended citation:</strong><br />
Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.2.0. WorldPop Research Group, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00667</a></p>
Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.2.1. WorldPop Research Group, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00678</a></p>
</div>
<div id="installation" class="section level2">
<h2>Installation</h2>
Expand Down Expand Up @@ -233,7 +234,7 @@ <h2>Contributing</h2>
</div>
<div id="suggested-citation" class="section level2">
<h2>Suggested Citation</h2>
<p>Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.1.0. WorldPop Research Group, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00667</a></p>
<p>Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.2.1. WorldPop, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00678</a></p>
</div>
<div id="license" class="section level2">
<h2>License</h2>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
WorldPop Research Group
University of Southampton

4 June 2020
9 July 2020

## Introduction

Expand All @@ -14,7 +14,7 @@ The _peanutButter_ web application is available online from the <a href="https:/
Code for the _peanutButter_ package is openly available on GitHub: <a href='https://github.com/wpgp/peanutButter' target='_blank'>https://github.com/wpgp/peanutButter</a>.

**Recommended citation:**
Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.2.0. WorldPop Research Group, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00667</a>
Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.2.1. WorldPop Research Group, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00678</a>

## Installation

Expand Down Expand Up @@ -63,7 +63,7 @@ peanutButter::jelly(srcdir="c:/local_source_directory")
The _peanutButter_ R package was developed by the WorldPop Research Group within the Department of Geography and Environmental Science at the University of Southampton. Funding was provided by the Bill and Melinda Gates Foundation (INV-002697). Maxar Technologies and Ecopia.AI (2020) provided high resolution building footprints based on recent satellite imagery. Gridded age-sex data were provided by the WorldPop Global High Resolution Population Denominators Project led by Alessandro Sorichetta with funding from the Bill and Melinda Gates Foundation (OPP1134076). Development of the _peanutButter_ R package was led by Doug Leasure. Claire Dooley developed the source rasters of building counts and urban/rural settlements. Maksym Bondarenko maintains WorldPop's Shiny server. Professor Andy Tatem provides oversight of the WorldPop Research Group.

## Suggested Citation
Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.1.0. WorldPop Research Group, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00667</a>
Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.2.1. WorldPop, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00678</a>

## License
GNU General Public License v3.0 (GNU GPLv3)
Expand Down
6 changes: 6 additions & 0 deletions data-raw/defaults.csv
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ TZA,56318350,4.9,1.1,0.5,4.9,1,0.5
UGA,42723140,4.5,1.1,0.5,4.5,1,0.5
ZAF,57779620,3.4,1.1,0.5,3.4,1,0.5
ZMB,21672678,5.1,1.1,0.5,5.1,1,0.5
ETH,112078730,4.6,1.1,0.5,4.6,1,0.5
REU,859959,5,1.1,0.5,5,1,0.5
SEN,16296360,8.7,1.1,0.5,8.7,1,0.5
STP,215060,3.8,1.1,0.5,3.8,1,0.5
TGO,8082370,4.6,1.1,0.5,4.6,1,0.5
ZWE,14645470,4.1,1.1,0.5,4.1,1,0.5
6 changes: 5 additions & 1 deletion data-raw/internal_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ rm(list=ls()); gc(); cat("\014"); try(dev.off(), silent=T)
# working directory
setwd(file.path(dirname(rstudioapi::getSourceEditorContext()$path),'..'))

# package
library(peanutButter, lib='c:/research/r/library')

# source directory
srcdir <- '//worldpop.files.soton.ac.uk/worldpop/Projects/WP517763_GRID3/Working/git/peanutButter'

Expand All @@ -16,6 +19,7 @@ for(i in 1:length(files)){
}
# country_list <- sort(unique(c(country_list,as.character(peanutButter:::country_info$country))))
country_list <- sort(unique(country_list))
country_list <- country_list[-which(country_list %in% c('XXX'))]

# function to get file names
fileNames <- function(country, path=srcdir){
Expand Down Expand Up @@ -47,7 +51,7 @@ for(country in country_list){
country_info <- data.frame(country=as.character(country_list))
row.names(country_info) <- country_list

refresh_countries <- c('TZA')
refresh_countries <- c()

i <- peanutButter:::country_info
if(length(refresh_countries) > 0) {
Expand Down
4 changes: 2 additions & 2 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ citEntry(entry="Book",
title = paste0("peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version ", meta$Version, "."),
year = 2020,
publisher = "{WorldPop, University of Southampton}",
doi = "10.5258/SOTON/WP00667",
doi = "10.5258/SOTON/WP00678",
url = "https://github.com/wpgp/peanutButter",
textVersion = paste0('Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version ', meta$Version, '. WorldPop, University of Southampton. doi:10.5258/SOTON/WP00667')
textVersion = paste0('Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version ', meta$Version, '. WorldPop, University of Southampton. doi:10.5258/SOTON/WP00678')
)
4 changes: 1 addition & 3 deletions inst/jelly/global.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# source directory
srcdir <- .GlobalEnv$srcdir

# data readme
data_version <- 'v1.0'
srcfiles <- list.files(srcdir)

# country info
country_info <- peanutButter:::country_info
Expand Down
4 changes: 2 additions & 2 deletions inst/jelly/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ function(input, output, session){
rv$country_info <- country_info[rv$data_select,]

# paths to source files
rv$path_readme1 <- 'XXX_buildings_v1_0_README.pdf'
rv$path_readme1 <- srcfiles[grepl('README.pdf', srcfiles)][1]
if(file.exists(file.path(srcdir,rv$path_readme1))){
rv$path_readme1 <- file.path(srcdir,rv$path_readme1)
} else {
rv$path_readme1 <- NULL
}

rv$path_readme2 <- 'XXX_agesex_README.pdf'
rv$path_readme2 <- srcfiles[grepl('README.pdf', srcfiles)][2]
if(file.exists(file.path(srcdir,rv$path_readme2))){
rv$path_readme2 <- file.path(srcdir,rv$path_readme2)
} else {
Expand Down
4 changes: 2 additions & 2 deletions inst/jelly/www/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1 class="title toc-ignore">peanutButter - A web application to produce rapid-r

<p>WorldPop Research Group<br />
University of Southampton</p>
<p>4 June 2020</p>
<p>9 July 2020</p>
<div id="overview" class="section level2">
<h2>Overview</h2>
<p>The <em>peanutButter</em> web application allows you to produce gridded population estimates using your own estimates of people per building. This is a quick and simple approach that utilizes high resolution maps of building footprints, assuming that the same number of people live in each building across entire regions or settlement types (e.g. urban and rural). WorldPop partners with Maxar Technologies, Ecopia.AI, and the Bill and Melinda Gates Foundation for recent maps of buildings extracted from Maxar’s <a href="https://www.digitalglobe.com/products/mosaics" target="_blank">Vivid Imagery Mosaic</a> (Ecopia.AI and Maxar Technologies 2020, Dooley and Tatem 2020).</p>
Expand Down Expand Up @@ -200,7 +200,7 @@ <h2>Contributing</h2>
</div>
<div id="recommended-citation" class="section level2">
<h2>Recommended Citation</h2>
<p>Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.2.0. WorldPop, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00667</a></p>
<p>Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.2.1. WorldPop, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00678</a></p>
</div>
<div id="license" class="section level2">
<h2>License</h2>
Expand Down
4 changes: 2 additions & 2 deletions vignettes/jelly.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ vignette: >
WorldPop Research Group
University of Southampton

4 June 2020
9 July 2020

## Overview

Expand Down Expand Up @@ -173,7 +173,7 @@ Disaggregate tool: The time-point of the gridded population estimates is influen
The _peanutButter_ R package was developed by the WorldPop Research Group within the Department of Geography and Environmental Science at the University of Southampton. Funding was provided by the Bill and Melinda Gates Foundation (INV-002697). Ecopia.AI and Maxar Technologies (2020) provided high resolution building footprints based on recent satellite imagery. Gridded age-sex data were provided by the WorldPop Global High Resolution Population Denominators Project led by Alessandro Sorichetta with funding from the Bill and Melinda Gates Foundation (OPP1134076). Development of the _peanutButter_ R package was led by Doug Leasure. Claire Dooley developed the source rasters of building counts and urban/rural settlements. Maksym Bondarenko maintains WorldPop's Shiny server. Professor Andy Tatem provides oversight of the WorldPop Research Group.

## Recommended Citation
Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.2.0. WorldPop, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00667</a>
Leasure DR, Dooley CA, Bondarenko M, Tatem AJ. 2020. peanutButter: An R package to produce rapid-response gridded population estimates from building footprints, version 0.2.1. WorldPop, University of Southampton. <a href="https://github.com/wpgp/peanutButter" target="_blank">doi:10.5258/SOTON/WP00678</a>

## License
GNU General Public License v3.0 (GNU GPLv3)
Expand Down

0 comments on commit 452daed

Please sign in to comment.