如何獲取伊利諾伊州芝加哥市每小時(shí)的歷史天氣數(shù)據(jù)(溫度)
伊利諾伊州天氣什么時(shí)候轉(zhuǎn)熱
我需要伊利諾伊州芝加哥市每小時(shí)的歷史天氣數(shù)據(jù)(溫度)(郵政編碼60603)
基本上我需要它在2017年6月和7月每小時(shí)或15分鐘間隔。在
我搜索了NOAA,Weather underground等,但沒有找到任何與我的用例相關(guān)的東西。我試過用R和Python進(jìn)行抓取,但是沒有運(yùn)氣。在
這是一個(gè)片段
R:
library(httr)library(XML)url <- 'http://graphical.weather.gov/xml/sample_products/browser_interface/ndfdXMLclient.php'response <- GET(url,query=list(zipCodeList='10001',
product='time-series',
begin=format(Sys.Date(),'%Y-%m-%d'),
Unit='e',
temp='temp',rh='rh',wspd='wspd'))doc <- content(response,type='text/xml', encoding = 'UTF-8') # XML document with the data# extract the date-timesdates <- doc'//time-layout/start-valid-time'dates <- as.POSIXct(xmlSApply(dates,xmlValue),format='%Y-%m-%dT%H:%M:%S')# extract the actual datadata <- doc'//parameters/*'data <- sapply(data,function(d)removeChildren(d,kids=list('name')))result <- do.call(data.frame,lapply(data,function(d)xmlSApply(d,xmlValue)))colnames(result) <- sapply(data,xmlName)# combine into a data frameresult <- data.frame(dates,result)head(result)
伊利諾伊州天氣什么時(shí)候轉(zhuǎn)熱如何獲取伊利諾伊州芝加哥市每小時(shí)的歷史天氣數(shù)據(jù)(溫度)
(所屬部門:昆明國旅旅行社客服部)
相關(guān)美國
- 2021-09-05清邁2月份氣溫如何,帶什么衣服 清邁天氣適合穿什么衣服
- 2021-09-05請(qǐng)問加拿大多倫多那邊氣候如何?我12月 多倫多天氣適合穿什么衣服
- 2021-09-04準(zhǔn)備3.9日去稻城,請(qǐng)問那邊天氣如何, 神戶天氣適合穿什么衣服
- 2021-09-04最近天氣如何,22度適合什么衣服 2西非天氣適合穿什么衣服
- 2021-09-03美國紐約一月份天氣如何 適合穿什么衣 屬于美國天氣適合穿什么衣服
- 2021-09-02請(qǐng)問,這時(shí)候去黃山,氣溫如何 黃山區(qū)天氣適合穿什么衣服






耍水龍?zhí)?/a>

