I want to make a map and pie combination using R and my own data. here is the link to my data. https://drive.google.com/open?id=1HVpFiwdj6YxDDkoq6PmAYMh9_Q6LR95L
My objective is to bring out something like this- enter image description here
I have tried various libraries and I am still trying, but not able to get the same,
Here are my small datasets 1. https://drive.google.com/open?id=1oR99mHsTbm86KEUfs-U3UnbczooIS-E_ 2. https://drive.google.com/open?id=18B-ehTdcCPcpOqGW_0-nnRf2Ft_nIIxr
library(xlsx)
library(ggplot2)
library(maps)
library(ggthemes)
library(mapdata)
library(raster)
library(rgeos)
library(scatterpie)
world <- map_data('world', 'canada')
p <- ggplot(world, aes(long, lat)) +
geom_map(map=world, aes(map_id=region), fill='grey', color="black") +
coord_quickmap()
p + geom_scatterpie(aes(x=Longitude, y=Latitude, group=Name), data=df,
cols=c('Calgary', 'Cobourg', 'Cornwall', 'Dieppe', 'Etobicoke', 'Grande.Prairie', 'Lloydminster', 'Mississauga', 'Newmarket', 'North.York',
'Oakville', 'Oshawa', 'Ottawa', 'Pickering', 'Red.Deer', 'Richmond.Hill', 'Salmon.Arm', 'Saskatoon', 'Scarborough', 'Stouffville',
'Surrey', 'Toronto', 'Vancouver', 'Victoria', 'Whitby', 'Woodbridge'), color=NA) + coord_equal()+
coord_fixed() +
theme_fivethirtyeight()
I am still trying, any suggestions please. Thanks