{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "a34636a0", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T12:14:23.775489Z", "iopub.status.busy": "2024-04-26T12:14:23.775489Z", "iopub.status.idle": "2024-04-26T12:14:24.866202Z", "shell.execute_reply": "2024-04-26T12:14:24.865423Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The geodata is provided by © OpenStreetMap contributors and is made available here under the Open Database License (ODbL).\n" ] } ], "source": [ "from lets_plot.geo_data import *\n", "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "85c7996e-d05b-47bb-a982-e48965e8f5d7", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T12:14:24.866202Z", "iopub.status.busy": "2024-04-26T12:14:24.866202Z", "iopub.status.idle": "2024-04-26T12:14:24.882465Z", "shell.execute_reply": "2024-04-26T12:14:24.881369Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "a9983319", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T12:14:24.882465Z", "iopub.status.busy": "2024-04-26T12:14:24.882465Z", "iopub.status.idle": "2024-04-26T12:14:25.875744Z", "shell.execute_reply": "2024-04-26T12:14:25.875744Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", " " ], "text/plain": [ "" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gdf = geocode_countries().get_boundaries(2)\n", "\n", "ggplot() + \\\n", " geom_map(data=gdf, color='white', fill='#0868ac', \\\n", " tooltips=layer_tooltips().line('@{found name}')) + \\\n", " ggsize(800, 600) + ggtitle('World') + \\\n", " theme_void()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.10.13" } }, "nbformat": 4, "nbformat_minor": 5 }