Geographic Information Systems Asked by user173541 on January 29, 2021
After developing this code:
var dataset = ee.ImageCollection("ECMWF/ERA5_LAND/HOURLY").select("temperature_2m");
// Change de user interface to put into pannels de differences selection
// Create User Interface portion
// Create a panel to hold our widgets.
var panel = ui.Panel();
panel.style().set('width', '300px');
// Create an intro panel with labels.
var intro = ui.Panel([
ui.Label({
value: 'Chart Inspector',
style: {fontSize: '20px', fontWeight: 'bold'}
}),
ui.Label('Click a point on the map to inspect.')
]);
panel.add(intro);
// panels to hold lon/lat values
var lon = ui.Label();
var lat = ui.Label();
panel.add(ui.Panel([lon, lat], ui.Panel.Layout.flow('horizontal')));
// Register a callback on the default map to be invoked when the map is clicked
Map.onClick(function(coords) {
// Update the lon/lat panel with values from the click event.
lon.setValue('lon: ' + coords.lon.toFixed(2)),
lat.setValue('lat: ' + coords.lat.toFixed(2));
var point = ee.Geometry.Point(coords.lon, coords.lat);
//Add the time series plots to the panels
// Create first chart.
var TChart = ui.Chart.image.series(dataset, point,ee.Reducer.max(), 360);
TChart.setOptions({
title: 'Maximum temperature per month (1981-2020)',
vAxis: {title: 'Temperature (K)'},
hAxis: {title: 'date', format: 'MM-YY', gridlines: {count: 30}},
});
panel.widgets().set(2, TChart);
// Create second chart.
var MinChart = ui.Chart.image.series((dataset, point,ee.Reducer.min(), 360));
MinChart.setOptions({
title: 'Minimum temperature per month (1981-2020)',
vAxis: {title: 'Temperature (K)'},
hAxis: {title: 'date', format: 'MM-YY', gridlines: {count: 30}},
});
panel.widgets().set(3, MinChart);
});
Map.style().set('cursor', 'crosshair');
// Add the panel to the ui.root.
ui.root.insert(0, panel);
var visualization = {
bands: ['temperature_2m'],
min: 250.0,
max: 320.0,
palette: [
"#000080","#0000D9","#4000FF","#8000FF","#0080FF","#00FFFF",
"#00FF80","#80FF00","#DAFF00","#FFFF00","#FFF500","#FFDA00",
"#FFB000","#FFA400","#FF4F00","#FF2500","#FF0A00","#FF00FF",
]
};
Map.addLayer(dataset.median(),visualization)
GEE always find an error that I cannot identify :
Missing required arguments to function series(): region in <global>, line 35
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP