Download presentation
Presentation is loading. Please wait.
Published byLexus Verdin Modified over 9 years ago
1
Apps & More With the AirNow API 5883 Steven Ludewig 1, John White 2, Phil Dickerson 2, Alan Healy 1, Jonathan West 1, Leslie Prince 1 1 Sonoma Technology, Inc., Petaluma, CA 2 U.S. EPA, Research Triangle Park, NC for 2014 National Air Quality Conference Durham/RTP, North Carolina February 12, 2014
2
Information Reach (1) 2 AirNow.org Website Weather Service Providers EnviroFlash Messages EPA & Agency Mobile Apps Agency Websites AirNow Forecasts Observations Data Products AirNow Forecasts Observations Data Products Air quality information is published in well-planned, well-understood ways.
3
Information Reach (2) 3 AirNow.org Website Weather Service Providers EnviroFlash Messages EPA & Agency Mobile Apps Agency Websites AirNow Forecasts Observations Data Products AirNow Forecasts Observations Data Products API Air quality information can be easily accessed and published in various ways by software developers.
4
Information Access Trends Got a Smartphone? 91% of people have a mobile phone. 55% of people own a smartphone. 50% of mobile phone users use mobile as their primary Internet source. Mobile adoption is growing 8 times faster than web adoption grew in the 1990s and early 2000s. Global mobile traffic now accounts for 15% of all Internet traffic. Mobile-based searches make up one quarter of all searches. 4 Sources: PewInternet.org; DigitalBuzzBlog.com/SuperMonitoring.com
5
5 AirNow API AirNowAPI.org A central portal providing access to web services, RSS feeds, and file products, giving developers the tools needed to integrate air quality data into software applications (e.g., websites, mobile apps) API Features Key web services requested by users –Forecasts and observations by zip code or lat/lon –Historical peak values by zip code or lat/lon –KML web services A query tool makes it possible for users to assemble and run web service requests, helping developers to quickly grasp the proper format of the API’s REST-type requests and to view outputs Description and Features
6
6 AirNow API API Features (continued) Documentation provides developers with quick answers, including −Inputs for each web service with a description, the required format, and examples −Outputs returned by the web service with descriptions of each field −Frequently asked questions −An “Air Quality 101” page with information about the data
7
7 AirNow API API Features (continued) KML Contour web services (currently in beta release) return gridded outputs of PM 2.5, ozone, or combined AQI values. These web services return data contours for a user-selected geographic area. Operations and performance features include rate limiting, caching, and activity logging.
8
8 AirNow API Based on user response and requests, additions may include a web service that returns AQI and concentration values in a variety of formats (e.g., KML, CSV, JSON, XML) for a user- specified geographic area, parameter, and date/time range. Next Steps
9
9 REST-type URL Request http://www.airnowapi.org/aq/forecast/zipCode/?format=text/csv&zipCode= 27511&date=2014-02-03&distance=25&API_KEY=9985988E-D56F-E5112 Example Outputs CSV: "DateIssue","DateForecast","ReportingArea","StateCode","Latitude","Longitude","ParameterName", "AQI", "CategoryNumber","CategoryName","ActionDay","Discussion“ "2014-02-02 ","2014-02-03 ","Raleigh-Durham-Chapel Hill","NC","35.878","-78.787","O3","-1","1","Good","false","“ … JSON: [{"DateIssue":"2014-02-03 ","DateForecast":"2014-02-04 ","ReportingArea":"Raleigh-Durham-Chapel Hill","StateCode":"NC","Latitude":35.878,"Longitude":-78.787,"ParameterName":"O3","AQI":- 1,"Category":{"Number":1,"Name":"Good"},"ActionDay":false,"Discussion":""}, … XML: 02/03/2014 12:00:00 AM 02/04/2014 12:00:00 AM Raleigh-Durham-Chapel Hill NC 35.878 - 78.787 O3 -1 1 Good False Using the AirNow API
10
10 A Simple Web Display Example Forecast var data =[{"DateIssue":"2014-02-02 ","DateForecast":"2014-02-03 ","ReportingArea":"Raleigh-Durham-Chapel Hill","StateCode":"NC","Latitude":35.878,"Longitude":-78.787,"ParameterName":"O3","AQI":- 1,"Category":{"Number":1,"Name":"Good"},"ActionDay":false,"Discussion":""}]; var html = ""; for(var i = 0; i < data.length; i++) { var dataRec = data[i]; html += ' ' + dataRec.DateIssue + ' ' + dataRec.DateForecast + ' ' + dataRec.ReportingArea + ' ' + dataRec.ParameterName + ' ' + AQI + ' ' + dataRec.Category.Name + ' '; } html = ' Issue Date Forecast Date Reporting Area Parameter AQI Category ' + html; document.getElementById("dataTable").innerHTML = html; Using the AirNow API
11
11 Mobile Apps pass user requests to the API and display the response. Using the AirNow API http://www.airnowapi.org/aq/forecast/zipCode/?format=text/csv&zipCode = 27511&date=2014-02-03&distance=25&API_KEY=9985988E-D56F-E511
12
Questions? ? 12 Steven Ludewig Sonoma Technology, Inc. steve@sonomatech.com Phil Dickerson U.S. EPA Dickerson.Phil@epa.gov John White U.S. EPA White.John@epa.gov Contact
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.