<jupyter_start><jupyter_text>Uncomment the following line to install [geemap](https://geemap.org) if needed.<jupyter_code># !pip install geemap
import geemap
import os<jupyter_output><empty_output><jupyter_text>Update the geemap packageIf you run into errors with this notebook, please uncomment the line below to update the [geemap](https://github.com/giswqs/geemapinstallation) package to the latest version from GitHub. Restart the Kernel (Menu -> Kernel -> Restart) to take effect.<jupyter_code># geemap.update_package()<jupyter_output><empty_output><jupyter_text>Download a GIF<jupyter_code>from geemap import *
url = 'https://i.imgur.com/MSde1om.gif'
out_dir = os.path.join(os.path.expanduser('~'), 'Downloads')
if not os.path.exists(out_dir):
    os.makedirs(out_dir)
download_from_url(url, out_file_name='temp.gif', out_dir=out_dir)
in_gif = os.path.join(out_dir, 'temp.gif')
show_image(in_gif)<jupyter_output><empty_output><jupyter_text>Get image URLs<jupyter_code>noaa_logo = 'https://bit.ly/3ahJoMq'
ee_logo = 'https://bit.ly/2RJYSCo'<jupyter_output><empty_output><jupyter_text>Set output GIF path<jupyter_code>out_gif = os.path.join(out_dir, 'output.gif')<jupyter_output><empty_output><jupyter_text>Add images to GIF<jupyter_code>add_image_to_gif(in_gif, out_gif, in_image=noaa_logo, xy = ('2%', '80%'), image_size=(80, 80))
add_image_to_gif(out_gif, out_gif, in_image=ee_logo, xy = ('13%', '79%'), image_size=(85, 85))<jupyter_output><empty_output><jupyter_text>Display output GIF<jupyter_code>show_image(out_gif)<jupyter_output><empty_output><jupyter_text>Create a colorbar<jupyter_code>width = 250
height = 30
palette = ['blue', 'purple', 'cyan', 'green', 'yellow', 'red']
labels = [-40, 35]
colorbar = create_colorbar(width=width, height=height, palette=palette, vertical=False,
                    add_labels=True, font_size=20, labels=labels)
show_image(colorbar)<jupyter_output><empty_output><jupyter_text>Add colorbar to GIF<jupyter_code>add_image_to_gif(out_gif, out_gif, in_image=colorbar, xy = ('69%', '89%'), image_size=(250, 250))
show_image(out_gif)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14204275534441804, 'fraction_numerical': 0.01852731591448931, 'mean_word_length': 8.529411764705882, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 39, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '98792', 'license': 'MIT', 'n_tokens_mistral': 855, 'n_tokens_neox': 819, 'n_words': 137, 'path': 'examples/notebooks/17_add_colorbar_to_gif.ipynb', 'repo_name': 'deeplook/geemap', 'size': '2105'}