Learn R Programming

CvmortalityMult (version 1.1.1)

SpainMap: Spain National map information

Description

This data contains information to plot the percentiles plot in Spanish regions. Therefore, the users only have to provide a specific variable to show in regions of Spain.

Usage

SpainMap(regionvalue, main, name, bigred = TRUE)

Value

a map from the regions of Spain colored with the variable provided by the user.

Arguments

regionvalue

vector with the values that you want to plot in percentiles in the Spain map.

main

the specific title of the map plot

name

the assigned name for the legend in map plot.

bigred

if the user wants red color for bigger values in the regions bigred == TRUE (default value). However if the user wants to modify the colors and assign red to lower values bigred == FALSE.

References

Spanish National Institute of Statistics (INE) (2023). Tablas de mortalidad, metodologia. Technical report, Instituto Nacional de Estadistica

Examples

Run this code
name <- c("Ii")
main <- c("Multiplicative for males")
regionvalue <- c(0.131867619, -0.063994652,  0.088094096,
                 0.019685552,  0.064671498,   0.012212161,
                -0.088864474, -0.146079884, -0.017703536,
                 0.050376721,  0.052476852, -0.022871202,
                -0.093952332,  0.049266816, -0.101224890,
                 0.001481333, -0.078523511)

library(sf)

SpainMap(regionvalue, main, name)

Run the code above in your browser using DataLab