sparkfun / phant

the data logging engine behind data.sparkfun.com
700 stars 99 forks source link

Add support for Google Charts Constructor's JavaScript Literal data Parameter #141

Closed piettetech closed 6 years ago

piettetech commented 9 years ago

There is a great tutorial on how to load data from the Phant database server into a Google dataTable.

I would like to suggest a new interface to be used that is more efficient for very large data sets. It's more efficient to be able to load using the Literal data parameter as described here - https://developers.google.com/chart/interactive/docs/reference#dataparam

This would allow a datatable to be loaded directly from the results of the Phant query. If a user wants to use a subset of the datatable they can create a dataview.

This would simplify the creation of the google datatable to -

        // JSONP request
        var jsonData = $.ajax({
          url: 'http://' + phant_host + '/output/' + public_key + '.json',
          data: {page: 1},
          dataType: 'json',
        }).done(function (results) {

          // Create our data table out of JSON data loaded from server.
          var data = new google.visualization.DataTable(jsonData);
      });
bboyho commented 6 years ago

Phant is No Longer in Operation

Unfortunately Phant, our data-streaming service, is no longer in service and will be discontinued. The system has reached capacity and, like a less-adventurous Cassini, has plunged conclusively into a fiery and permanent retirement. There are several other maker-friendly, data-streaming services and/or IoT platforms available as alternatives. The three we recommend are Blynk, ThingSpeak, and Cayenne. You can read our blog post [ https://www.sparkfun.com/news/2413 ] on the topic for an overview and helpful links for each platform.