Aidan-da / gee_packages

GEE stable packages

Home Page:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Dongdong Kong, Sun Yat-sen University

Table of Content



This repository is a GEE package in JavaScript. You can access it by


1. Visualization

// Load package
var pkg_vis  = require('users/kongdd/public:pkg_vis.js');
  • gradient legend, pkg_vis.grad_legend(viz, title, IsPlot, position)

    • viz Visualization parameters.
    • position String, legend position, e.g. "bottom-left", "bottom-right".
    • palette Corresponding colors.
  • discrete legend, pkg_vis.discrete_legend(names, palette, title, IsPlot, position)

    Legend examples:

  • Layout layout works like layout in R and subplot in MATLAB , which is used to produce multiple maps.

2. Temporal interpolation

// load package
var pkg_smooth = require('users/kongdd/public:Math/pkg_smooth.js');

3. Trend Analysis

// Load package
var pkg_trend = require('users/kongdd/public:Math/pkg_trend.js');
  • aggregate_prop: works like aggregate function in R .

    // add the property of Year, YearStr, YearMonth, Season
    imgcol      = pkg_trend.imgcol_addSeasonProb(imgcol); 
    imgcol_year = pkg_trend.aggregate_prop(imgcol, "year", 'mean');
    pkg_trend.aggregate_prop(ImgCol, prop, reducer, delta)
  • linearTrend, pkg_trend.linearTrend(ImgCol, robust)

4. Export data

// Load package
var pkg_export = require('users/kongdd/public:pkg_export.js');

If you need to download in batch, suggest combining with gee_monkey.

  • ExportImg: Export ee.Image in degree, pkg_export.ExportImg(img, task, options)

  • ExportImgCol: Export ee.ImageCollection in degree, pkg_export.ExportImgCol(ImgCol, dateList, options, prefix)

5. Palette

Show available palettes provided by pkg_vis. This function is modified from Gena‘s package.


Figure 1. Available palettes.