user20288214
user20288214

Reputation: 11

Having trouble downloading county-level NOAA data in R

I'm trying to download NOAA data (GHCND dataset: https://www.ncei.noaa.gov/cdo-web/datasets) in R by county FIPS code using the rnoaa package. I feel like it should be possible to download county-level climate data (https://www.ncei.noaa.gov/news/noaa-offers-climate-data-counties), but I'm having trouble. I have an API key, and when I worked through an example from the rnoaa package documentation using a random county FIPS code, it worked fine:

ncdc(datasetid='GHCND', locationid = 'FIPS:01095', startdate = '2010-05-01', enddate = '2010-05-10')

But when I tried to download the same data for another county on a day I'm interested in, it says "Sorry, no data found":

ncdc(datasetid = 'GHCND', locationid = 'FIPS:01007', startdate = '2017-01-21', enddate = '2017-01-22')

I don't have a specific station ID in mind for each county, as I'm trying to get the average precipitation for the county overall on that day. If someone could share any code to help me download county-level precipitation for 1/21/17 that will work for every county code, it would be much appreciated! Thanks in advance.

Upvotes: 1

Views: 158

Answers (0)

Related Questions