Skip to content

Commit

Permalink
prepare for cran
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Nov 27, 2019
1 parent b8b3545 commit 629613c
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 22 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
shiny-demo
javascript
^codecov\.yml$
^cran-comments\.md$
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Authors@R: c(
family = "Bachelier",
role = c("aut", "cre"),
email = "[email protected]"),
person("Jalal-Edine", "ZAWAM", email = "[email protected]", role = "aut"),
person("Jalal-Edine", "ZAWAM", role = "aut"),
person("Benoit", "Thieurmel", email = "[email protected]", role = "aut"),
person("Francois", "Guillem", role = "aut"),
person("RTE", role = "cph")
Expand Down
6 changes: 3 additions & 3 deletions R/add_flows.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#' direction of the flow.
#'
#' @param lng0 Longitude of the origin of the flow.
#' @param lat0 Lattitude of the origin of the flow.
#' @param lat0 Latitude of the origin of the flow.
#' @param lng1 Longitude of the destination of the flow.
#' @param lat1 Lattitude of the destination of the flow.
#' @param lat1 Latitude of the destination of the flow.
#' @param color Color of the flow.
#' @param flow Value of the flow between the origin and the destination. If
#' argument \code{dir} is not set, negative values are interpreted as flows
Expand All @@ -33,7 +33,7 @@
#' leaflet() %>% addTiles() %>%
#' addFlows(0, 0, 1, 1, flow = 10)
#'
#' # Electric exchanges between France and neighbouring countries
#' # Electric exchanges between France and neighboring countries
#' data("eco2mixBalance")
#' bal <- eco2mixBalance
#' leaflet() %>% addTiles() %>%
Expand Down
6 changes: 3 additions & 3 deletions R/add_minicharts.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#'
#' @param map A leaflet map object created with \code{\link[leaflet]{leaflet}}.
#' @param lng Longitude where to place the charts.
#' @param lat Lattitude where to place the charts.
#' @param lat Latitude where to place the charts.
#' @param chartdata A numeric matrix with number of rows equal to the number of
#' elements in \code{lng} or \code{lat} and number of column equal to the
#' number of variables to represent. If parameter \code{time} is set, the
Expand Down Expand Up @@ -47,7 +47,7 @@
#' @param transitionTime Duration in milliseconds of the transitions when a
#' property of a chart is updated.
#' @param popup Options that control popup generation.
#' @param layerId An ID variable. It is mandatoy when one wants to update some
#' @param layerId An ID variable. It is mandatory when one wants to update some
#' chart with \code{updateMinicharts}.
#' @param legend If TRUE and if data has column names, then a legend is
#' automatically added to the map.
Expand All @@ -59,7 +59,7 @@
#' shown when the map is created. It is used only when argument \code{time} is
#' set.
#' @param onChange (For power users who know javascript) A character string
#' containing javascript code that is exexuted each time a chart is updated.
#' containing javascript code that is executed each time a chart is updated.
#' See the details section to understand why and how to use this parameter.
#'
#' @details
Expand Down
6 changes: 3 additions & 3 deletions R/data-doc.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
#' january 2013 to february 2017.
#'
#' In addition to the total production, the table contains one column for each
#' type of production. The table also contains the lattitude and longitude of
#' type of production. The table also contains the latitude and longitude of
#' the center of the regions.
#'
#' \code{eco2mixBalance} is an extract of \code{eco2mix} that contains only
#' exchanges between France and neighbouring countries, in a convenient format
#' to represent flows on a map.
#'
#' @docType data
#' @author Francois Guillem \email{[email protected]}
#' @author Francois Guillem
#' @references \url{http://www.rte-france.com/fr/eco2mix/eco2mix}
#' @keywords datasets
"eco2mix"
Expand All @@ -29,7 +29,7 @@
#' A character vector containing ten colors. These colors are used as the default
#' color palette
#' @docType data
#' @author Francois Guillem \email{[email protected]}
#' @author Francois Guillem
#' @references \url{https://github.com/d3/d3-scale}
#' @keywords datasets
"d3.schemeCategory10"
11 changes: 11 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Test environments
* local OS X install, R 3.6.1
* ubuntu 14.04 (on travis-ci), R 3.6.1
* win-builder (devel and release)

## R CMD check results

0 errors | 0 warnings | 1 note

* There's a new maintainer to the package. Thank you!

8 changes: 4 additions & 4 deletions man/addFlows.Rd

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

6 changes: 3 additions & 3 deletions man/addMinicharts.Rd

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

2 changes: 1 addition & 1 deletion man/d3.schemeCategory10.Rd

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

4 changes: 2 additions & 2 deletions man/eco2mix.Rd

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

4 changes: 2 additions & 2 deletions vignettes/introduction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let's have a look to a concrete example.

The package provides a table that contains the electric production, consumption and exchanges of France from january 2010 to february 2017 and of 12 french regions from january 2013 to february 2017.

In addition to the total production, the table contains one column for each type of production. The table also contains the lattitude and longitude of the center of the regions.
In addition to the total production, the table contains one column for each type of production. The table also contains the latitude and longitude of the center of the regions.

```{r}
library(leaflet.minicharts)
Expand Down Expand Up @@ -112,7 +112,7 @@ This is nice, isn't it?

## Animated maps

Until now, we have only represented aggregated data but it would be nice to create a map that represents the evolution over time of some variables. It is actually easy with `leaflet.minicharts`. The first step is to construct a table containing longitude, lattitude, a time column and the variables we want to represent. The table `eco2mix` already has all these columns. We only need to filter the rows containing data for the entire country.
Until now, we have only represented aggregated data but it would be nice to create a map that represents the evolution over time of some variables. It is actually easy with `leaflet.minicharts`. The first step is to construct a table containing longitude, latitude, a time column and the variables we want to represent. The table `eco2mix` already has all these columns. We only need to filter the rows containing data for the entire country.

```{r}
prodRegions <- eco2mix %>% filter(area != "France")
Expand Down

0 comments on commit 629613c

Please sign in to comment.