Geographic Information Systems Asked on May 28, 2021
In the below code, how can I compute logarithmic trendlines? Google Earth Engine just computes linear
, exponential
and polynomial
automatically. In other words I need slope and offset values in logarithmic relationship between two variables(data1 and data2).
code link: https://code.earthengine.google.com/3529165c811530af1169747d68983ffa
var data1 = ee.List([1,2,3,4]);
var data2 = ee.List([10,100,1000,10000]);
var data1Array = ee.Array(data1);
var data2Array = ee.Array(data2);
var log_chart = ui.Chart.array.values(data1Array,0,data2Array).setOptions({
title: 'logarithmic Curve',
curveType: 'function',
pointSize: 3,
trendlines: { 0: {
type: 'linear', //exponential, linear, polynomial
color: 'red',
lineWidth: 3,
opacity: 10,
showR2: true,
visibleInLegend: true
}}
});
print(log_chart);
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP