Skip to content

Commit

Permalink
Fixes for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
r-barnes committed Nov 25, 2020
1 parent 2149496 commit ec2a040
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 29 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: dggridR
Type: Package
Title: Discrete Global Grids
Version: 2.0.6
Date: 2020-10-15
Version: 2.0.8
Date: 2020-11-25
Author: Richard Barnes [aut, cre], Kevin Sahr [aut, cph], Gerald Evenden [cph], Angus Johnson [cph], Frank Warmerdam [cph], Even Rouault [cph], Lian Song [ctb]
Maintainer: Richard Barnes <[email protected]>
NeedsCompilation: yes
Expand Down Expand Up @@ -30,6 +30,6 @@ Imports:
methods (>= 3.4.0)
LinkingTo: Rcpp
RcppModules: dgfuncs, gridgens, gridstats
RoxygenNote: 7.1.0
RoxygenNote: 7.1.1
VignetteBuilder: knitr, R.rsp
SystemRequirements: C++11
12 changes: 10 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
dggridR v2.0.5 (Release date: 2020-10-15)
dggridR v2.0.8 (Release date: 2020-11-25)
===============
*Fix CRAN warning about `streampos` deprecation.
* Still trying to get CRAN upload to work

dggridR v2.0.7 (Release date: 2020-11-25)
===============
* Fix CRAN links

dggridR v2.0.6 (Release date: 2020-10-15)
===============
* Fix CRAN warning about `streampos` deprecation.

dggridR v2.0.5 (Release date: 2020-04-30)
===============
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Credits
-------

