autobahn package

Submodules

autobahn.autobahn module

class autobahn.autobahn.TrafficWarning(data)[source]

Bases: object

A class to represent a traffic warning.

isBlocked

Indicates if the road is blocked.

Type:

bool

display_type

The type of display for the warning.

Type:

str

subtitle

The subtitle of the warning.

Type:

str

title

The title of the warning.

Type:

str

startTimestamp

The start timestamp of the warning.

Type:

str

delayTimeValue

The delay time value in minutes.

Type:

int

abnormalTrafficType

The type of abnormal traffic.

Type:

str

averageSpeed

The average speed of traffic.

Type:

float

description

The description of the warning.

Type:

str

routeRecommendation

The recommended route.

Type:

str

lorryParkingFeatureIcons

Icons for lorry parking features.

Type:

list

geometry

The geometry of the warning.

Type:

dict

geo_df

A DataFrame containing the geographical coordinates.

Type:

pandas.DataFrame

create_geo_dataframe(coordinates):

Creates a DataFrame from geographical coordinates.

create_geo_dataframe(coordinates)[source]

Create a DataFrame from geographical coordinates.

Parameters:

coordinates (list) – A list of geographical coordinates.

Returns:

A DataFrame containing the geographical coordinates.

Return type:

pandas.DataFrame

autobahn.autobahn.calculate_traffic_length(coordinates)[source]
autobahn.autobahn.get_warnings(autobahn_id)[source]

Get traffic warnings for a specific autobahn.

Parameters:

autobahn_id (str) – The ID of the autobahn.

Returns:

A list of warnings.

Return type:

list

autobahn.autobahn.map_plot(plotlist, on='aveg_speed')[source]

Plot a map with traffic data.

Parameters:
  • plotlist (list) – A list of DataFrames containing traffic data.

  • on (str, optional) – The column to base the color mapping on (default is “aveg_speed”).

Returns:

A Folium map with the plotted traffic data.

Return type:

folium.Map

autobahn.car_model module

class autobahn.car_model.Car(start_location)[source]

Bases: object

drive_to(destination)[source]

Module contents