hourly weather

从今年6月份开始,收集了全国县级气象站的小时降水和气温数据,期望能在将来用这些数据分析极端天气变化。

最近刚好想起echarts可视化功能的强大。找到了echart 4的R接口echarts4r,于是用这个R包做了小时气象数据的展示。总体来说效果还算不错

先看下降雨

wth %>%
  e_charts(Datetime) %>% 
  e_bar(PRE_1h, legend = F) %>% 
  e_datazoom() %>% 
  e_title("Rainfall hourly")
wth %>%
 group_by(Mon) %>%
 # group_by(Date) %>%
  e_charts(Datetime, timeline = TRUE) %>% 
  e_timeline_opts(axis_type = "value",
                  playInterval = 1500,
                  top = 5,
                  right = 50,
                  left = 200) %>% 
  e_bar(PRE_1h, legend = F) %>% 
  e_datazoom() %>% 
  e_title("Rainfall hourly")

再看看气温

wth %>%
  e_charts(Datetime) %>% 
  e_line(TEM, legend = F) %>% 
  e_datazoom() %>% 
  e_title("150 days hourly Tempreture ")
wth %>%
  group_by(Mon) %>%
  e_charts(Datetime, timeline = TRUE) %>% 
  e_timeline_opts(axis_type = "value",
                  playInterval = 1500,
                  top = 5,
                  right = 50,
                  left = 200) %>% 
  e_line(TEM, legend = F) %>% 
  e_datazoom() %>% 
  e_title("150 days hourly Tempreture")
Wei Li (李伟)
Wei Li (李伟)
PostDoc of Crop Science

My research interests include high throughput crop phenotyping and genetics of quantitative traits in maize.

Related