主要内容

[qh] [qh] [qh] [qh]【翻译】:【翻译】:【翻译】

大黄蜂:大黄蜂:大黄蜂:大黄蜂

[qhwebread■■■■■■■■■■■■■■■■■■■■■■■■■■■■世界银行(World Bank)는世界银行气候数据API를통해다양한기후데이터를제공하고있습니다。이API를호출하면JSON형식의데이터가반환됩니다。webreadjson®变身变身变身变身变身变身变身变身变身变身

webread■■■■■■■■■■■■■■■■■■■

api =“http://climatedataapi.worldbank.org/climateweb/rest/v1/”;Url = [api]“国家/ cru /助教/年/美国];S = webread(url)
S = 112x1结构数组与字段:年数据

webread[qh] [qh] [qh] [qh] [qh] [qh] [qh]각구조체에는지정된연도,즉1901년부터2012년까지의온도중한해의온도가포함되어있습니다。

(1)
Ans = year: 1901 data: 6.6187
年代(112)
Ans = year: 2012 data: 7.9395

■■■■■■■■大黄蜂:大黄蜂:大黄蜂:大黄蜂쉽게플로팅할수있도록연도를datetime객체로변환하고,온도는화씨로변환합니다。

temps = [S.data];温度= 9/5 *温度+ 32;years = [S.year];Yearstoplot = datetime(years,1,1);图(yearstoplot, temps);标题(“1901-2012年美国平均气温”)包含(“年”) ylabel (温度(^{\保监会}F)”) xmin = datetime(1899,1,1);Xmax = datetime(2014,1,1);xlim ([xmin xmax])

美国的平均温度以年的华氏度表示

2015-10-29 16:317:45 [qh]

P = polyfit(years,temps,1);Ptemps = polyval(p,years);= p(1);持有Fl = plot(yearstoplot, ptemps);Xlim ([xmin xmax])“1901-2012年美国平均气温趋势”)包含(“年”) ylabel (温度(^{\保监会}F)”) deltat = num2str(10.0*deltat);传奇(fl,“最小二乘拟合”deltat,“^{\保监会}F /十年”)举行

美国平均气温趋势以每年的华氏度绘制

世界银行:气候数据API。(世界银行:气候数据APIapi / api世界银行(全英文)