I would like to colour geographical areas according to the values of a specific column ("Value), where the geographical areas are not Countries nor Continent, but areas defined by latitude ("North Temperate Zone", "Torrid Zone", "South Temperate Zone").
An example dataset:
df_ex <- data.frame(Area = c("North Temperate Zone", "Torrid Zone", "South Temperate Zone"), Value = c(2.8, 1.0, 4.3))
I tried with joinCountryData2Map and mapCountryData but the only categorization available seems to be the Country.
Any ideas?
You could do this by getting the centroid of each country and assigning the latitude to a zone using
cut. There are some problems with this of course; many countries span different zones, and some countries include overseas dependencies in completely different zones.These issues aside, the basic approach would be something like this: