diff --git a/docs/notebooks/27_basemap_gallery.ipynb b/docs/notebooks/27_basemap_gallery.ipynb new file mode 100644 index 0000000000..ed43f23779 --- /dev/null +++ b/docs/notebooks/27_basemap_gallery.ipynb @@ -0,0 +1,163 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/giswqs/leafmap/blob/master/examples/notebooks/27_basemap_gallery.ipynb)\n", + "[![image](https://binder.pangeo.io/badge_logo.svg)](https://gishub.org/leafmap-pangeo)\n", + "\n", + "Uncomment the following line to install [leafmap](https://leafmap.org) if needed." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# !pip install leafmap" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import leafmap.leafmap as leafmap" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you are using a recently implemented leafmap feature that has not yet been released to PyPI or conda-forge, you can uncomment the following line to install the development version from GitHub." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# leafmap.update_package()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Select 100 basemaps" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "layers = list(leafmap.leafmap_basemaps.keys())[17:117]\n", + "# layers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Print out the labels" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(layers[:10])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create linked maps of 100 basemaps" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": false + }, + "outputs": [], + "source": [ + "leafmap.linked_maps(rows=20, cols=5, height=\"200px\", layers=layers, labels=layers)" + ] + } + ], + "metadata": { + "hide_input": false, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.5" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": true, + "sideBar": true, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": true, + "toc_window_display": false + }, + "varInspector": { + "cols": { + "lenName": 16, + "lenType": 16, + "lenVar": 40 + }, + "kernels_config": { + "python": { + "delete_cmd_postfix": "", + "delete_cmd_prefix": "del ", + "library": "var_list.py", + "varRefreshCmd": "print(var_dic_list())" + }, + "r": { + "delete_cmd_postfix": ") ", + "delete_cmd_prefix": "rm(", + "library": "var_list.r", + "varRefreshCmd": "cat(var_dic_list()) " + } + }, + "types_to_exclude": [ + "module", + "function", + "builtin_function_or_method", + "instance", + "_Feature" + ], + "window_display": false + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/docs/tutorials.md b/docs/tutorials.md index 3b503dacb9..b8bbf41c15 100644 --- a/docs/tutorials.md +++ b/docs/tutorials.md @@ -30,6 +30,7 @@ 24. Creating heat map from csv ([notebook](https://leafmap.org/notebooks/24_heatmap)) 25. Creating a population heat map with a colorbar and map title ([notebook](https://leafmap.org/notebooks/25_map_title)) 26. Creating an interactive map using the kepler.gl plotting backend ([notebook](https://leafmap.org/notebooks/26_kepler_gl)) +27. Creating a basemap gallery ([notebook](https://leafmap.org/notebooks/27_basemap_gallery)) ## Demo diff --git a/examples/README.md b/examples/README.md index a526091d92..f85c89bec4 100644 --- a/examples/README.md +++ b/examples/README.md @@ -39,6 +39,9 @@ 22. Using time slider for visualizing timeseries images ([notebook](https://leafmap.org/notebooks/22_time_slider)) 23. Creating colormaps with a single line of code ([notebook](https://leafmap.org/notebooks/23_colormaps)) 24. Creating heat map from csv ([notebook](https://leafmap.org/notebooks/24_heatmap)) +25. Creating a population heat map with a colorbar and map title ([notebook](https://leafmap.org/notebooks/25_map_title)) +26. Creating an interactive map using the kepler.gl plotting backend ([notebook](https://leafmap.org/notebooks/26_kepler_gl)) +27. Creating a basemap gallery ([notebook](https://leafmap.org/notebooks/27_basemap_gallery)) ## Demo diff --git a/examples/notebooks/27_basemap_gallery.ipynb b/examples/notebooks/27_basemap_gallery.ipynb new file mode 100644 index 0000000000..ed43f23779 --- /dev/null +++ b/examples/notebooks/27_basemap_gallery.ipynb @@ -0,0 +1,163 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/giswqs/leafmap/blob/master/examples/notebooks/27_basemap_gallery.ipynb)\n", + "[![image](https://binder.pangeo.io/badge_logo.svg)](https://gishub.org/leafmap-pangeo)\n", + "\n", + "Uncomment the following line to install [leafmap](https://leafmap.org) if needed." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# !pip install leafmap" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import leafmap.leafmap as leafmap" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you are using a recently implemented leafmap feature that has not yet been released to PyPI or conda-forge, you can uncomment the following line to install the development version from GitHub." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# leafmap.update_package()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Select 100 basemaps" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "layers = list(leafmap.leafmap_basemaps.keys())[17:117]\n", + "# layers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Print out the labels" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(layers[:10])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create linked maps of 100 basemaps" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": false + }, + "outputs": [], + "source": [ + "leafmap.linked_maps(rows=20, cols=5, height=\"200px\", layers=layers, labels=layers)" + ] + } + ], + "metadata": { + "hide_input": false, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.5" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": true, + "sideBar": true, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": true, + "toc_window_display": false + }, + "varInspector": { + "cols": { + "lenName": 16, + "lenType": 16, + "lenVar": 40 + }, + "kernels_config": { + "python": { + "delete_cmd_postfix": "", + "delete_cmd_prefix": "del ", + "library": "var_list.py", + "varRefreshCmd": "print(var_dic_list())" + }, + "r": { + "delete_cmd_postfix": ") ", + "delete_cmd_prefix": "rm(", + "library": "var_list.r", + "varRefreshCmd": "cat(var_dic_list()) " + } + }, + "types_to_exclude": [ + "module", + "function", + "builtin_function_or_method", + "instance", + "_Feature" + ], + "window_display": false + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/mkdocs.yml b/mkdocs.yml index df8734bdef..37ffd68c05 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -93,3 +93,4 @@ nav: - notebooks/24_heatmap.ipynb - notebooks/25_map_title.ipynb - notebooks/26_kepler_gl.ipynb + - notebooks/27_basemap_gallery.ipynb