Skip to content

biomearts/swale_api

Repository files navigation

Swale API

GET data

/[source]/[start]/[end]/[page?]/?[field]=[value]

  • source is the primary source, may be a comma-separated list
  • start and end are any date format in America/New_York timezone (can be * for open-ended)
  • page is the page number -- pages are 100 entries each and start at 1, last page is returned by default
  • field is a filter by the value of some property of the data

Examples

Return the most recent data from the tower (which includes temperature and wind speed) and the server (things like sun position and tides): http://54.235.200.47/tower,server/

POST data

Required:

  • source: what's the name of this data source?

Optional:

  • t_utc -- timestamp in UTC
    if not included, the server supplies it (with microseconds). date is automatically derived from this.
  • anything else

Note:

  • all field names will be automatically stripped of punctuation, spaces replaced with underscores, and lowercased
  • any nested sources are dropped. Must be a flat hierarchy.
  • t_utc is UTC even though queries are in America/New_York

Command-line interface

Put your scripts in the "scripts" folder and do the following: from cli import results

This will run a argument parser identical to the web interface ahead of your script and return a results object.

Context

Conceptually, this is like the temporal-only version of the Okavango field kit. ie, it's not GeoJSON, doesn't care about location.

Installation

Requires housepy and signal_processing

Copyright/License

Copyright (c) 2016 Biomearts

This program is free software licensed under the GNU General Public License, and you are welcome to redistribute it under certain conditions. It comes without any warranty whatsoever. See the LICENSE file for details, or see http://www.gnu.org/licenses/ if it is missing.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages