TerriaJS / terriajs

A library for building rich, web-based geospatial data platforms.
https://terria.io
Apache License 2.0
1.18k stars 364 forks source link

Graph support #662

Closed meh9 closed 8 years ago

meh9 commented 9 years ago

We have a requirement for showing graphs of data.

In most cases this is for showing a timeseries of a value for a specific point or area. Initially the graph might be shown in the Info popup when a feature on the globe is clicked.

The kind of data we need to show may be something like power generation at a power station over time, or weather related data. For weather related data, it would be useful to show multiple values with different units at once, this way we could show wind speed, temperature, dew point and solar intensity on the same graph perhaps. Another interesting graph would be wind speed with increasing altitude.

@axman6 has done some prototypes for AREMI using C3.js which work pretty well. We are also pre-generating some SVG graphs and serving them up.

metanomy commented 9 years ago

It might make sense to define the behavior of the graph as an option to the data source definition. This is especially important for data sources like NetCDF. The Godiva2 client of ncWMS has a nice approach to graphing data (http://www.resc.rdg.ac.uk/trac/ncWMS/wiki/GodivaTwoUserGuide), and you can see one Cesium-based approach here: http://forecast.ewatercycle.org/

meh9 commented 9 years ago

@metanomy, thanks for the links!

The Cesium solution looks great, and is intuitive, we will be going for something like that.

The Godiva2 graphing support appears be a front-end to getting the Thredds server to generate the graph. This is reasonably similar to how we generate graphs in AREMI, both just generate a static PNG. We're trying to have a more interactive graph solution.

However, it did show me how we can get timeseries data to graph out of a Thredds server, which is something that we will need to support for the graph solution! So, here it is for our own future reference, for a service that we are using (sorry for the long URL):

http://neii.bom.gov.au/services/solarclim/wms/data/monClim_dirNorExp1Day.nc?time=1993-01-16T00:00:00.000Z/1993-12-16T00:00:00.000Z&tiled=true&transparent=true&format=image%2Fpng&exceptions=application%2Fvnd.ogc.se_xml&styles=&service=WMS&version=1.1.1&request=GetFeatureInfo&layers=mean_exposure&query_layers=mean_exposure&srs=EPSG%3A3857&bbox=15028131.257091936%2C-2504688.542848654%2C16280475.528516259%2C-1252344.271424327&x=237&y=147&width=256&height=256&info_format=text/xml

We've also discussed this at length internally, unfortunately this issue doesn't reflect that.

metanomy commented 9 years ago

@meh9 Implicit are some assumptions:

Now, if we were really clever, we'd dynamically present interaction functions based on the data types returned by the GetCapabilities :)

I plan on funding another Open Source bounty on this capability in the next month or so, so let's think what a minimum MVP might look like around this general idea..

RacingTadpole commented 9 years ago

Some notes, updated to reflect our team's design meeting on 12 Nov 2015:

Further thoughts on the <chart> tag:

metanomy commented 9 years ago

I think we need to also have @rsignell-usgs on this thread.

Since we are talking about a generalized charting/graphing capability, perhaps we should consider the following three general types of data sources (and their MVP use cases):

metanomy commented 9 years ago

There is also some interesting work being done as part of the SUNSHINE project. This PDF (http://www.sunshineproject.eu/jsmallfib_top/SUNSHINE/Final%20Deliverables/D4.9%20Sunshine%20Energy%20Web%20Portal.pdf) describes some interesting UI work related to graphing. Unfortunately, although there are references to the SUNSHINE toolkit being released as Open Source, I haven't been able to find it anywhere.

stevage commented 8 years ago

Should this be merged into #1278?

RacingTadpole commented 8 years ago

Basic line charts are in master now. More potential features listed under #1652.