Pokemon Color Palettes for the Google Earth Engine JavaScript API (Code Editor)
Table of Contents
Google Earth Engine (GEE) is a cloud-based service for geospatial processing of vector and raster data. The Earth Engine platform has a JavaScript and a Python API with different methods to process geospatial objects. Google Earth Engine also provides a HUGE PETABYTE-SCALE CATALOG of raster and vector data that users can process online. The ee-pokepalettes is a just-for-fun module that allows you to use Pokemon Color Palettes to plot your data in GEE!
Check the usage of ee-pokepalettes here:
var poke = require("users/dmlmont/pokepalettes:pokepalettes");
var ndvi = ee.ImageCollection('MODIS/006/MOD13A2')
.filter(ee.Filter.date('2018-01-01', '2019-01-01'))
.median()
.divide(10000)
.select("NDVI");
var vis = {
min: 0.0,
max: 1.0,
// METAPOD!!!!!!
palette: poke.palettes.metapod,
};
Map.addLayer(ndvi, vis, 'NDVI');
// ADD A COLORBAR!
print(poke.colorbar("NDVI",vis.min,vis.max,vis.palette))
The ee-pokepalettes module can be accepted HERE. Once accepted, it can be required by running the following line in the GEE JavaScript Code Editor:
var poke = require("users/dmlmont/pokepalettes:pokepalettes");
The complete list of pokemon color palettes can be accessed by using the palettes attribute:
print(poke.palettes)
A palette can be accessed using dot notation:
print(poke.palettes.pikachu)
Or by using a key:
print(poke.palettes["mr. mime"])
Create a color bar using colorbar(title,minValue,maxValue,palette)
:
print(poke.colorbar("My title",0,100,poke.palettes.charmander))
The project is licensed under the MIT license.