The code in the 'src' directory is based off of
[DGGRIDv6.2b](http://www.discreteglobalgrids.org) by Kevin Sahr.
[DGGRIDv6.2b](https://www.discreteglobalgrids.org/) by Kevin Sahr.

However, Richard Barnes has made some significant alterations. These include:

Expand All @@ -139,10 +139,10 @@ Licensing

This package uses the following libraries:

* clipper: The clipper library has been released under the Boostv1 license by
* clipper: The clipper library has been released under the Boostv1 license by
Angus Johnson

* dggrid: Kevin Sahr has released dggrid as a
* dggrid: Kevin Sahr has released dggrid as a
"public domain software program"

* proj4lib: Gerald Evenden has released this code into the public domain. More
Expand Down
18 changes: 9 additions & 9 deletions man/dgquakes.Rd
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
\name{dgquakes}
\alias{dgquakes}
\title{All earthquakes with magnitude >=3.0 earthquakes for 2015}
\description{
\description{
A data frame with 19914 observations on the following 4 variables.
\describe{
\describe{
\item{\code{time}}{Time of the quake. Example: 2015-12-31T23:39:28.940Z}
\item{\code{lat}}{Latitude of the epicenter. Example: -7.0711}
\item{\code{lon}}{Longitude of the epicenter. Example: -173.5178}
\item{\code{mag}}{Magnitude of the quake. Example: 3.2}
}
}
\usage{data(dgquakes)}
\format{data frame}
\source{The USGS Earthquake Hazards Program (\url{http://earthquake.usgs.gov/earthquakes/}).}
\item{\code{lon}}{Longitude of the epicenter. Example: -173.5178}
\item{\code{mag}}{Magnitude of the quake. Example: 3.2}
}
}
\usage{data(dgquakes)}
\format{data frame}
\source{The USGS Earthquake Hazards Program (\url{https://earthquake.usgs.gov/earthquakes/search/}).}
\keyword{datasets}
24 changes: 12 additions & 12 deletions vignettes/dggridR.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ hgrids <- lapply(hdggses, function(dggs) dgearthgrid(dggs))
countries <- map_data("world")
orthobase <-ggplot() +
orthobase <-ggplot() +
geom_polygon(data=countries, aes(x=long, y=lat, group=group), fill=NA, color="black") +
scale_fill_gradient(low="blue", high="red")+
coord_map("ortho", orientation = c(0, 90, 0))+
Expand Down Expand Up @@ -77,7 +77,7 @@ Many details are included in the vignette.

# Grids

The following grids are available:
The following grids are available:

* ISEA3H: Icosahedral Snyder Equal Area Aperture 3 Hexagonal Grid
* ISEA4H: Icosahedral Snyder Equal Area Aperture 4 Hexagonal Grid
Expand Down Expand Up @@ -182,8 +182,8 @@ Table: ISEA3H grid cell characteristics.

## Binning Lat-Long Points

The following example demonstrates converting lat-long locations (the
epicenters of earthquakes) to discrete global grid locations (cell numbers), binning based on these numbers, and plotting the result. Additionally, the
The following example demonstrates converting lat-long locations (the
epicenters of earthquakes) to discrete global grid locations (cell numbers), binning based on these numbers, and plotting the result. Additionally, the
example demonstrates how to get the center coordinates of the cells.

```{r, results='hide', warning=FALSE, error=FALSE, message=FALSE}
Expand Down Expand Up @@ -229,7 +229,7 @@ didn't use this package :-)

```{r, fig.width=6, fig.height=4}
#Plot everything on a flat map
p<- ggplot() +
p<- ggplot() +
geom_polygon(data=countries, aes(x=long, y=lat, group=group), fill=NA, color="black") +
geom_polygon(data=grid, aes(x=long, y=lat, group=group, fill=count), alpha=0.4) +
geom_path (data=grid, aes(x=long, y=lat, group=group), alpha=0.4, color="white") +
Expand Down Expand Up @@ -329,7 +329,7 @@ grid <- dgcellstogrid(dggs,df$cell,frame=TRUE,wrapcells=TRUE)
countries <- map_data("world")
#Plot everything on a flat map
p<- ggplot() +
p<- ggplot() +
geom_polygon(data=countries, aes(x=long, y=lat, group=group), fill=NA, color="black") +
geom_polygon(data=grid, aes(x=long, y=lat, group=group), fill="green", alpha=0.4) +
geom_path (data=grid, aes(x=long, y=lat, group=group), alpha=0.4, color="white")
Expand Down Expand Up @@ -386,7 +386,7 @@ grid <- dgcellstogrid(dggs,df$cell,frame=TRUE,wrapcells=TRUE)
countries <- map_data("world")
#Plot everything on a flat map
p<- ggplot() +
p<- ggplot() +
geom_polygon(data=countries, aes(x=long, y=lat, group=group), fill=NA, color="black") +
geom_polygon(data=grid, aes(x=long, y=lat, group=group), fill="green", alpha=0.4) +
geom_path (data=grid, aes(x=long, y=lat, group=group), alpha=0.4, color="white")
Expand Down Expand Up @@ -424,7 +424,7 @@ sa_border <- readOGR(dsn=dg_shpfname_south_africa(), layer="ZAF_adm0")
sa_grid <- dgshptogrid(dggs, dg_shpfname_south_africa())
#Plot South Africa's borders and the associated grid
p<- ggplot() +
p<- ggplot() +
geom_polygon(data=sa_border, aes(x=long, y=lat, group=group), fill=NA, color="black") +
geom_polygon(data=sa_grid, aes(x=long, y=lat, group=group), fill="blue", alpha=0.4) +
geom_path (data=sa_grid, aes(x=long, y=lat, group=group), alpha=0.4, color="white") +
Expand Down Expand Up @@ -453,7 +453,7 @@ grid <- dgcellstogrid(dggs,cells,frame=TRUE,wrapcells=TRUE) #Get grid
countries <- map_data("world")
#Plot everything on a flat map
p<- ggplot() +
p<- ggplot() +
geom_polygon(data=countries, aes(x=long, y=lat, group=group), fill=NA, color="black") +
geom_polygon(data=grid, aes(x=long, y=lat, group=group), alpha=0.6, fill="purple") +
geom_path (data=grid, aes(x=long, y=lat, group=group), alpha=0.4, color="white")
Expand All @@ -469,7 +469,7 @@ p
* In the future, I plan to switch the package from using Kevin Sahr's dggrid
software to the discrete global grid system standards currently being developed
by OpenGeospatial. Those standards are being developed by a [software working
group](http://www.opengeospatial.org/projects/groups/dggsswg) right now, but
group](https://www.ogc.org/projects/groups/dggsswg/) right now, but
will one day be released. At that point, I expect that GDAL/OGR/PROJ4 will
incorporate the new standards making wider interoperability possible. Until that
time, Sahr's dggrid is the best option I've found.
Expand All @@ -478,10 +478,10 @@ time, Sahr's dggrid is the best option I've found.

# Credits

This R package was developed by Richard Barnes (http://rbarnes.org).
This R package was developed by Richard Barnes (https://rbarnes.org/).

The dggrid conversion software was developed predominantly by Kevin Sahr
(http://www.discreteglobalgrids.org), with contributions from a few others.
(https://www.discreteglobalgrids.org/), with contributions from a few others.

Large portions of the above documentation are drawn from the DGGRID version 6.2b
User Documentation, which is available in its entirety
Expand Down

0 comments on commit ec2a040

Please sign in to comment.