From 1ca7d701c4930a0f97196c650ca5df76b52bb4e3 Mon Sep 17 00:00:00 2001 From: pvictor Date: Tue, 26 Nov 2019 15:27:18 +0100 Subject: [PATCH] change maintainer --- DESCRIPTION | 17 ++++-- NAMESPACE | 2 +- README.md | 8 ++- man/spMaps.Rd | 156 +++++++++++++++++++++++++------------------------- 4 files changed, 96 insertions(+), 87 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0175d53..733ba9c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,15 +1,20 @@ Package: spMaps Type: Package Title: Europe SpatialPolygonsDataFrame Builder -Version: 0.3 -Date: 2018-05-03 +Version: 0.4.0 Authors@R: c( - person("Jalal-Edine", "ZAWAM", email = "jalal-edine.zawam@rte-france.com", role = c("aut", "cre")), + person(given = "Veronique", + family = "Bachelier", + role = c("aut", "cre"), + email = "veronique.bachelier@rte-france.com"), + person("Jalal-Edine", "ZAWAM", role = "aut"), person("Benoit", "Thieurmel", email = "benoit.thieurmel@datastorm.fr", role = "aut"), person("RTE", role = "cph") ) -Maintainer: Jalal-Edine ZAWAM -Description: Build custom Europe SpatialPolygonsDataFrame, if you don't know what is a SpatialPolygonsDataFrame see SpatialPolygons() in 'sp', by example for mapLayout() in 'antaresViz'. Antares is a powerful software developed by RTE to simulate and study electric power systems (more information about 'Antares' here: ). +Description: Build custom Europe SpatialPolygonsDataFrame, if you don't know what is + a SpatialPolygonsDataFrame see SpatialPolygons() in 'sp', by example for mapLayout() in 'antaresViz'. + Antares is a powerful software developed by RTE to simulate and study electric power systems + (more information about 'Antares' here: ). URL: https://github.com/rte-antares-rpackage/spMaps BugReports: https://github.com/rte-antares-rpackage/spMaps/issues License: GPL (>= 2) | file LICENSE @@ -19,7 +24,7 @@ Depends: R (>= 2.10), sp, raster, rgeos -RoxygenNote: 6.0.1 +RoxygenNote: 7.0.1 Suggests: testthat, covr, antaresViz diff --git a/NAMESPACE b/NAMESPACE index be5d29a..66cbce9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,4 +1,4 @@ -# Generated by roxygen2: do not edit by hand +# Generated by roxygen2: do not edit by hand export(getEuropeCountries) export(getEuropeReferenceTable) diff --git a/README.md b/README.md index 4cd6968..a701d2b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ +# The 'spMaps' R package + +> The `spMaps` package provides functions allow to build custom maps. + + [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/spMaps)](https://cran.r-project.org/package=spMaps)[![Build status](https://ci.appveyor.com/api/projects/status/cfjgghysd82xb99c?svg=true)](https://ci.appveyor.com/project/rte-antares-rpackage/spmaps) [![Build Status](https://travis-ci.org/rte-antares-rpackage/spMaps.svg?branch=master)](https://travis-ci.org/rte-antares-rpackage/spMaps) [![codecov](https://codecov.io/gh/rte-antares-rpackage/spMaps/branch/master/graph/badge.svg)](https://codecov.io/gh/rte-antares-rpackage/spMaps) + -# The 'spMaps' R package -The `spMaps` package provides functions allow to build custom maps. ## Installation diff --git a/man/spMaps.Rd b/man/spMaps.Rd index 2615215..4a9d4f0 100644 --- a/man/spMaps.Rd +++ b/man/spMaps.Rd @@ -1,79 +1,79 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{getEuropeReferenceTable} -\alias{getEuropeReferenceTable} -\alias{getEuropeCountries} -\alias{getEuropeStates} -\alias{spMaps} -\alias{getSpMaps} -\title{Get custom Europe map (\code{SpatialPolygonsDataFrame})} -\usage{ -getEuropeReferenceTable() - -getEuropeCountries(mergeCountry = TRUE) - -getEuropeStates() - -getSpMaps(countries = "all", states = NULL, mergeCountry = TRUE) -} -\arguments{ -\item{mergeCountry}{\code{boolean}. Merge country ? (UK, Belgium ...). Default to TRUE.} - -\item{countries}{\code{character}. Vector of wanted countries, without details / states. -Must referred to \code{code} column of the reference table \code{getEuropeReferenceTable}. -"all" (default) keep all countries} - -\item{states}{\code{character}. Vector of wanted countries, with details / states. -Must referred to \code{code} column of the reference table \code{getEuropeReferenceTable}. -"all" keep all countries. NULL as default.} -} -\value{ -\code{SpatialPolygonsDataFrame} -} -\description{ -This function builds a custom Europe map and return a \code{SpatialPolygonsDataFrame}. -The output can be use by example in \link[antaresViz]{mapLayout} with the \code{map} argument. -} -\examples{ - -# default map : Europe without states -europe_cty <- getSpMaps() -plot(europe_cty) - -# subset on some countries -ref_table <- getEuropeReferenceTable() - -italy_spain_fra <- getSpMaps(countries = c("FRA", "ITA", "ESP")) -plot(italy_spain_fra) - -\dontrun{ -italy_spain_fra_states <- getSpMaps(countries = NULL, states = c("FRA", "ITA", "ESP")) -plot(italy_spain_fra_states) - -# combine countries and states -combine_map <- getSpMaps(countries = c("ITA", "ESP"), states = "FRA") -plot(combine_map) - -# build your custom map : you can use directly data -# to subset the area you really want -europe_states <- getEuropeStates() -europe_countries <- getEuropeCountries() - -# for example, have a look to GBR states map -summary(europe_states) -gbr_states_districts <- europe_states[ - europe_states$code \%in\% "GBR" & - europe_states$type \%in\% "Administrative County",] -plot(gbr_states_districts) - -# combine with another map : you just have to have the same columns... -# getSpMaps only return "name" and "code" column -custom_states <- rbind( - getSpMaps(countries = NULL, states = "FRA"), - gbr_states_districts[, c("name", "code"), drop = FALSE]) - -plot(custom_states) - -} - +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{getEuropeReferenceTable} +\alias{getEuropeReferenceTable} +\alias{getEuropeCountries} +\alias{getEuropeStates} +\alias{spMaps} +\alias{getSpMaps} +\title{Get custom Europe map (\code{SpatialPolygonsDataFrame})} +\usage{ +getEuropeReferenceTable() + +getEuropeCountries(mergeCountry = TRUE) + +getEuropeStates() + +getSpMaps(countries = "all", states = NULL, mergeCountry = TRUE) +} +\arguments{ +\item{mergeCountry}{\code{boolean}. Merge country ? (UK, Belgium ...). Default to TRUE.} + +\item{countries}{\code{character}. Vector of wanted countries, without details / states. +Must referred to \code{code} column of the reference table \code{getEuropeReferenceTable}. +"all" (default) keep all countries} + +\item{states}{\code{character}. Vector of wanted countries, with details / states. +Must referred to \code{code} column of the reference table \code{getEuropeReferenceTable}. +"all" keep all countries. NULL as default.} +} +\value{ +\code{SpatialPolygonsDataFrame} +} +\description{ +This function builds a custom Europe map and return a \code{SpatialPolygonsDataFrame}. +The output can be use by example in \link[antaresViz]{mapLayout} with the \code{map} argument. +} +\examples{ + +# default map : Europe without states +europe_cty <- getSpMaps() +plot(europe_cty) + +# subset on some countries +ref_table <- getEuropeReferenceTable() + +italy_spain_fra <- getSpMaps(countries = c("FRA", "ITA", "ESP")) +plot(italy_spain_fra) + +\dontrun{ +italy_spain_fra_states <- getSpMaps(countries = NULL, states = c("FRA", "ITA", "ESP")) +plot(italy_spain_fra_states) + +# combine countries and states +combine_map <- getSpMaps(countries = c("ITA", "ESP"), states = "FRA") +plot(combine_map) + +# build your custom map : you can use directly data +# to subset the area you really want +europe_states <- getEuropeStates() +europe_countries <- getEuropeCountries() + +# for example, have a look to GBR states map +summary(europe_states) +gbr_states_districts <- europe_states[ + europe_states$code \%in\% "GBR" & + europe_states$type \%in\% "Administrative County",] +plot(gbr_states_districts) + +# combine with another map : you just have to have the same columns... +# getSpMaps only return "name" and "code" column +custom_states <- rbind( + getSpMaps(countries = NULL, states = "FRA"), + gbr_states_districts[, c("name", "code"), drop = FALSE]) + +plot(custom_states) + +} + }