{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "0", "metadata": {}, "outputs": [], "source": [ "import ee\n", "import geemap\n", "from geemap import cartoee\n", "import cartopy.crs as ccrs\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": null, "id": "1", "metadata": {}, "outputs": [], "source": [ "geemap.ee_initialize()\n", "\n", "point = ee.Geometry.Point(123.488, -8.284)\n", "\n", "volcano = (\n", " ee.ImageCollection(\"COPERNICUS/S2_SR\")\n", " .filterBounds(point)\n", " .filterDate(\"2020-11-28\", \"2020-12-04\")\n", " .first()\n", ")\n", "\n", "plt.figure(figsize=(16, 12))\n", "\n", "region = [123.3, -8.5, 123.8, -8.18]\n", "vis = {\"min\": 0, \"max\": 6000, \"bands\": [\"B4\", \"B3\", \"B2\"]}\n", "\n", "ax = cartoee.get_map(volcano, region=region, vis_params=vis)\n", "\n", "ax.set_title(label=\"Lewato volcano 2020-11-29\", fontsize=15)\n", "\n", "cartoee.add_gridlines(ax, interval=(0.1, 0.1), linestyle=\":\")\n", "cartoee.add_scale_bar(ax, 5, xy=(0.9, 0.02), linewidth=3, color=\"white\", unit=\"km\")\n", "cartoee.add_north_arrow(\n", " ax, \"N\", xy=(0.9, 0.2), arrow_length=0.1, text_color=\"white\", arrow_color=\"white\"\n", ")\n", "\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "id": "2", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" } }, "nbformat": 4, "nbformat_minor": 5 }