I have a dataset whose rows represent the time frame and whose columns each represent one region of Italy. I need to plot this data on a map of Italy in R (I need the total sum on the entire period, so I'll only have one value per region).
I downloaded the package maps
and loaded the map of Italy it_map <- map_data('italy')
Problem is, Italy is divided into 20 regions and tens of provinces. The map shows these province boundaries, but my data is aggregated at regional level.
Is there a way to combine the boundaries of all the provinces into their respective region? Do I have to modify the "group" column in order to make it the same for all the provinces belonging to one region?
The map dataset is like this:
long lat group order region subregion
x.x y.y 1 1 Bozen NA
x.x y.y 1 2 Bozen NA
etc... where of course the column called "region" actually lists provinces.
Also, any suggestions for plotting nicely with ggplot2? Thanks in advance for all the answers!