poprf

Random Forest-informed Population Disaggregation R package

https://github.com/wpgp/poprf

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: plos.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.4%) to scientific vocabulary

Keywords

disaggregation population random-forest
Last synced: 6 months ago · JSON representation

Repository

Random Forest-informed Population Disaggregation R package

Basic Info
  • Host: GitHub
  • Owner: wpgp
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 7.71 MB
Statistics
  • Stars: 32
  • Watchers: 4
  • Forks: 4
  • Open Issues: 2
  • Releases: 3
Topics
disaggregation population random-forest
Created almost 5 years ago · Last pushed about 2 years ago
Metadata Files
Readme

README.md

popRF: Random Forest-informed Population Disaggregation R package

High resolution, recent data on human population distributions are important for measuring impacts of population growth, monitoring human-environment interactions and for planning and policy development. Many methods are used to disaggregate census data and predict population densities for finer scale, gridded population data sets.
popRF is a population modelling R package utilizing Random Forests to inform a dasymetric redistribution of census-based population count data. A description of using Random Forests machine learning method in popRF is described in Stevens et al.

Installation

The popRF package can be installed directly from Github.

r install.packages("devtools") devtools::install_github("wpgp/popRF")

Demo

The popRF package has a demo function popRFdemo to generate a population layer using the WorldPop geospatial covariates and subnational census-based population estimates for 230 countries. All necessary covariates will be downloaded and used to disaggregat population. All input datasets use a geographical coordinate system (GCS) with WGS 1984 datum (EPSG:4326) in Geotiff format at a resolution of 3 arc-second (0.00083333333 decimal degree, approximately 100m at the equator).

The following script will produce a population layer for Nepal (NPL) using 4 cores.

``` r library("popRF")

popRFdemo(project_dir="/home/user/demo", country="NPL", cores=4)

```

Basic Usage

``` r library("popRF")

Specifying a name of the file from which the unique area ID and corresponding

population values are to be read from. The file should contain two columns

comma-separated with the value of administrative ID and population without

columns names. If it does not contain an absolute path, the file name is

relative to the current working directory

poptable <- list("NPL"="/user/nplpopulation.csv")

Specifying a nested list of named list(s), i.e. where each element of the

first list is a named list object with atomic elements. The name of

each named list corresponds to the 3-letter ISO code of a specified

country. The elements within each named list define the specified

input covariates to be used in the random forest model, i.e. the name

of the covariates and the corresponding, if applicable and local, path

to them. If the path is not a full path, it is assumed to be relative

to the current working directory

input_cov <- list( "NPL"= list( "cov1" = "covariate1.tif", "cov2" = "covariate2.tif" ) )

Specifying a named list where each element of the list defines the

path to the input mastergrid(s), i.e. the template gridded raster(s)

that contains the unique area IDs as their value. The name(s)

corresponds to the 3-letter ISO code(s) of a specified country(ies).

Each corresponding element defines the path to the mastergrid(s). If

the path is local and not a full path, it is assumed to be relative to

the current working directory

inputmastergrid <- list("NPL" = "nplmastergrid.tif")

Specifying a named list where each element of the list defines the path

to the input country-specific watermask. The name corresponds to the

3-letter ISO code of a specified country. Each corresponding element

defines the path to the watermask, i.e. the binary raster that

delineates the presence of water (1) and non-water (0), that is used

to mask out areas from modelling. If the path is local and not a full

path, it is assumed to be relative to the current working directory.

inputwatermask <- list("NPL" = "nplwatermask.tif")

Specifying a named list where each element of the list defines the path

to the input raster(s) containing the pixel area. The name corresponds

to the 3-letter ISO code of a specified country. Each corresponding

element defines the path to the raster whose values indicate the area

of each unprojected (WGS84) pixel. If the path is local and not a full

path, it is assumed to be relative to the current working directory.

inputpxarea <- list("NPL" = "nplpxarea.tif")

Running a model

res <- popRF(pop=poptable, cov=inputcov, mastergrid=inputmastergrid, watermask=inputwatermask, pxarea=inputpxarea, outputdir="/user/output", cores=4)

Plot populataion raster

plot(res$pop)

Plot Error via Trees

plot(res$popfit) ```

Outputs

Population raster layer in GeoTiff format.

Contributions

Contributions are welcome. Please raise or respond to an issue, or create a new branch to develop a feature/modification and submit a pull request.

Acknowledgements

``` r

> citation("popRF")

> To cite popRF in publications use:

>

> Bondarenko M., Nieves J.J., Forrest R.S., Andrea E.G., Jochem C., Kerr D., and Sorichetta A. (2021): popRF: Random Forest-informed Population

> Disaggregation R package, Comprehensive R Archive Network (CRAN), url:https://cran.r-project.org/package=popRF.

>

> A BibTeX entry for LaTeX users is

>

> @Manual{,

> title = {popRF: Random Forest-informed Population Disaggregation R package.},

> author = {Maksym Bondarenko and Jeremiah J Nieves and Forrest R. Stevens and Andrea E. Gaughan and Chris Jochem and David Kerr and Alessandro Sorichetta},

> year = {2021},

> journal = {Comprehensive R Archive Network (CRAN)},

> url = {https://cran.r-project.org/package=popRF},

> language = {English},

> }

```

License

GNU General Public License v3.0 (GNU GPLv3)

Owner

  • Name: WorldPop
  • Login: wpgp
  • Kind: organization
  • Email: info@worldpop.org
  • Location: University of Southampton

Open Spatial Demographic Data and Research

GitHub Events

Total
  • Watch event: 3
  • Fork event: 3
Last Year
  • Watch event: 3
  • Fork event: 3

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 115
  • Total Committers: 2
  • Avg Commits per committer: 57.5
  • Development Distribution Score (DDS): 0.417
Past Year
  • Commits: 33
  • Committers: 1
  • Avg Commits per committer: 33.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
bondarenkom m****o@g****m 67
Jeremiah J. Nieves j****1 48

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 2
  • Total pull requests: 5
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 2 minutes
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • pankajkr394 (1)
  • doug-leasure (1)
Pull Request Authors
  • bondarenkom (3)
  • doug-leasure (1)
  • jjniev01 (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads: unknown
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 7
proxy.golang.org: github.com/wpgp/poprf
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Dependent repos count: 5.7%
Average: 7.2%
Stargazers count: 7.4%
Forks count: 10.5%
Last synced: 6 months ago
proxy.golang.org: github.com/wpgp/popRF
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Dependent repos count: 5.7%
Average: 7.2%
Stargazers count: 7.4%
Forks count: 10.5%
Last synced: 6 months ago
cran.r-project.org: popRF

Random Forest-Informed Population Disaggregation

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 0
Rankings
Stargazers count: 13.8%
Forks count: 21.9%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 38.1%
Downloads: 89.7%
Last synced: 7 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.2.0 depends
  • doParallel * imports
  • foreach * imports
  • gdalUtils * imports
  • methods * imports
  • parallel * imports
  • plyr * imports
  • quantregForest * imports
  • randomForest * imports
  • raster * imports
  • stats * imports