flight_processing.DataConfig¶
-
class
flight_processing.
DataConfig
(dataset, minlon, maxlon, minlat, maxlat, detail=4, data_prefix=PosixPath('.'))¶ Load relevant information about a dataset, giving either custom parameters or the name of a known dataset.
Summary:
initialisation: __init__, known_dataset
properties: dataset, minlon, maxlon, minlat, maxlat, detail, dataset_location, bounds_opensky, bounds_plt
utility: data_flights, data_graph_yaml, data_graph_json, data_graph_npz
-
__init__
(dataset, minlon, maxlon, minlat, maxlat, detail=4, data_prefix=PosixPath('.'))¶ Initialise the object with custom parameters.
- Parameters
dataset (str) – dataset name
minlon (float) – longitude minimum bound
maxlon (float) – longitude maximum bound
minlat (float) – latitude minimum bound
maxlat (float) – latitude maximum bound
detail (int, optional) – map detail on plots
data_prefix (str, optional) – dataset folder location, overrides config
- Returns
object
- Return type
-
property
bounds_opensky
¶ Returns the bounding box of the dataset in the format expected by traffic.
- Return type
(float, float, float, float)
-
property
bounds_plt
¶ Returns the bounding box of the dataset in the format expected by pyplot.
- Return type
(float, float, float, float)
-
data_flights
(datetime)¶ Get the location of a flight dump for the given datetime.
- Parameters
datetime (datetime.datetime or str) – datetime to get
- Returns
location of file (may not exist)
- Return type
pathlib.Path
-
data_graph_json
(datetime)¶ Get the location of a JSON graph for the given datetime.
- Parameters
datetime (datetime.datetime or str) – datetime to get
- Returns
location of file (may not exist)
- Return type
pathlib.Path
-
data_graph_npz
(datetime)¶ Get the location of an NPZ graph for the given datetime.
- Parameters
datetime (datetime.datetime or str) – datetime to get
- Returns
location of file (may not exist)
- Return type
pathlib.Path
-
data_graph_yaml
(datetime)¶ Get the location of a YAML graph for the given datetime.
- Parameters
datetime (datetime.datetime or str) – datetime to get
- Returns
location of file (may not exist)
- Return type
pathlib.Path
-
property
dataset
¶ Returns the name of the dataset.
- Return type
str
-
property
dataset_location
¶ Returns the location of the saved geopandas GeoDataFrame.
- Return type
pathlib.Path
-
property
detail
¶ Returns the map detail.
- Return type
int
-
classmethod
known_dataset
(dataset, data_prefix=PosixPath('.'))¶ Initialise the object with known parameters.
- Parameters
dataset (str) – dataset name
data_prefix (str, optional) – dataset folder location, overrides config
- Returns
object
- Return type
-
property
maxlat
¶ Returns the latitude maximum bound.
- Return type
float
-
property
maxlon
¶ Returns the longitude maximum bound.
- Return type
float
-
property
minlat
¶ Returns the latitude minimum bound.
- Return type
float
-
property
minlon
¶ Returns the longitude minimum bound.
- Return type
float