geeViz.geeView#

View GEE objects using Python

geeViz.geeView is the core module for managing GEE objects on the geeViz mapper object. geeViz instantiates an instance of the mapper class as Map by default. Layers can be added to the map using Map.addLayer or Map.addTimeLapse and then viewed using the Map.view method.

Functions

RGB_to_hex(RGB)

[255,255,255] -> "#FFFFFF"

baseDomain(url)

Get root domain for a given url

cleanAccessToken(accessToken)

Remove trailing '....' in generated access token

color_dict_maker(gradient)

Takes in a list of RGB sub-lists and returns dictionary of colors in RGB and hex form for use in a graphing function defined later on

getProject([overwrite])

Tries to find the current Google Cloud Platform project id

get_poly_gradient_ct(palette, min, max)

Take a palette and a set of min and max stretch values to get a 1:1 value to color hex list

hex_to_rgb(value)

Return (red, green, blue) for the color given as #rrggbb.

isPortActive([port])

See if a given port number is currently active

is_notebook()

Check if inside Jupyter shell

linear_gradient(start_hex[, finish_hex, n])

returns a gradient list of (n) colors between two hex colors.

polylinear_gradient(colors, n)

returns a list of colors forming linear gradients between all sequential pairs of colors.

refreshToken()

Get a refresh token from currently authenticated ee instance

robustInitializer()

A method that tries to authenticate and/or initialize GEE if it isn't already successfully initialized.

run_local_server([port])

Start a local webserver using the Python http.server

serviceAccountToken(service_key_file_path)

Get a refresh token from service account key file credentials

setProject(id)

Sets the project id of an instance of ee

verified_initialize([project])

Tries to initialize GEE with a given project id.

Classes

mapper([port])

Primary geeViz map setup and manipulation object