{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "lat = [48.979166, 48.936053, 29.875645, 35.309947]\n", "lon = [-102.492420, -80.237456, -114.032789, -123.242456]\n", "values = [700, 800, 1500, 200, 500]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "data = dict(y_start=lat[0:2], x_start=lon[0:2], y_end=lat[2:4], x_end=lon[2:4])\n", "path = pd.DataFrame({'x': lon, 'y': lat})" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "p = ggplot() + geom_livemap()\n", "p += geom_path(data=path, mapping=aes(x='x', y='y', color = 'x'), size=3, linetype=4)\n", "p" ] } ], "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.7.10" } }, "nbformat": 4, "nbformat_minor": 1 }