I am trying to create a world map highlighting the top terrorist activities. turns out that the output doesnot include the map zone for US

Viewed 31

I am trying to plot top attack zones as per countries but I am not being able to get all countries in my map. for example USA and the united kingdom. Can anyone assist me with this? the map pic is included below enter image description here

df4 %>% 
  ggplot(aes(fill = n, map_id = country)) +
  geom_map(map = world_map)+ 
  expand_limits(x = df4$longitude, y = df4$latitude) +
  coord_map()+
  
  
  theme_map()+
  #scale_fill_distiller(palette = "YlGnBu", direction = 1)+
  scale_fill_gradient(low = "grey", high = "red", name = "No. of attacks") +
  #geom_polygon(aes(longitude, latitude), fill = NA, colour = "grey60")
  
  #geom_text(data = df4, aes(longitude, latitude, label = country, group = NULL), size = 2.5)+
  ggrepel::geom_label_repel(data = df4, 
                            aes(longitude, latitude), 
                            label = df4$country,
                            size = 2.5,
                            col = "black")+
  #big leg
  guides(fill = guide_colourbar(barwidth = 0.5,
                                barheight = 20))+
  theme(legend.position="right",
  )+
  theme(legend.title = element_text(color = "Black", size = 10, face = "bold"))
0 Answers
Related