如何在地图上绘制温度差异(geom_map)

时间:2018-05-08 15:28:42

标签: r ggplot2

我必须在2010年3月制作一张温度水平的全球地图,我设法用以下代码制作:

temperature_data %>% filter(date >= as.Date("2010-03-01") & date <= as.Date("2010-03-31"))%>%
  ggplot(aes(map_id=country))+
  geom_map(mapping=aes(fill=temperature), map=map_data("world")) +
  expand_limits(x=world$long, y=world$lat) +
  ggtitle("Worlwide map of temperatures in March 2010") +
  theme(plot.title=element_text(size=15, face="bold", color="black"))+
  xlab("Longitude") + ylab("Latitude") +
  scale_fill_gradient(low="blue", high="orange")

然而,我现在需要绘制相同的东西,但是在2010年3月到1900年3月之间的温度差异。 在这种情况下,如何区分日期?

提前致谢,

此致

0 个答案:

没有答案