<jupyter_start><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>Create an interactive map Use the Drawing tool to draw a rectangle on the map<jupyter_code>Map = geemap.Map()
Map<jupyter_output><empty_output><jupyter_text>Generate a Landsat timelapse animation<jupyter_code>import os
out_dir = os.path.join(os.path.expanduser("~"), 'Downloads')
if not os.path.exists(out_dir):
    os.makedirs(out_dir)
label = 'Urban Growth in Las Vegas'
Map.add_landsat_ts_gif(label=label, start_year=1985, bands=['Red', 'Green', 'Blue'], font_color='white', frames_per_second=10, progress_bar_color='blue')<jupyter_output><empty_output><jupyter_text>Create Landsat timeseries<jupyter_code>import os
import ee
import geemap
Map = geemap.Map()
Map<jupyter_output><empty_output><jupyter_text>You and define an roi or draw a rectangle on the map<jupyter_code>roi = ee.Geometry.Polygon(
    [[[-115.471773, 35.892718],
      [-115.471773, 36.409454],
        [-114.271283, 36.409454],
        [-114.271283, 35.892718],
        [-115.471773, 35.892718]]], None, False)
# roi = Map.draw_last_feature
collection = geemap.landsat_timeseries(roi=roi, start_year=1985, end_year=2019, start_date='06-10', end_date='09-20')
print(collection.size().getInfo())
first_image = collection.first()

vis = {
    'bands': ['NIR', 'Red', 'Green'],
    'min': 0,
    'max': 4000,
    'gamma': [1, 1, 1]
}

Map.addLayer(first_image, vis, 'First image')<jupyter_output><empty_output><jupyter_text>Download ImageCollection as a GIF<jupyter_code># Define arguments for animation function parameters.
video_args = {
  'dimensions': 768,
  'region': roi,
  'framesPerSecond': 10,
  'bands': ['NIR', 'Red', 'Green'],
  'min': 0,
  'max': 4000,
  'gamma': [1, 1, 1]
}
work_dir = os.path.join(os.path.expanduser("~"), 'Downloads')
if not os.path.exists(work_dir):
    os.makedirs(work_dir)
out_gif = os.path.join(work_dir, "landsat_ts.gif")
geemap.download_ee_video(collection, video_args, out_gif)<jupyter_output><empty_output><jupyter_text>Add animated text to GIF<jupyter_code>geemap.show_image(out_gif)
texted_gif = os.path.join(work_dir, "landsat_ts_text.gif")
geemap.add_text_to_gif(out_gif, texted_gif, xy=('3%', '5%'), text_sequence=1985, font_size=30, font_color='#ffffff', add_progress_bar=False)
label = 'Urban Growth in Las Vegas'
geemap.add_text_to_gif(texted_gif, texted_gif, xy=('2%', '88%'), text_sequence=label, font_size=30, font_color='#ffffff', progress_bar_color='cyan')
geemap.show_image(texted_gif)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14725663716814158, 'fraction_numerical': 0.04991150442477876, 'mean_word_length': 6.596774193548387, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '1879', 'license': 'MIT', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1073, 'n_words': 213, 'path': 'examples/notebooks/18_create_landsat_timelapse.ipynb', 'repo_name': 'jitendra-kumar/geemap', 'size': '2825'}