fork download
  1. dff=readRDS("./dff.rds")
  2.  
  3. # 改一下網格點順序
  4. SNdff=data.frame(S1.N86=dff$S1.N86 %>% unique %>% sort)
  5. SNdff$reciprocal=1/(SNdff$S1.N86)
  6. SNdff$rank=SNdff$reciprocal %>% rank
  7.  
  8. dff=merge(x=dff, y=SNdff, by=c('S1.N86'), all.x = T)
  9. dff=data.frame(dff)
  10.  
  11. dff$S1.N86.new = factor(dff$S1.N86, levels=c(rev(c(dff$S1.N86 %>% unique %>% sort %>% as.character))))
  12. dff$S1.N86.new %>% class
  13.  
  14. #確認一下病例分布
  15. gggg2=aggregate(dff[, 15], list(dff$W1.E41,dff$S1.N86), sum)
  16.  
  17.  
  18. dff=dff[!is.na(dff$rainMA),]
  19. dff=dff[!is.na(dff$t2mMA),]
  20. dff$N %>% class
  21.  
  22. ggplot(dff)+
  23. facet_grid(S1.N86.new+S1.N86~W1.E41)+
  24. geom_line(data=dff, aes(x=date, y=rainMA/5), color='steelblue', size=0.1)+
  25. geom_point(data=dff, aes(x=date, y=t2mMA), color='red', size=0.05, alpha=0.5)+
  26. geom_bar(data=dff, aes(x=date, y=(dff$N)), stat="identity", color='#d9ef8b', alpha=0.1)+
  27.  
  28. #scale_y_continuous(sec.axis = sec_axis(~.*5, name = "Relative humidity [%]"))+
  29. #geom_text(aes(label=N), vjust=1, color="white", size=3.5)+
  30. theme(axis.text.x = element_blank(),
  31. axis.ticks.x = element_blank(),
  32. axis.title.x=element_blank())+
  33.  
  34. ggtitle(paste0("grid SickNum ",yy,' ',city))
Success #stdin #stdout #stderr 0.31s 39020KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error in gzfile(file, "rb") : cannot open the connection
Calls: readRDS -> gzfile
In addition: Warning message:
In gzfile(file, "rb") :
  cannot open compressed file './dff.rds', probable reason 'No such file or directory'
Execution halted