@@ -19,7 +19,7 @@ This function queries a database for air traffic information, such as the number
This example queries air traffic data for specified European regions and returns the results in a DataFrame.
"""
function eu_air(conn::MySQL.Connection,selection::Dict)
function eu_air(conn_dict::Dict,selection::Dict)
# getting valuable info from dictionary: acceptable years are 1961, 71, 81, 91, 2001, 2011
geo_id=selection["geo_id"]
shape_obj=selection["shape_obj"]
...
...
@@ -29,8 +29,12 @@ function eu_air(conn::MySQL.Connection, selection::Dict)
for(id,shape)inzip(geo_id,shape_obj)
# prepare query
query="SELECT COUNT(DISTINCT(ea.airp_icao_)) as airports, SUM(et.flights) as flights FROM eu_airports_2013 ea JOIN eu_traffic et ON ea.airp_icao_ = et.ICAO_id WHERE ST_Intersects(ST_GeomFromText('"*shape*"'), ea.SHAPE) AND et.Year = 2022;"
function get_selected_objects_from_table(table::String,df::DataFrame,table_dict::Dict,database::String,selection::Dict;host::String="127.0.0.1",port::Int=3306)
function get_selected_objects_from_table(table::String,df::DataFrame,table_dict::Dict,selection::Dict,conn_dict::Dict)