January 2018
Beginner to intermediate
548 pages
12h 11m
English
In this recipe, we load and visualize a dataset containing many flight routes and airports around the world (obtained from the OpenFlights website at https://openflights.org/data.html).
To draw the graph on a map, you need Cartopy, available at http://scitools.org.uk/cartopy/. You can install it with conda install -c conda-forge cartopy.
>>> import math
import json
import numpy as np
import pandas as pd
import networkx as nx
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
from IPython.display import Image
%matplotlib inline>>> names = ('airline,airline_id,' 'source,source_id,' 'dest,dest_id,' ...Read now
Unlock full access