Code Monkey home page Code Monkey logo

grafana-erddap's People

Contributors

7yl4r avatar bulletfactory avatar daniellee avatar eldering avatar jareware avatar linkslice avatar mattttt avatar nabilbendafi avatar nopzor1200 avatar torkelo avatar

Watchers

 avatar  avatar  avatar

grafana-erddap's Issues

ERDDAP png sizing & other graphics tweaks

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 whitespace
  • the others should help with setting colors of NaN pixels, landmask, and data

+ help info for colorbar fmt string

An 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

inaccurate time-points & weird erddap requests

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.

auto-delta ?

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.

combine product_id & varname into one var

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 querys, 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.

do not show duplicate images

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.

one colorbar?

Would be nice to have one color bar rather than one on each image.
Does ERDDAP support no-colorbar and colorbar-only requests?

too many images across?

Sometimes something gets messed op with the the number of images and we get one too many images, pushing the image to the next row.

I suspect a rounding error somewhere.

I have noticed this with the following number of images: 7, 11, 14.

Example: n_images set to 7, but 8 images are displayed:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.