Plotting¶
Trajectory data that are stored in a DataFrame returned by paraatm.io.iff.read_iff_file()
or paraatm.io.nats.read_nats_output_file()
can be plotted directly. Plotting is handled using the Bokeh library, which renders interactive plots in HTML.
-
paraatm.plotting.
plot_trajectory
(df, output_file=None, output_notebook=False, plot_width=1200, plot_height=600, tooltips=False, tile_provider='STAMEN_TERRAIN')¶ Plot scenario trajectory to static html and open browser
Parameters: - df (DataFrame) – DataFrame containing a scenario with ‘latitude’, ‘longitude’, ‘heading’, and ‘callsign’ columns
- output_file (str) – Output file for html (if None, use bokeh default)
- output_notebook (bool) – If True, output to jupyter notebook
- plot_width (int) – Plot width in screen units
- plot_height (int) – Plot height in screen units
- tooltips (bool) – Whether to include tooltips that display information when hovering over the data points
- tile_providers (str or Vendors enum) – The bokeh “tile provider” used to draw the map background.
May be either a string or an instance of the
bokeh.tile_providers.Vendors enum. See also
get_tile_providers()
.
The following is an example trajectory plot of the data in sample_data/IFF_SFO_ASDEX_ABC123.csv created using plot_trajectory()
:
from paraatm.plotting import plot_trajectory
from paraatm.io.iff import read_iff_file
df = read_iff_file('../paraatm/sample_data/IFF_SFO_ASDEX_ABC123.csv')
plot_trajectory(df, plot_width=700, plot_height=600)
-
paraatm.plotting.
get_tile_providers
()¶ Retrieve list of “tile providers” for use in trajectory plots
Returns: Return type: Enumeration