背景
近期需要在GEE下载一些异常点数据,但在正式下载之前,想查看一下下载的异常点数据是否在时序上有所反映,以避免下载的数据无法使用。基于此需求,作者通过参考前人的经验以及官方文档,以静止卫星为例(其他类型数据类似,只需切换数据集,并更换想要展示的波段即可),展示了如何在GEE平台上在线plot时序曲线。
实现代码
// define coordinate
var point = ee.Geometry.Point([-110.485,40.5003]);
//filter imagesCollection
var dataset = ee.ImageCollection("NOAA/GOES/17/MCMIPF") // dataset that we want use
.filterDate('2020-09-15', '2020-09-17')
print(dataset)
// create chart
var chart = ui.Chart.image.series({
imageCollection: dataset.select('CMI_C01'), // band that we want to plot
region: point,
scale: 2000
}).setOptions({title: 'Reflectance',
title: 'Reflectance Plot',
hAxis: {title: 'Date', titleTextStyle: {italic: false, bold: true}},
vAxis: {
title: 'Reflectance',
titleTextStyle: {italic: false, bold: true}
},
pointSize: 2, // lineStyle
curveType: 'function',
});
// plot line chart
print(chart);
运行效果
以下为运行的效果,通过点击结果右上角的图标,结果还可放大与导出。
![](https://i-blog.csdnimg.cn/blog_migrate/cda6917123a996f71ba06204068b05d8.png)
参考链接
本文在创作过程中,参考了以下链接。其中,谷歌官方提供的开发者文档非常强大,可以帮助大家在线快速绘制美观的图表: