Skip to content
Permalink
Browse files

Add USAID PREDICT funder information

  • Loading branch information...
noamross committed Apr 11, 2018
1 parent 9dfb4ea commit 5a9f0a1d4e8a4eb6fb5ad2391bb9f205c8e90199
Showing with 45 additions and 75 deletions.
  1. +2 βˆ’1 DESCRIPTION
  2. +2 βˆ’1 README.Rmd
  3. +30 βˆ’57 README.md
  4. +8 βˆ’2 codemeta.json
  5. +1 βˆ’13 cran-comments.md
  6. BIN vignettes/predictfooter.png
  7. +2 βˆ’1 vignettes/using-fasterize.Rmd
@@ -7,7 +7,8 @@ Authors@R: c(
comment=c(ORCID = "0000-0002-2136-0000")),
person("Michael", "Sumner", role = "ctb",
comment=c(ORCID = "0000-0002-2471-7511")),
person("EcoHealth Alliance", role="cph"))
person("EcoHealth Alliance", role="cph"),
person("USAID PREDICT", role = "fnd"))
Description: Provides a drop-in replacement for rasterize() from the 'raster'
package that takes 'sf'-type objects, and is much faster. There is support
for the main options provided by the rasterize() function, including
@@ -113,7 +113,8 @@ plot(mammal_raster, axes=FALSE, box=FALSE)

## About

