## Reading layer `Parish_MC' from data source `C:\Users\s-das\Syncplicity Folders\MyProjects_IMP\MY_Papers_V2\TRB 2020\00000000 FINALz\0001 tca Motorcycle LA\ParishWise_MC\Parish_MC.shp' using driver `ESRI Shapefile'
## Simple feature collection with 64 features and 10 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -94.04319 ymin: 28.85423 xmax: -88.75834 ymax: 33.01955
## CRS: 4269

## [1] "PARISH" "FIPS" "PARISH_FIP" "Parish_Num" "SHAPE_Leng"
## [6] "Shape_Le_1" "Shape_Area" "Par" "Par_1" "Crash"
## PARISH FIPS PARISH_FIP Parish_Num SHAPE_Leng Shape_Le_1 Shape_Area Par
## 1 Webster 22119 119 60 227550.1 2.214292 0.15337652 60
## 2 East Carroll 22035 035 18 246095.0 2.434595 0.11014511 18
## 3 West Carroll 22123 123 62 171615.3 1.685632 0.08987525 62
## 4 Morehouse 22067 067 34 265603.4 2.643238 0.20100878 34
## 5 Union 22111 111 56 229242.0 2.295922 0.22563787 56
## 6 Lincoln 22061 061 31 159971.6 1.590842 0.11746920 31
## Par_1 Crash
## 1 60 101
## 2 18 4
## 3 62 5
## 4 34 31
## 5 56 42
## 6 31 96
library(sf)
mtq <- st_read(system.file("gpkg/mtq.gpkg", package = "cartography"),
quiet = TRUE)
# number of employed persons
mtq$EMP <- mtq$ACT - mtq$CHOM
plot(st_geometry(mtq),
col = "#f2efe9",
border = "#b38e43",
lwd = 0.5)
waffleLayer(
x = mtq,
var = c("EMP", "CHOM"),
cellvalue = 100,
cellsize = 400,
cellrnd = "ceiling",
celltxt = "1 cell represents 100 persons",
labels = c("Employed", "Unemployed"),
ncols = 6,
col = c("tomato1", "lightblue"),
border = "#f2efe9",
legend.pos = "topright",
legend.title.cex = 1,
legend.title.txt = "Active Population",
legend.values.cex = 0.8,
add = TRUE
)
layoutLayer(
title = "Structure of the Active Population",
col = "tomato4",
tabtitle = TRUE,
scale = FALSE,
sources = paste0("cartography ", packageVersion("cartography")),
author = "Sources: Insee and IGN, 2018",
)

## Reading layer `mtq' from data source `C:\Users\s-das\Documents\R\R-3.6.2\library\cartography\gpkg\mtq.gpkg' using driver `GPKG'
## Simple feature collection with 34 features and 7 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: 690574 ymin: 1592536 xmax: 735940.2 ymax: 1645660
## CRS: 32620
par(mar=c(0,0,0,0))
plot(st_geometry(mtq),
col = "white",
bg = "grey95",
border = NA)
wordcloudLayer(
x = mtq,
txt = "LIBGEO",
freq = "POP",
add = TRUE,
nclass = 5
)
legendChoro(
title.txt = "Population",
breaks = getBreaks(mtq$POP, nclass = 5, method = "quantile"),
col = carto.pal("blue.pal", 5),
nodata = FALSE
)
