apps widgets and apis tap into existing tech to
play

Apps, Widgets and APIs: Tap into existing tech to streamline your - PowerPoint PPT Presentation

Apps, Widgets and APIs: Tap into existing tech to streamline your programs Marian Weaver, FMC Dar Knipe, Market Maker Chris Seeger, Iowa State University Who We Are: Marian Weaver Metrics Program Manager Two priorities for FMC are to: 1)


  1. Apps, Widgets and APIs: Tap into existing tech to streamline your programs Marian Weaver, FMC Dar Knipe, Market Maker Chris Seeger, Iowa State University

  2. Who We Are: Marian Weaver Metrics Program Manager Two priorities for FMC are to: 1) Professionalize the industry through the use of best in class tools 2) Help markets grow and thrive through the use of data-driven decisions Metrics is a data collection and reporting system that empowers market managers to be in control of their data, and to transform that data into actionable information. Farmspread provides a comprehensive online management platform for Farmers Markets, helping to streamline operations while promoting a national directory of markets, vendors and products.

  3. A history of how we came to this partnership How a partnership fixed a problem o The Metrics development roadmap had planned for vendor management tools to be built into Metrics, to further expand the functionality of Metrics for users. o After some exploratory development, we decided that this was more than FMC could take on, so we looked for other ways to offer this functionality to Metrics users. o FMC met Farmspread in November of 2017, and it became apparent that each of us were moving in the direction that the other had already tackled, so rather than compete, we decided to collaborate. o What followed was an API, which allows markets to use Farmspread for vendor applications and market management, and have that data transfer directly into Metrics. Collect data once, use it twice. o Markets that originally just had data for operations, are now expanding that usage into automated analysis and promotion as a result of our API.

  4. What is an API, anyway? API : Application Programming Interface In English : A program written to communicate data from one website/server to another. What is does : APIs allow for websites and companies to share data across the internet, based on a shared set of parameters that both companies have.

  5. What content are you sharing via API? Current Data Points: Current Data Points: API • Market Information • Market Information • Vendor Profile Data • Vendor Profile Data Future Data Points: Future Data Points: • Market Sales • Market Sales API • Vendor Sales • Vendor Sales • Market Attendance • Market Attendance • Real Time Weather • Real Time Weather API currently supports 60% of all statistics available in Metrics; by next year it will be over 80%

  6. What does this look like to market managers? API

  7. How is it working out? o We started the project with three markets that were interested in piloting the API; our goal was for ten for our first season. o The API was completed in May of 2018, missing the vendor application deadlines for many markets. o However, throughout the season, we acquired 17 more markets that utilized the API; many of them were winter season markets preparing for later this year. o As of today, we have 20 markets actively using the API, and over 400 vendors, almost 20% of all vendors represented in the Metrics system, and we have at least 20 more markets in line for the 2019 season.

  8. Th The A e API Solu Solutio ion • A registration and log in system for farmers market managers and farmers to use with all collaborating directories • When a user updates a profile it updates all the directories. • Accounts / profiles can be accessed from any of the web sites of collaborating organizations. • Designed to be compatible with the USDA Farmers Market Directory. • Shared data administrative tools

  9. The ISUEO Indicators Program is built upon a collection of APIs and a network of databases (the Indicators Portal) that store and share data to a variety of products.

  10. Anatomy of an API Request • An API is often an external resource (endpoint), capable of accepting and responding to requests. Often written in Node, Ruby, Java or ASP.NET etc. • Check the ‘developers’ link on website footers or in about for API documentation and URL. • Test samples and search Stack Exchange for help with syntax errors Endpoint Parameters Result https://api.ipify.org ?format=json {"ip":"98.207.254.136"} ?format=json callback({"ip":"98.207.254.136"}); ?format=jsonp&callback=getip getip({"ip":"98.207.254.136"}); <nothing specified> 98.207.254.136

  11. Anatomy of an API Response • Some APIs provide access to an ‘ Application ’ or data. Web mapping API’s examples: Google Maps, Leaflet, Open Layers, Mapbox • RESTful APIs can provide various data output formats for the client to consume. • JSON, XML, CSV response can be used with a webmap, chart or other data visualization. JSON (minified and hard to read) JSON (formatted and easier to read) {"zip_codes":[{"zip_code":"50156","distance":13.336,"city":"Madrid","state":"IA"},{"zi { p_code":"50134","distance":14.124,"city":"Kelley","state":"IA"},{"zip_code":"50152"," "zip_codes": [ distance":9.112,"city":"Luther","state":"IA"},{"zip_code":"50013","distance":13.316,"ci { ty":"Ames","state":"IA"},{"zip_code":"50011","distance":12.446,"city":"Ames","state": "zip_code": "50156", "IA"},{"zip_code":"50012","distance":11.912,"city":"Ames","state":"IA"},{"zip_code":"5 "distance": 13.336, 0031","distance":14.649,"city":"Beaver","state":"IA"},{"zip_code":"50010","distance": "city": "Madrid", 14.633,"city":"Ames","state":"IA"},{"zip_code":"50212","distance":10.885,"city":"Ogde "state": "IA" n","state":"IA"},{"zip_code":"50014","distance":9.112,"city":"Ames","state":"IA"},{"zip }, _code":"50099","distance":2.589,"city":"Boone","state":"IA"},{"zip_code":"50037","dis { tance":2.472,"city":"Boone","state":"IA"},{"zip_code":"50036","distance":0,"city":"Boo "zip_code": "50134", https://www.zipcodeapi.com/API ne","state":"IA"},{"zip_code":"50105","distance":11.757,"city":"Gilbert","state":"IA "distance": 14.124,

  12. US Census Bureau API • Many API’s utilizing three primary underlying services • Census Data API (Key required) • Tiger Web REST Service (ArcGIS geometry) • Geocoder REST Service (10,000 record limit) Geocode: 1307 Florida Ave, Ames, IA 50014 Single Return: Lat/Long; State, County, Tract, Block Batch Return: CSV of Lat/Long Census API data formatted into a report. Tiger web returns GeoJSON. Geocoder provides address service.

  13. Weather API’s • Iowa Environmental Mesonet • Data sets for time/location • WMS map tiles • Weather summaries • Open Weather Map • Requires Key • Wide variety of data responses • Paid versions provide more features! http://api.openweathermap.org/data/2.5/weather?q=AMES, IOWA&APPID={key}&units=imperial • Dark Sky • Requires Key {"coord":{"lon":-93.62,"lat":42.03},"weather":[{"id":804,"main":"Clouds", "description":"overcast clouds","icon":"04n"}],"base":"stations","main": • Time machine requests {"temp":59.88,"pressure":1024,"humidity":77,"temp_min":56.66,"temp_ma • 1,000 free requests per day x":62.96},"visibility":16093,"wind":{"speed":9.17,"deg":60},"clouds":{"all":9 0},"dt":1536376500,"sys":{"type":1,"id":849,"message":0.0034,"country":"U S","sunrise":1536407251,"sunset":1536453349},"id":4846834,"name":"Ame s","cod":200}

  14. USDA QuickStats API • An on-line database containing official published aggregate estimates related to U.S. agricultural production. • Requires a Key • API request below returns JSON of 2012 Apple production in Boone County, Iowa. https://quickstats.nass.usda.gov/api/api_GET/?key= {key}&commodity_desc=APPLES&year=2012&state Iowa State University is currently using multiple API data _alpha=IA&county_name=BOONE&format=JSON sources data to develop a producer/market report.

  15. Questions?

Recommend


More recommend