usf-imars / grafana-erddap Goto Github PK
View Code? Open in Web Editor NEWfetch erddap data in grafana
License: MIT License
fetch erddap data in grafana
License: MIT License
from ERDDAP docs:
for .png and .transparentPng images (not other image file types), you can also use the &.size=width|height parameter to request an image of any size.
This would allow us to use transparent images and allow for getting any size rather than the defaults.
The graphics commands section also has some useful stuff:
&.bgColor=bgColor
&.colorBar=palette|continuous|scale|min|max|nSections
&.color=value
&.draw=value
&.legend=value
&.trim=trimPixels
Specifically:
&.legend=Off
and &.legend=Only
may be the fix for #1 .&.trim=trimPixels
should remove the whitespaceAn info popup for the colobar formatting string would be useful. Right now there is no info on that editor option.
From erddap docs:
&.colorBar=palette|continuous|scale|min|max|nSections
This specifies the settings for a color bar. The sub-values are:
palette - All ERDDAP installations support a standard set of palettes: BlackBlueWhite, BlackRedWhite, BlackWhite, BlueWhiteRed, LightRainbow, Ocean, OceanDepth, Rainbow, RedWhiteBlue, ReverseRainbow, Topography, TopographyDepth, WhiteBlack, WhiteBlueBlack, WhiteRedBlack. Some ERDDAP installations support additional options. See a Make A Graph web page for a complete list. The default varies based on min and max: if -1*min ~= max, the default is BlueWhiteRed; otherwise, the default is Rainbow.
continuous - must be either no value (the default), C (for Continuous), or D (for Discrete). The default is different for different variables.
scale - must be either no value (the default), Linear, or Log. The default is different for different variables.
min - The minimum value for the color bar. The default is different for different variables.
max - The maximum value for the color bar. The default is different for different variables.
nSections - The preferred number of sections (for Log color bars, this is a minimum value). The default is different for different colorBar settings.
Part of this and/or a link to the docs should be added to grafana-erddap/src/partials/editor.html
Many improvements could be made here with regard to the image times if more was known about the timescale of the data in the client.
Great suggestion of how to do that from Bob Simons :
- [grafana-erddap (GE)] seems to make requests for evenly spaced time points. ERDDAP then (as you say) snaps to (nice phrase) the nearest time point.
But, ERDDAP treats those precise time points as different requests and makes a new graph for each different request.
And, the resulting image is labeled in GE as having that specific time point (which is odd and misleading -- implying a precision that doesn't exist).
Instead, if you make this request to any gridded dataset with a time dimension:
....csv0?time[2018-12-22T16:21] //or some other very precise time
ERDDAP will return the snapped-to time point, e.g., 2018-12-23T00:00:00Z (though not all daily datasets have times values at T00:00:00).
If you then use that time point for the request to ERDDAP and for the label in GE, it will be much more efficient for ERDDAP (which may have a cached image on hand) and more correctly labelled in GE.
I am currently implementing a manual setting of the delta
& delta_unit
for time between frames in the view.
A more elegant approach might be to set a desired number of images and then have delta adjust automatically.
This requires a bit of clever programming.
I haven't had coffee yet so I am leaving it open for later.
Maybe I will come back here if someone asks for it.
From https://grafana.com/docs/grafana/latest/developers/plugins/legacy/
Since Grafana 7.0, writing plugins using Angular is no longer recommended
Basically we need a rebuild here. Legacy plugins are still supported for now so this isn't urgent.
Until this is set up as a datasource, product_id & varname are tricky to use as template variables.
Since the template variables cannot be set up as query
s, they must be configured as custom
with each value manually entered.
If product_id and varname were merged into one box, the custom
template variable workaround could be used.
Setting up this as a datasource would be even better, but that is a much bigger task.
Setting a time delta of higher granularity than the source data will result in duplicated images.
That ok, but even better might be to replace the duplicates with a placeholder image.
I just created a placeholder image ellipsis.png
and stuck a TODO in the function where this test ought to go.
The trouble is that comparing the content of two images w/ different URLs is not easy.
Just another enhancement that is very doable but not worth the time until someone asks for it.
Would be nice to have one color bar rather than one on each image.
Does ERDDAP support no-colorbar and colorbar-only requests?
custom image sizing would help with long download times for remote users with slower connections.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.