#Required libraries library(rgdal) library(broom) library(ggplot2) library(readxl) #Download map image download.file("http://thematicmapping.org/downloads/TM_WORLD_BORDERS_SIMPL-0.3.zip", destfile="~/INSERT FILE PATH") system("unzip ~/INSERT FILE PATH") #Create world map data named my_spdf my_spdf <- readOGR( dsn= "~/INSERT FILE PATH", layer="TM_WORLD_BORDERS_SIMPL-0.3", verbose=FALSE) #Set parameters & basic map colours View(my_spdf) par(mar=c(0,0,0,0)) plot(my_spdf, col="#f2f2f2", bg="skyblue", lwd=0.25, border=0 ) #Make suitable for ggplot2 spdf_fortified <- tidy(my_spdf, region = "NAME") #Import excel containing outbreaks data, including coordinates outbreaks <- read_excel("INSERT FILE PATH") View(outbreaks) long2 <- outbreaks$Longitude lat2 <- outbreaks$Lattitude #Bubble map code ggplot() + geom_polygon(data = my_spdf, aes( x = long, y = lat, group = group), fill="#c9cfc8", color="white") + geom_point(data = outbreaks, aes(x = long2, y = lat2, colour = Disease, size = (n.cases*2), alpha = 0.3), ) + scale_size_continuous(range=c(3,26)) + ylim(36,75) + xlim(-10,35) + theme_void() + scale_color_brewer(palette="Set1")