Skip to content

Commit

Permalink
Update NOAA data
Browse files Browse the repository at this point in the history
WI, WV, WY are added to NOAA data.
  • Loading branch information
mengqi-z committed Jul 26, 2022
1 parent 52c9715 commit 8c3fa44
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file modified data/noaa_hddcdd.rda
Binary file not shown.
Binary file modified inst/extras/noaa_hddcdd.RDS
Binary file not shown.
6 changes: 3 additions & 3 deletions inst/extras/saveDataFiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ for (year_i in years){
}
}
}
tmp<-read.fwf(file = url_i, skip=15,nrows=48,widths = c(17, 6, 1000)) %>%
tmp<-read.fwf(file = url_i, skip=15,nrows=51,widths = c(17, 6, 1000)) %>%
dplyr::mutate(stateName=gsub(" ","", V1, perl=T),
value=V2)%>%
left_join(stateCodes, by="stateName")%>%
Expand Down Expand Up @@ -136,7 +136,7 @@ for (year_i in years){
}
}
}
tmp<-read.fwf(file = url_i, skip=15,nrows=48,widths = c(17, 6, 1000)) %>%
tmp<-read.fwf(file = url_i, skip=15,nrows=51,widths = c(17, 6, 1000)) %>%
dplyr::mutate(stateName=gsub(" ","", V1, perl=T),
value=V2)%>%
left_join(stateCodes, by="stateName")%>%
Expand All @@ -148,7 +148,7 @@ for (year_i in years){
}
}

noaa_hddcdd <- tbl%>%
noaa_hddcdd <- tbl%>%
left_join(monthCodes, by="month")%>%
dplyr::mutate(monthCode=monthsShort)%>%dplyr::select(-monthsShort)%>%
dplyr::mutate(monthCode=factor(monthCode,levels=monthsShort)) %>%
Expand Down

0 comments on commit 8c3fa44

Please sign in to comment.