I have some data that I'd like to plot with rworldmap. Normally this works well. But I can't figure out why it's not plotting all the data when it says it's going to. Particularly it's not plotting data for the US.
I've got some data here: https://drive.google.com/file/d/1Fp7O2TRH5Blar56SqdRdcPh8Mb1Vb0pc/view?usp=sharing
And I'm running this code:
mergedData = readRDS("sampleData.rds")
changeHeatMapPalette = c('#D7191D', '#FDAE61', '#FFFFBF', '#ABD9E9', '#2C7BB6')
mapData = joinCountryData2Map(mergedData, joinCode="ISO2", nameJoinColumn="country", mapResolution = "high")
mapCountryData(mapData, nameColumnToPlot="change", mapTitle="", catMethod = "diverging", colourPalette = changeHeatMapPalette, numCats = 90, borderCol = "grey70")
But then I'm getting this map:
Notice how the US has no data. But it's definitely in the sample data. And it's only excluding one country, which is not the US.
108 codes from your data successfully matched countries in the map
1 codes from your data failed to match with a country code in the map
failedCodes
[1,] "GF"
143 codes from the map weren't represented in your data
Any idea what I'm doing wrong?