Skip to content

Commit

Permalink
chore: simplified regression description; added filtering for impervi…
Browse files Browse the repository at this point in the history
…osness; added both requested filtering datasets to HAUC1
  • Loading branch information
santilland committed Oct 29, 2024
1 parent 3a3e1cd commit a713473
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/src/components/IndicatorData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1570,16 +1570,16 @@ export default {
parentDiv.id = 'regressionresult';
parentDiv.style.position = 'absolute';
parentDiv.style.top = '105px';
parentDiv.style['margin-left'] = '80px';
parentDiv.style['font-size'] = '11px';
parentDiv.style['margin-left'] = '60px';
parentDiv.style['font-size'] = '12px';
chart.data.datasets.forEach((val, idx) => {
// currently we do not use sections so we assume sections with length 1
const { sections } = ChartRegressions.getDataset(chart, idx);
if (sections && sections.length > 0) {
const { result } = sections[0];
const divEl = document.createElement('div');
divEl.style.color = `${this.appConfig.refColors[idx]}`;
const content = document.createTextNode(`R²: ${result.r2}; ${result.string}`);
const content = document.createTextNode(`R²: ${Number(result.r2).toFixed(3)}`);
divEl.appendChild(content);
parentDiv.appendChild(divEl);
}
Expand Down
33 changes: 32 additions & 1 deletion app/src/config/gtif.js
Original file line number Diff line number Diff line change
Expand Up @@ -1332,20 +1332,51 @@ export const globalIndicators = [
['2023', '2023_LST_AT_merged_composite_mean_70m_3857.tif'],
['2024', '2024_LST_AT_merged_composite_mean_70m_3857.tif'],
],
cogFilters: {
sourceLayer: 'HAUC1',
filters: {
var: {
display: true,
label: 'Imperviosness [%]',
id: 'var',
min: 0,
max: 100,
range: [0, 100],
},
},
},
display: [
{
protocol: 'cog',
disableTimeSlider: true,
id: 'HAUC1',
sources: [
{ url: 'https://eox-gtif-public.s3.eu-central-1.amazonaws.com/HeatAdapt/update/{time}' },
{ url: 'https://eox-gtif-public.s3.eu-central-1.amazonaws.com/HeatAdapt/update/IMD_2018_AT_70m_3857.tif' },
{ url: 'https://eox-gtif-public.s3.eu-central-1.amazonaws.com/HeatAdapt/update/LULUCF_2018_AT_70m_3857.tif' },
],
dateFormatFunction: (date) => `${date[1]}`,
labelFormatFunction: (date) => date[0],
style: {
variables: {
varMin: 0,
varMax: 100,
},
color: [
'case',
['!=', ['band', 2], 0],
[
'all',
['!=', ['band', 4], 0],
['between',
['band', 2],
['var', 'varMin'],
['var', 'varMax'],
/* assuming a stretch from 0 to 255 but it seems to not be used
['*', ['var', 'varMin'], 2.55],
['*', ['var', 'varMax'], 2.55],
*/
],
],
[
'interpolate',
['linear'],
Expand Down

0 comments on commit a713473

Please sign in to comment.