Commit 91081bf3 authored by Grelot Frederic's avatar Grelot Frederic :swimmer_tone5:
Browse files

Merge branch '8-refactor-map_so_ii-theme' into 'master'

Resolve "refactor map_so_ii theme"

Closes #8

See merge request !10
Showing with 428 additions and 370 deletions
+428 -370
Package: geau
Title: Utilities very useful to share within geau-inondation team
Version: 1.0.7.0
Version: 1.0.8.0
Authors@R:
c(
person(given = "Frédéric",
......
......@@ -163,7 +163,7 @@
#'
#' A dataset containing the population of commune in so-ii according to INSEE.
#'
#' @format numeric matrix
#' @format numeric matrix 78 rows, 33 columns
#' \describe{
#' \item{row}{commune as in so_ii_scope}
#' \item{column}{year}
......
This diff is collapsed.
......@@ -4,25 +4,11 @@ so_ii_onrn = read.csv2(
geau::current_version("data-common/so-ii/onrn"),
row.names = 1
)
class(so_ii_population) = "data.frame"
rownames(so_ii_population) = so_ii_population[["CODGEO"]]
selection = grep(
"PMUN|PSCDC|PTOT",
colnames(so_ii_population),
value = TRUE
)
so_ii_population = as.matrix(
so_ii_population[geau::so_ii_scope, selection]
)
year = gsub("PMUN", "20", selection)
year = gsub("PTOT", "19", year)
year = gsub("1919", "19", year)
year = gsub("1918", "18", year)
dimnames(so_ii_population)[[2]] = year
so_ii_onrn = so_ii_onrn[geau::so_ii_scope, ]
# updating datasets
# actual = setwd(file.path(system.file(package = "geau"), ".."))
actual = setwd("geau")
usethis::use_data(so_ii_population, internal = FALSE, overwrite = TRUE)
usethis::use_data(so_ii_onrn, internal = FALSE, overwrite = TRUE)
setwd(actual)
......@@ -11,7 +11,7 @@ so_ii_population = readxl::read_xlsx(
class(so_ii_population) = "data.frame"
rownames(so_ii_population) = so_ii_population[["CODGEO"]]
selection = grep(
"PMUN|PSCDC|PTOT",
"PMUN|PSDC|PTOT",
colnames(so_ii_population),
value = TRUE
)
......@@ -19,6 +19,7 @@ so_ii_population = as.matrix(
so_ii_population[geau::so_ii_scope, selection]
)
year = gsub("PMUN", "20", selection)
year = gsub("PSDC", "19", year)
year = gsub("PTOT", "19", year)
year = gsub("1919", "19", year)
year = gsub("1918", "18", year)
......
No preview for this file type
......@@ -5,7 +5,7 @@
\alias{so_ii_population}
\title{Population for so-ii}
\format{
numeric matrix
numeric matrix 78 rows, 33 columns
\describe{
\item{row}{commune as in so_ii_scope}
\item{column}{year}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment