Open yfhuang7 opened 6 years ago
Glad you've found the package useful! Could you post the code you're using? I'll take a look at that with the package code to see what's going on.
Thanks for the response, I was basically using 'find_event' to find drought and flood in Hawaii. Yet, I can find the flood, but not drought (there were droughts during the given years according to the website). The way I used is attached below. Thank you!
drought <- find_events(date_range = c("2000-01-01", "2017-12-31"),
event_types = c("Drought"))
any(unique(drought$state) == "Hawaii")
#Can't find Hawaii.. ?!
flood <- find_events(date_range = c("2000-01-01", "2017-12-31"),
event_types = c("flood","flash flood"))
any(unique(flood$state) == "Hawaii")
So, it looks like for Hawaii the event types that are recorded by county in the original dataset (Heavy Rain, Flash Flood, etc.) are being found, but that events that are recorded by forecast zone rather than by county in the original dataset are getting lost for Hawaii (see the "Details" vignette at https://cran.r-project.org/web/packages/noaastormevents/vignettes/details.html for more about these county vs. forecast zone listings---there's a section in that vignette explaining this point about halfway through).
It could be that the package's function for trying to match forecast zone to county is only capturing matches within the contiguous 48 states. Let me look into that. If that's the case, then I'll either see if I can expand that to also work with Hawaii and Alaska or, if I can't figure out a way to do that, at least include a warning in the help files that queries outside of the contiguous 48 states will only return events of certain types.
Yes, in matching forecast zones to counties, the package is using county.fips
from the maps
package to get county names, and it looks like this does not list any counties for Alaska or Hawaii. Let me see what I can do about finding another source for county names that would include those states, and that should fix this issue.
Thank you so much for figuring this out! Looking forward to fixing the issue. :)
@theresekon : We could take a look at addressing this Issue this summer, too. I need to revisit, but I think it comes down to finding a better method for converting from forecast zone to county.
I found this excel spreadsheet from the US census that has the fips codes for 2019. It looks like it includes Hawaii and Alaska.
We can also think about pairing the US census fips code datasets with the noaa storm events files by year.
Hi @geanders,
Thank you so much for this useful package! I successfully got flood events I want, yet I couldn't find drought events in Hawaii. I've checked both the "stormEvents_details-ftp....csv" from Storm Events Database - Bulk Data Download and the website itself, and both of them had drought events in Hawaii some years. I couldn't tell what happened.
Thank you! yufen