@@ -23,11 +23,11 @@ export default {
2323 const ndviData = ref (null )
2424 const startDate = ref (1514761200 ) // 2018-01-01
2525 const endDate = ref (1704063599 ) // 2023-12-31
26- const temporalResolution = ref (" Monthly" )
27- const aggregation = ref (" Mean" )
26+ const temporalResolution = ref (" Monthly" ) // options: "Daily", "Monthly"
27+ const aggregation = ref (" Mean" ) // options: "Mean", "Median", "Max", "Min"
2828
2929 const fetchTemperatureData = async () => {
30- const apiUrl = ' http ://localhost:8000 /weather/index'
30+ const apiUrl = ' https ://thf-climate-run-1020174331409.europe-west3.run.app /weather/index'
3131 const params = {
3232 weatherVariable: " temperature_2m" ,
3333 startDate: startDate .value ,
@@ -47,7 +47,7 @@ export default {
4747 }
4848
4949 const fetchNdviData = async () => {
50- const apiUrl = ' http ://localhost:8000 /index/ndvi'
50+ const apiUrl = ' https ://thf-climate-run-1020174331409.europe-west3.run.app /index/ndvi'
5151 const params = {
5252 startDate: startDate .value ,
5353 endDate: endDate .value ,
@@ -77,7 +77,7 @@ export default {
7777 const tempTrace = {
7878 x: tempTimestamps,
7979 y: tempValues,
80- type: ' bar' ,
80+ type: ' bar' , // can change to lines+markers
8181 name: ' Temperature (°C)' ,
8282 marker: { color: ' red' }
8383 };
@@ -94,17 +94,17 @@ export default {
9494 const layout = {
9595 title: ' NDVI vs. Monthly Temperature for Tempelhofer Feld (2018-2023)' ,
9696 xaxis: { title: ' Date' , type: ' date' , rangeslider: { visible: true } },
97- yaxis: { title: ' NDVI ' },
97+ yaxis: { title: ' Temperature (°C) ' },
9898 yaxis2: {
99- title: ' Temperature (°C) ' ,
99+ title: ' NDVI ' ,
100100 overlaying: ' y' ,
101101 side: ' right' ,
102102 },
103103 legend: { x: 1.1 , y: 0.5 },
104104 template: ' plotly_white'
105- };
105+ };
106106
107- Plotly .newPlot (' plotlyGraphTemperatureNdvi' , [tempTrace, ndviTrace], layout);
107+ Plotly .newPlot (' plotlyGraphTemperatureNdvi' , [tempTrace, ndviTrace], layout);
108108 }
109109 }
110110
0 commit comments