GeoscienceAustralia/dea-coastlines

Add "eroding"/"prograding" description column to statistics

robbibt opened this issue · 1 comments

Regarding adding a simple plain-text description to charts of coastal change through time that will be displayed on Terria, e.g. pseudo-code "This location has {"eroded" if rate_time < 0 else "accreted"} by {abs(rate_time)} metres per year since 1988"? :

Ok so unfortunantly for our templating system we can only use a true/false flag, so if the data could have hasEroded property that would make our life easier

If a simple boolean column hasEroded could be added, this could be used to generate the chart:

{
    "catalog": [{
        "type": "wms",
        "name": "Coastline",
        "url": "https://nonprod.geoserver.dea.ga.gov.au/geoserver/wms",
        "layers": "dea:DigitalEarthAustraliaCoastlines",
        "featureInfoTemplate": "This location has {{#hasEroded}}eroded{{/hasEroded}}{{^hasEroded}}accreted{{/hasEroded}} by {{rate_time}} metres per year since 1988</br></br><chart title='{{name}}' y-column='Value' x-column='Year' column-units='{{terria.timeSeries.units}}' preview-x-label='YEAR'>Year,Value\n1988,{{1988}}\n1989,{{1989}}\n1990,{{1990}}\n1991,{{1991}}\n1992,{{1992}}\n1993,{{1993}}\n1994,{{1994}}\n</chart>" 
    }]    
}

Compared to a simpler implementation:

{
    "catalog": [{
        "type": "wms",
        "name": "Coastline",
        "url": "https://nonprod.geoserver.dea.ga.gov.au/geoserver/wms",
        "layers": "dea:DigitalEarthAustraliaCoastlines",
        "featureInfoTemplate": "This location has changed by {{rate_time}} metres per year since 1988</br></br><chart title='{{name}}' y-column='Value' x-column='Year' column-units='{{terria.timeSeries.units}}' preview-x-label='YEAR'>Year,Value\n1988,{{1988}}\n1989,{{1989}}\n1990,{{1990}}\n1991,{{1991}}\n1992,{{1992}}\n1993,{{1993}}\n1994,{{1994}}\n</chart>" 
    }]    
}

Screenshot of potential Terria graph without descriptive header:
kindalikethis