Skip to content

Commit

Permalink
Merge pull request #6 from ropensci/gganimate
Browse files Browse the repository at this point in the history
Gganimate
  • Loading branch information
rmendels authored Jul 27, 2019
2 parents 13abbd7 + 929672b commit be76bad
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 108 deletions.
17 changes: 8 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: plotdap
Title: Easily Visualize Data from 'ERDDAP' Servers via the 'rerddap' Package
Version: 0.0.2
Date: 2019-04-29
Version: 0.0.3
Date: 2019-07-25
Authors@R: c(
person("Carson", "Sievert", role = "aut"),
person("Roy", "Mendelssohn", role = c("aut", "ctb", "cre"), email = "[email protected]"))
Expand All @@ -10,7 +10,7 @@ License: MIT + file LICENSE
URL: https://github.com/ropensci/plotdap
BugReports: https://github.com/ropensci/plotdap/issues
Depends:
R (>= 3.5.0),
R (>= 3.5.0),
rerddap
Imports:
dplyr,
Expand All @@ -19,21 +19,20 @@ Imports:
lazyeval,
lubridate,
magrittr,
mapdata,
maps (>= 3.2.0),
maps,
maptools,
plot3D,
raster,
rgdal,
rgeos,
raster,
scales,
sf,
tidyr
Suggests:
testthat,
Cairo,
knitr,
rmarkdown
mapdata,
rmarkdown,
testthat
RoxygenNote: 6.1.1
LazyData: true
Encoding: UTF-8
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# plotdap 0.0.3
* fixed small bug in an example that was causing 'pgkdown' to fail
* fixed Namespace and Import problems

# plotdap 0.0.2
First CRAN release

13 changes: 5 additions & 8 deletions R/add_ggplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
#' @rdname add_ggplot
#' @examples
#'
#' library(ggplot2)
#'
#' add_ggplot(
#' plotdap(
#' crs = "+proj=laea +y_0=0 +lon_0=155 +lat_0=-90 +ellps=WGS84 +no_defs",
#' mapColor = "black"
#' ),
#' theme_bw()
#' p <- plotdap(
#' crs = "+proj=laea +y_0=0 +lon_0=155 +lat_0=-90 +ellps=WGS84 +no_defs")
#' p <- add_ggplot(
#' p,
#' ggplot2::theme_bw()
#' )
#'
#'
Expand Down
8 changes: 3 additions & 5 deletions R/add_tabledap.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
#' Currently only implemented for \code{method='ggplot2'} and requires the
#' gganimate package.
#' @param cumulative - if animation should be cumulative -default FALSE
#' @param ... arguments passed along to \code{geom_sf()}
#' (if \code{method='ggplot2'}, otherwise ignored).
#' @param ... arguments passed along to \code{geom_sf()} (if \code{method='ggplot2'}, otherwise ignored).
#' @return A plotdap object
#' @export
#' @rdname add_tabledap
Expand All @@ -32,10 +31,9 @@
#'\donttest{
#' sardines <- tabledap(
#' 'FRDCPSTrawlLHHaulCatch',
#' fields = c('latitude', 'longitude', 'time',
#' 'scientific_name', 'subsample_count'),
#' fields = c('latitude', 'longitude', 'time', 'scientific_name', 'subsample_count'),
#' 'time>=2010-01-01', 'time<=2012-01-01',
#' scientific_name="Sardinops sagax"'
#' scientific_name="Sardinops sagax"
#' )
#'}
#'
Expand Down
2 changes: 1 addition & 1 deletion R/plotdap.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ plotdap <- function(method = c("ggplot2", "base"),
method <- match.arg(method, method)

# packages used in both methods
require_packages(c("sf", "maps", "lazyeval"))
require_packages(c("sf", "maps", "lazyeval", "rgeos", "rgdal", "maptools"))

# maps is bad at namespacing
try_require("mapdata", "plotdap")
Expand Down
55 changes: 16 additions & 39 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,33 @@
## This is a minor update

- fix small error in docs that was causing pkgdown to fail
- fixed Import and Namespace problems reported on CRAN checks
- On Windows, previous version built with --no-vignettes please continue that
if Vignette build takes too long
- fixed single note on VignetteIndexEntry

## Test environments
* local OS X install, R 3.5.3
* Fedora Linux, R-devel, clang, gfortran (on RHub)
* local OS X install, R 3.6.1
* Fedora Linux on RHub)
* win-builder (devel and release)

## R CMD check results

### OS X

Duration: 8m 35.2s
Duration: 3m 53s

0 errors ✔ | 0 warnings ✔ | 0 notes ✔

### Winbuilder release
New submission

Possibly mis-spelled words in DESCRIPTION:
rerddap (9:81)

Spelling is correct

### Winbuilder release
OK

### Winbuilder devel

New submission

Possibly mis-spelled words in DESCRIPTION:
rerddap (9:81)

Spelling is correct
OK

### RHUb Windows Server 2008 R2 SP1, R-devel, 32/64 bit

New submission

Possibly mis-spelled words in DESCRIPTION:
rerddap (9:81)

Spelling is Correct

OK
### RHub Fedora

New submission

Possibly mis-spelled words in DESCRIPTION:
rerddap (9:81)

Spelling is correct

### Comments

In response to reviewer's comments on last submission, the `rerddap` that
would download the data that is contained in the package datasets have
been uncommented and put in \donttest{}. All other requested changes made.

* This is a new release.
OK
13 changes: 5 additions & 8 deletions man/add_ggplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 32 additions & 2 deletions man/add_tabledap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added vignettes/sardines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vignettes/sardines2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 3 additions & 36 deletions vignettes/using_plotdap.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: ""
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Vignette Title}
%\VignetteIndexEntry{Using plotdap}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand Down Expand Up @@ -243,22 +243,7 @@ p2
```


```{r plot_sardines, echo = FALSE, out.width = '.49\\linewidth', fig.width = 3, fig.height = 4, message = FALSE, warning = FALSE}
p1 <- add_tabledap(
plotdap(crs = "+proj=robin", mapTitle = "subsample count"),
sardines,
~subsample_count
)
p2 <- add_tabledap(
plotdap(crs = "+proj=robin", mapTitle = "Log subsample count"),
sardines,
~log2(subsample_count)
)
p1
p2
```

![](sardines.png)


## Modifying `tabledap()` layers
Expand All @@ -285,25 +270,7 @@ p2
```


```{r plot_sardines2, echo = FALSE, fig.hold = TRUE, out.width = '.49\\linewidth', fig.width = 3, fig.height = 4, message = FALSE, warning = FALSE}
p1 <- add_tabledap(
plotdap(crs = "+proj=robin", mapTitle = "Sardines - change color"),
sardines,
~subsample_count,
color = "density",
)
p2 <- add_tabledap(
plotdap(crs = "+proj=robin", mapTitle = "Sardines - change shape and size"),
sardines,
~subsample_count,
shape = 4,
size = 1.
)
p1
p2
```

![](sardines2.png)

For further details about these arguments, please refer to the documentation on `help(add_tabledap)`.

Expand Down

0 comments on commit be76bad

Please sign in to comment.