0

I am new to stack overflow and r studio in general so please forgive me for any mistakes I might make when trying to ask my question.

I am trying to create a world map that displays my countries by their transaction value. This is what my data looks like:

Preview of Data

I have 86 different countries total.

This is what I have attempted so far:

Preview of Code

And I got this:

Preview of Map

Clearly, this is not a good representation of the data because the United States is an outlier. I am not sure how to properly construct a map colored by my values that I want, and to make it actually useful. I do not care what map function or package to use (like ggplot or country_choropleth). I am just stuck on how to deal with the outlier in the coloring scheme and what other options I can do to make my map of 86 countries look nice. Thank you ahead of time for the help.

Phil
  • 7,287
  • 3
  • 36
  • 66
Skylar
  • 1
  • 1
  • 1
    Please take a look at [How to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example), to modify your question, with a smaller sample taken from your data (check `?dput()`). Posting images of your data or no data makes it difficult to impossible for us to help you! – massisenergy Apr 19 '20 at 20:44
  • I would suggest (a) Use a better color scale than `rainbow`, and (b) don't make it a linear scale with fixed width bins. I don't know what package `mapCountryData` is, but you seem to be asking for this result with `catMethod = "FixedWidth"`. Perhaps you could do a logarithmic scale, or quantile based bins. – Gregor Thomas Apr 20 '20 at 19:15
  • Also, adding on to massisenergy's comments, please post code as text, not pictures. – Gregor Thomas Apr 20 '20 at 19:15

0 Answers0