This function prepares the classes for the original and aggregated maps so that the same scale can be used for both.
defineGATmapclasses(areaold, areanew, aggvar, breaks = 7)
A spatial polygons data frame.
A second spatial polygons data frame that ahould have the same outer boundary as the first one.
The variable to be mapped.
The number of desired categories in the maps.
# prepare the classes for the choropleth maps
defineGATmapclasses(
areaold = hftown,
areanew = hfagg610k,
aggvar = "TOTAL_POP",
breaks = 4
)
#> $colcode1before
#> [1] "#FEF0D9" "#FC8D59" "#FDCC8A" "#FDCC8A" "#D7301F" "#D7301F" "#D7301F"
#> [8] "#D7301F" "#FC8D59" "#FDCC8A" "#FC8D59" "#FEF0D9" "#FEF0D9" "#FEF0D9"
#> [15] "#FEF0D9" "#FDCC8A" "#FEF0D9" "#FDCC8A" "#FDCC8A" "#FEF0D9" "#FDCC8A"
#> attr(,"palette")
#> [1] "#FEF0D9" "#FDCC8A" "#FC8D59" "#D7301F"
#> attr(,"table")
#> [151,737) [737,2760) [2760,6432) [6432,15413]
#> 7 7 3 4
#>
#> $colcode1after
#> [1] "#D7301F" "#D7301F" "#D7301F" "#D7301F" "#FC8D59" "#D7301F" "#FC8D59"
#> [8] "#FC8D59"
#> attr(,"palette")
#> [1] "#FEF0D9" "#FDCC8A" "#FC8D59" "#D7301F"
#> attr(,"table")
#> [151,737) [737,2760) [2760,6432) [6432,15413]
#> 0 0 3 5
#>