aqicn-api - npm
文章推薦指數: 80 %
Node wrapper for the AQICN Air Quality Index API (https://aqicn.org/). New module for accessing AQICN global air quality data, ... aqicn-api1.0.4 • Public • Published2yearsagoReadmeExploreBETA1Dependency0Dependents5VersionsAqicnAirQualityIndexAPI NodewrapperfortheAQICNAirQualityIndexAPI(https://aqicn.org/).NewmoduleforaccessingAQICNglobalairqualitydata,nowthatAqicn.orgprovidesaRESTAPI.Nowebscraping,etc. Installation npmi-saqicn-api GettinganAPIToken YoushouldbeabletogetanAPItokenfor1000requestsperminute,injustafewminutes,usingtheonlineform,at:https://aqicn.org/api/ TheAPItokendemocanbeusedfortesting,butwillonlyreturnresultsforShanghai(上海). Usage MakearequesttotheAqicn.orgRESTAPItogatherAirQualitydataforagivencity(OnemethodexposesthecurrentAqicnAPI): ConfigurationObjectInputs: token(required):YourAPItoken(Seeabove) city(optional):Thecitynameforthelookup lang(optional):ResponseExplanationLanguage-currentlyen(English)&cn(SimplifiedChinese)aresupported lat(optional):Canbeusedinsteadofcityforlat/longbasedlocationlookup long(optional):Canbeusedinsteadofcityforlat/longbasedlocationlookup Note:Eithercitynameorlat+longmustbeused Examplewithcityname constaqicn=require('aqicn-api'); aqicn({city:'shanghai',lang:'en',token:'demo'},function(data){ console.log(data); }); ExamplewithLat/longinsteadofcityname constaqicn=require('aqicn-api'); aqicn({lat:31.2047372,long:121.4489017,lang:'en',token:'demo'},function(data){ console.log(data); }); APIResponse { aqi:82, idx:1437, city:'Shanghai(上海)', dominentpol:'pm25', time:1577120400000, level:5, co:9.1, no2:20.6, o3:29.3, p:1018.4, pm10:33, pm25:82, so2:3.6, t:11.6, w:0.1, url:'https://aqicn.org/city/shanghai', geo:[31.2047372,121.4489017], label:'Moderate', implications: 'Airqualityisacceptable;however,forsomepollutantstheremaybeamoderatehealthconcernforaverysmallnumberofpeoplewhoareunusuallysensitivetoairpollution.', precautions: 'Activechildrenandadults,andpeoplewithrespiratorydisease,suchasasthma,shouldlimitprolongedoutdoorexertion.', attributions: [{url:'http://www.semc.gov.cn/', name:'ShanghaiEnvironmentMonitoringCenter(上海市环境监测中心)'}, {url:'http://106.37.208.233:20035/emcpublish/', name: 'ChinaNationalUrbanairqualityreal-timepublishingplatform(全国城市空气质量实时发布平台)'}, {url: 'https://china.usembassy-china.org.cn/embassy-consulates/shanghai/air-quality-monitor-stateair/', name:'U.S.ConsulateShanghaiAirQualityMonitor'}, {url:'https://waqi.info/', name:'WorldAirQualityIndexProject'}] } Todos Pullrequestswelcome! Addadditionallanguages Lat/longbasedlookups Keywordsaqicnairqualityindexairpollutionindexairqualityindexpollutionpm25pm2.5pm10aqicn.orgapiInstallnpmiaqicn-apiRepositoryGitgithub.com/kidGodzilla/aqicn-apiHomepagegithub.com/kidGodzilla/aqicn-api#readmeDownloadsWeeklyDownloads5Version1.0.4LicenseMITUnpackedSize12.5kBTotalFiles5Lastpublish2yearsagoCollaboratorsTryonRunKitReportmalware
延伸文章資訊
- 1Why do the values shown on the IRCELINE website differ from ...
Aqicn.org uses the index of the American Environmental Protection Agency (US EPA). However, to co...
- 2AQICN/AQI | DBnomics
- 3這是AQICN 對於G5 和G7 兩款PM2.5 感測器的比較 - Facebook
這是AQICN 對於G5 和G7 兩款PM2.5 感測器的比較,快速摘錄結論是:G5 在100 mg/m3 下幾近完美,G7 則是在80 mg/m3 以下表現亮眼,大家可以參考一下囉~~
- 4aqicn-api - npm
Node wrapper for the AQICN Air Quality Index API (https://aqicn.org/). New module for accessing A...
- 5AQICN.org - Latest - The News Lens International Edition
AQICN.org Latest Related Tags: air pollution, AQICN.org, China, PM2.5 空氣中的隱形殺手, Taiwan, World Air...