## Loading required package: sp
## ### Welcome to rworldmap ###
## For a short introduction type : vignette('rworldmap')
library(countrycode)
# a data.frame with the ISO3 country names plus a variable to
# merge to the map data
dta$Country <- countrycode(dta[,1], "country.name", "iso3c")
head(dta)## Country
## 1 TWN
dta$Ebola <- rep(1, length(dta$Country))
mapDevice("x11")
# join the data.frame to the country map data
ebolaMap <- joinCountryData2Map(dta, joinCode = "ISO3", nameJoinColumn = "Country")## 1 codes from your data successfully matched countries in the map
## 0 codes from your data failed to match with a country code in the map
## 242 codes from the map weren't represented in your data
# plot it, the color palette's first color is red
mapCountryData(ebolaMap, nameColumnToPlot = "Ebola", catMethod = "categorical",
addLegend = FALSE, mapTitle ="Countries I Have Visited So Far ", missingCountryCol = gray(.9))## png
## 2