Questions tagged [geom-map]

9 questions
2
votes
1 answer

geom_point to geom_map (ggplot2)

I'm coloring countries based on variable v1 and I want to add geom_point to each of those countries and set geom size equal to my variable v2. However, when I add the geom_point, the geom_point for the USA does not appear and other points are…
2
votes
1 answer

Plotting subregions of Great Britain in world map using ggplot2

I am trying to draw a world map where selected countries are filled in different colours. Specifically, I want to separately identify the subregions of particular regions (eg, for the UK: England, Wales and Scotland). I found this answer to a…
1
vote
1 answer

How to build world map in R and color selected countries

I'm trying to build a map showing a gradient of scores attributed to a selection of countries, these scores are stored in a dataframe (scores) alongside the corresponding country name: Country Score United States 0.4 France 0.2 India 0.6 etc. I've…
confused_1
  • 13
  • 2
1
vote
1 answer

How to combine geom_map and geom_point in ggplot2

I am trying to combine geom_map and geom_point in ggplot2 using 2 data frames. When running the first part with geom_point only, I get the right plot. When running both combined geoms_ I get the error: "Don't know how to automatically pick scale…
1
vote
0 answers

Package ‘ggpattern’ is not available for R version 4.0.2

Is anybody able to tell me why the package "ggpattern" is not available for R version 4.0.2? I'm using "geom_sf" to create a map and I want to add patterns instead of a simple color. Is there an other way to do this other than using this…
Sora
  • 13
  • 4
0
votes
0 answers

I need to figure out how to add more colours using scale_color_manual. How do I guarantee a minimum number of colors?

I have a total of 90 sites with longitude/latitude coordinates. These sites are grouped into a total of 10 Koepen-Geiger climate classifications, with codes like "Af" and "Cb," etc. (If you know about this, you might realize that I have left a…
Abed
  • 183
  • 7
0
votes
0 answers

Plot german cities in ggplot R

My apologies for my newbie question. I am so new to maps and quite lost at the vast info of internet. I want to plot two german cities, Cologne and Berlin, in separate plots with ggplot2. For now I only find the world data, world <-…
Corrector
  • 163
  • 9
0
votes
3 answers

ggplot add country names in legend below geom_map

I would like to add a legend for the country names below my map. I have this dataframe of frequency of event occurrences on different regions: trend_country_freq <- structure(list(country = c("US", "CN", "KR", "IN", "AU", "GB", "JP"), n = c(25L,…
Ane
  • 335
  • 1
  • 11
0
votes
1 answer

visualizing DMA regions on a map and overlaying results in R

I am using the following map: https://gist.github.com/simzou/6459889#file-nielsentopo-json to plot the DMA regions. I tried following along on this previous…
Sheila
  • 2,438
  • 7
  • 28
  • 37