**fasterize** is developed openly at [EcoHealth Alliance](https://github.com/ecohealthalliance).
**fasterize** is developed openly at [EcoHealth Alliance](https://github.com/ecohealthalliance) under the USAID PREDICT project.
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

[![http://www.ecohealthalliance.org/](vignettes/eha-footer.png)](http://www.ecohealthalliance.org/)
[![http://www.vetmed.ucdavis.edu/ohi/predict/](vignettes/predictfooter.png)](http://www.vetmed.ucdavis.edu/ohi/predict/)
@@ -1,59 +1,38 @@

# fasterize
fasterize
=========

Fast sf-to-raster conversion

[![Project Status: Active – The project has reached a stable, usable
state and is being actively
developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![MIT Licensed - Copyright 2016 EcoHealth
Alliance](https://img.shields.io/badge/license-MIT-blue.svg)](https://badges.mit-license.org/)
[![Linux Build
Status](https://travis-ci.org/ecohealthalliance/fasterize.svg?branch=master)](https://travis-ci.org/ecohealthalliance/fasterize)
[![Windows Build
status](https://ci.appveyor.com/api/projects/status/3n59bs19ovex5d1t?svg=true)](https://ci.appveyor.com/project/NoamRoss/fasterize-7kxl2)
[![Coverage
Status](https://codecov.io/gh/ecohealthalliance/fasterize/branch/master/graph/badge.svg)](https://codecov.io/gh/ecohealthalliance/fasterize)
[![](http://www.r-pkg.org/badges/version/fasterize)](http://www.r-pkg.org/pkg/fasterize)
[![CRAN RStudio mirror
downloads](http://cranlogs.r-pkg.org/badges/fasterize)](http://www.r-pkg.org/pkg/fasterize)

**fasterize** is a high-performance replacement for the `rasterize()`
function in the [**raster**](https://cran.r-project.org/package=raster)
package.

Functionality is currently limited to rasterizing polygons in
[**sf**](https://cran.r-project.org/package=sf)-type data frames.

## Installation
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![MIT Licensed - Copyright 2016 EcoHealth Alliance](https://img.shields.io/badge/license-MIT-blue.svg)](https://badges.mit-license.org/) [![Linux Build Status](https://travis-ci.org/ecohealthalliance/fasterize.svg?branch=master)](https://travis-ci.org/ecohealthalliance/fasterize) [![Windows Build status](https://ci.appveyor.com/api/projects/status/3n59bs19ovex5d1t?svg=true)](https://ci.appveyor.com/project/NoamRoss/fasterize-7kxl2) [![Coverage Status](https://codecov.io/gh/ecohealthalliance/fasterize/branch/master/graph/badge.svg)](https://codecov.io/gh/ecohealthalliance/fasterize) [![](http://www.r-pkg.org/badges/version/fasterize)](http://www.r-pkg.org/pkg/fasterize) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/fasterize)](http://www.r-pkg.org/pkg/fasterize)

**fasterize** is a high-performance replacement for the `rasterize()` function in the [**raster**](https://cran.r-project.org/package=raster) package.

Functionality is currently limited to rasterizing polygons in [**sf**](https://cran.r-project.org/package=sf)-type data frames.

Installation
------------

Install the current version of **fasterize** from CRAN:

``` r
install.packages('fasterize')
```

Install the development version of **fasterize** with
[**devtools**](https://cran.r-project.org/package=devtools):
Install the development version of **fasterize** with [**devtools**](https://cran.r-project.org/package=devtools):

``` r
devtools::install_github("ecohealthalliance/fasterize")
```

**fasterize** uses [**Rcpp**](https://cran.r-project.org/package=Rcpp)
and thus requires a compile toolchain to install from source. Testing
(and most use) requires [**sf**](https://cran.r-project.org/package=sf),
which requires GDAL (\>= 2.0.0), GEOS (\>= 3.3.0), and PROJ.4 (\>=
4.8.0) to be installed on your system.
**fasterize** uses [**Rcpp**](https://cran.r-project.org/package=Rcpp) and thus requires a compile toolchain to install from source. Testing (and most use) requires [**sf**](https://cran.r-project.org/package=sf), which requires GDAL (>= 2.0.0), GEOS (>= 3.3.0), and PROJ.4 (>= 4.8.0) to be installed on your system.

## Usage
Usage
-----

The main function, `fasterize()`, takes the same inputs as
`raster::rasterize()` but currently has fewer options and is is limited
to rasterizing polygons.
The main function, `fasterize()`, takes the same inputs as `raster::rasterize()` but currently has fewer options and is is limited to rasterizing polygons.

A method for creating empty rasters from `sf` objects is provided, and
raster plot methods are re-exported.
A method for creating empty rasters from `sf` objects is provided, and raster plot methods are re-exported.

``` r
library(raster)
@@ -71,11 +50,12 @@ r <- fasterize(pols, r, field = "value", fun="sum")
plot(r)
```

![](vignettes/readme-example-1-1.png)<!-- -->
![](vignettes/readme-example-1-1.png)

## Performance
Performance
-----------

Let’s compare `fasterize()` to `raster::rasterize()`:
Let's compare `fasterize()` to `raster::rasterize()`:

``` r
pols_r <- as(pols, "Spatial")
@@ -88,14 +68,11 @@ print(bench, digits = 3)
```

#> Unit: milliseconds
#> expr min lq mean median uq max neval cld
#> rasterize 340.376 359.69 379.197 369.552 386.65 497.83 100 b
#> fasterize 0.337 0.37 0.545 0.414 0.64 2.51 100 a
#> expr min lq mean median uq max neval cld
#> rasterize 342.486 379.028 426.959 404.759 434.029 859.01 100 b
#> fasterize 0.337 0.368 0.499 0.413 0.636 2.02 100 a

How does `fasterize()` do on a large set of polygons? Here I download
the IUCN shapefile for the ranges of all terrestrial mammals and
generate a 1/6 degree world map of mammalian biodiversity by rasterizing
all the layers.
How does `fasterize()` do on a large set of polygons? Here I download the IUCN shapefile for the ranges of all terrestrial mammals and generate a 1/6 degree world map of mammalian biodiversity by rasterizing all the layers.

``` r
if(!dir.exists("Mammals_Terrestrial")) {
@@ -129,22 +106,18 @@ print(bench2, digits=3)

#> Unit: seconds
#> expr min lq mean median uq max neval
#> mammals 0.856 0.869 0.887 0.88 0.902 0.955 20
#> mammals 0.847 0.857 0.883 0.886 0.894 0.963 20

``` r
par(mar=c(0,0.5,0,0.5))
plot(mammal_raster, axes=FALSE, box=FALSE)
```

![](vignettes/readme-so-damn-fast-1.png)<!-- -->
![](vignettes/readme-so-damn-fast-1.png)

## About
About
-----

**fasterize** is developed openly at [EcoHealth
Alliance](https://github.com/ecohealthalliance). Please note that this
project is released with a [Contributor Code of
Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree
to abide by its
terms.
**fasterize** is developed openly at [EcoHealth Alliance](https://github.com/ecohealthalliance) under the USAID PREDICT project. Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

[![http://www.ecohealthalliance.org/](vignettes/eha-footer.png)](http://www.ecohealthalliance.org/)
[![http://www.ecohealthalliance.org/](vignettes/eha-footer.png)](http://www.ecohealthalliance.org/) [![http://www.vetmed.ucdavis.edu/ohi/predict/](vignettes/predictfooter.png)](http://www.vetmed.ucdavis.edu/ohi/predict/)
@@ -152,8 +152,14 @@
}
],
"contIntegration": "https://travis-ci.org/ecohealthalliance/fasterize",
"developmentStatus": "[![Project Status: Active – The project has reached a stable, usable",
"developmentStatus": "active",
"releaseNotes": "https://github.com/ecohealthalliance/fasterize/blob/master/NEWS.md",
"readme": "https://github.com/ecohealthalliance/fasterize/blob/master/README.md",
"fileSize": "539.001KB"
"fileSize": "960.595KB",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Central R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
}
}
@@ -1,13 +1,6 @@
## Response to comments

This is a second resubmission. Per request, I have quoted all package names and
added parentheses to all function names in the DESCRIPTION. I have also found
and added a citation and DOI for the algorithm implemented.

In addition, sf has been moved from `Imports:` to `Suggests:` and I have
updated documentation. We have also added ORCIDs for authors. The package
has been tested again and passes R CMD check on local OSX and all r-hub
platforms.
Update author and funder information.

## Test environments
* local OS X install, R 3.4.4
@@ -22,9 +15,4 @@ platforms.
* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Noam Ross <ross@ecohealthalliance.org>'

New submission

Possibly mis-spelled words in DESCRIPTION:
al (13:13) (This is from 'et al.' in the citation.)


Binary file not shown.
@@ -135,6 +135,7 @@ plot(mammal_raster, axes=FALSE, box=FALSE)
About
-----

**fasterize** is developed openly at [EcoHealth Alliance](https://github.com/ecohealthalliance).
**fasterize** is developed openly at [EcoHealth Alliance](https://github.com/ecohealthalliance) under the USAID PREDICT project..

[![http://www.ecohealthalliance.org/](eha-footer.png){ width=100% }](http://www.ecohealthalliance.org/)
[![http://www.vetmed.ucdavis.edu/ohi/predict/](predictfooter.png){ width=100% }](http://www.vetmed.ucdavis.edu/ohi/predict/)

0 comments on commit 5a9f0a1

Please sign in to comment.
You can’t perform that action at this time.