{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import panel as pn\n", "import holoviews as hv\n", "\n", "from earthsim.xmsmesh import GenerateMesh, ViewMesh\n", "\n", "hv.extension('bokeh')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "sample_poly1=dict(\n", " Longitude = [-10114986, -10123906, -10130333, -10121522, -10129889, -10122959],\n", " Latitude = [ 3806790, 3812413, 3807530, 3805407, 3798394, 3796693])\n", "sample_poly2=dict(\n", " Longitude = [-10095762, -10101582, -10104906],\n", " Latitude = [ 3804189, 3817180, 3799659])\n", "sample_points = pd.DataFrame({\n", " 'Longitude': [-10100750],\n", " 'Latitude': [ 3807009.333],\n", " 'Size': [ 100]})" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# construct the stages of the pipeline\n", "stages = [\n", " ('Generate Mesh', GenerateMesh(polys=[sample_poly1, sample_poly2], points=sample_points)),\n", " ('View Mesh', ViewMesh)\n", "]\n", "\n", "# construct the pipeline\n", "pipeline = pn.pipeline.Pipeline(stages)\n", "\n", "pipeline.layout # display in the cell below\n", "# pipeline.layout.show() # launch in separate browser window" ] } ], "metadata": { "language_info": { "name": "python", "pygments_lexer": "ipython3" } }, "nbformat": 4, "nbformat_minor": 2 }