{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.3.0+162.g0540622.dirty\n" ] } ], "source": [ "import os\n", "import folium\n", "\n", "print(folium.__version__)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import pandas as pd\n", "\n", "\n", "df = pd.DataFrame.from_csv(\n", " os.path.join('data', 'highlight_flight_trajectories.csv')\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us take a glance at the data.\n", "Each row represents the trajectory of a flight,\n", "and the last column contains the coordinates of the flight path in `GeoJSON` format." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | dep | \n", "dest | \n", "geojson | \n", "
---|---|---|---|
0 | \n", "Place_MontpellierMediterranee_Airport | \n", "Place_BastiaPoretta_Airport | \n", "{\"type\": \"LineString\", \"coordinates\": [[3.9613... | \n", "
1 | \n", "Place_Bristol___Lulsgate | \n", "Place_TenerifeSur_ReinaSofia_Airport | \n", "{\"type\": \"LineString\", \"coordinates\": [[-2.719... | \n", "
2 | \n", "Place_Valencia_Manises_Airport | \n", "Place_Bucuresti_HenriCoanda_Airport | \n", "{\"type\": \"LineString\", \"coordinates\": [[-0.481... | \n", "