plot_bidev {MTA}R Documentation

Plot Multiscalar Typology (2 deviations)

Description

Vizualizing bidev and select some territorial units on it.

Usage

plot_bidev(
  x,
  dev1,
  dev2,
  breaks = c(25, 50, 100),
  dev1.lab = NULL,
  dev2.lab = NULL,
  lib.var = NULL,
  lib.val = NULL,
  cex.lab = 1,
  cex.axis = 0.7,
  cex.pt = 0.5,
  cex.names = 0.8,
  pos.names = 4
)

Arguments

x

a sf object or a dataframe including 2 pre-calculated deviations.

dev1

column name of the first relative deviation in x.

dev2

coumn name of the second relative deviation in x.

breaks

distance to the index 100 (average of the context), in percentage. A vector of three values. Defaut c(25,50,100). 25 to indexes 80 and 125. 50 and 200.

dev1.lab

label to be put in x-axis of the scatter plot (default: NULL).

dev2.lab

label to be put in y-axis of the scatter plot (default: NULL).

lib.var

column name of x including territorial units name/code we want to display on the plot.

lib.val

a vector of territorial units included in lib.label we want to display on the plot.

cex.lab

size of the axis label text (default = 1).

cex.axis

size of the tick label numbers (default = 0.7).

cex.pt

size of the dot used for extract specific territorial units (default 0.5).

cex.names

size of the territorial units labels if selected (default 0.8).

pos.names

position of territorial units labels (default 4, to the right).

Value

A scatter-plot displaying the 13 bidev categories, which are the synthesis of the position of territorial units according to 2 deviations and their respective distance to the average. X-Y axis are expressed in logarithm (25 being index 80).

bidev typology values :

Examples

# Load data
library(sf)
com <- st_read(system.file("metroparis.gpkg", package = "MTA"), layer = "com", quiet = TRUE)

# Prerequisite  - Compute 2 deviations
com$gdev <- gdev(x = com, var1 = "INC", var2 = "TH")
com$tdev <- tdev(x = com, var1 = "INC", var2 = "TH", key = "EPT")

# EX1 standard breaks with four labels
plot_bidev(x = com, 
           dev1 = "gdev", 
           dev2 = "tdev",
           dev1.lab = "General deviation (MGP Area)",
           dev2.lab = "Territorial deviation (EPT of belonging)",
           lib.var = "LIBCOM",
           lib.val =  c("Marolles-en-Brie", "Suresnes", 
                        "Clichy-sous-Bois", "Les Lilas"))

# EX2, change breaks, enlarge breaks 
plot_bidev(x = com,
           breaks = c(75, 150, 300),
           dev1 = "gdev", 
           dev2 = "tdev", 
           dev1.lab = "General deviation (MGP Area)",
           dev2.lab = "Territorial deviation (EPT of belonging)")

[Package MTA version 0.6.0 Index]