【问题标题】:R rnoaa annual results - No data foundR rnoaa 年度结果 - 未找到数据
【发布时间】:2016-08-09 11:49:33
【问题描述】:

我目前正在尝试配置 rnoaa 库以将城市、州数据与气象站连接起来,从而输出 ANNUAL 天气数据,即温度。我已经包含了一个硬编码输入以供参考,但我打算最终在数百个地理编码城市中提供服务。这不是问题,而是检索数据。

require(rnoaa)
require(ggmap)

city<-geocode("birmingham, alabama", output = "all")
bounds<-city$results[[1]]$geometry$bounds

se<-bounds$southwest$lat
sw<-bounds$southwest$lng
ne<-bounds$northeast$lat
nw<-bounds$northeast$lng

stations<-ncdc_stations(extent = c(se, sw, ne, nw),token = noaakey)

我正在计算地理区域周围的 MBR(矩形),在本例中为伯明翰,然后获取站点列表。然后我拉出station_id,然后尝试使用任何类型的参数检索结果但没有成功。我希望将每年的气温与每个城市联系起来。

test  <- ncdc(datasetid = "ANNUAL", locationid = topStation[1], 
datatypeid = "DSNW",startdate = "2000-01-01", enddate = "2010-01-01", 
limit = 1000, token = noaakey)

Warning message:
Sorry, no data found 

【问题讨论】:

    标签: r database statistics rnoaa


    【解决方案1】:

    位置 ID 似乎存在问题。尝试不使用它(因为它是可选字段)

    ncdc_locs(datasetid = "ANNUAL",datatypeid = "DSNW",startdate = "2000-01-01", enddate = "2010-01-01", limit = 1000,token =  <your token key>)
    

    然后使用有效的位置 ID

    ncdc_locs(datasetid = "ANNUAL",datatypeid = "DSNW",startdate = "2000-01-01", enddate = "2010-01-01", limit = 1000,locationid='CITY:US000001',token =  <your token>)
    

    返回

    $meta
    NULL
    
    $data
         mindate    maxdate                name datacoverage            id
    1 1872-01-01 2016-04-16 Washington D.C., US            1 CITY:US000001
    
    attr(,"class")
    [1] "ncdc_locs"
    

    【讨论】:

      猜你喜欢
      • 2018-08-29
      • 1970-01-01
      • 1970-01-01
      • 2019-02-18
      • 2020-10-15
      • 2019-06-18
      • 1970-01-01
      • 1970-01-01
      • 2014-12-25
      相关资源
      最近更新 更多