{ "cells": [ { "cell_type": "markdown", "id": "2ac0e74d", "metadata": {}, "source": [ "# Using Exotic Map Projections: `use_crs=\"provided\"`\n", "\n", "Value \"provided\" tells Lets-Plot that the input GeoDataframe already contains coordinates in the desired CRS and should not be reprojected any further.\n", "\n", "This is a workaround for the case when the desired CRS is not naturally supported by Lets-Plot.\n", "\n", "For example, if you try to use the **Robinson** projection (EPSG:54030): `use_crs=\"EPSG:54030\"`, then Lets-Plot will return an error: \n", "> CRSError: Invalid projection: EPSG:54030: (Internal Proj Error: proj_create: crs not found)\n", "\n", "Let's see how can we still plot a map in the **Robinsons** projection in Lets-Plot." ] }, { "cell_type": "code", "execution_count": 1, "id": "8ab5b1ed", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T12:01:13.376836Z", "iopub.status.busy": "2024-04-26T12:01:13.376836Z", "iopub.status.idle": "2024-04-26T12:01:14.451546Z", "shell.execute_reply": "2024-04-26T12:01:14.451546Z" } }, "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 import *\n", "from lets_plot.geo_data import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "b0b9825c", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T12:01:14.451546Z", "iopub.status.busy": "2024-04-26T12:01:14.451546Z", "iopub.status.idle": "2024-04-26T12:01:14.467233Z", "shell.execute_reply": "2024-04-26T12:01:14.467233Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "markdown", "id": "5067a158", "metadata": {}, "source": [ "#### 1. Default Presentation" ] }, { "cell_type": "code", "execution_count": 3, "id": "206a0bb9", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T12:01:14.467233Z", "iopub.status.busy": "2024-04-26T12:01:14.467233Z", "iopub.status.idle": "2024-04-26T12:01:15.904597Z", "shell.execute_reply": "2024-04-26T12:01:15.904597Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "