Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 713 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 713 Bytes

Download traffic data

from traffic.traffic import download_data, clean_data, create_index, calc_growth_perc

with open('../data/data.xlsx', 'wb') as output:
​    output.write(download_data())

Clean data

df = clean_data()
yearly = clean_data(subset='years')
monthly = clean_data(subset='months')

Recode data

# index
monthly['index_europe'] = create_index(monthly.flights_Europe)

# growth perc
monthly['p_growth_europe'] = [calc_growth_perc(monthly.flights_Europe, i) for i in range(len(monthly))]
yearly['p_growth_europe'] = [calc_growth_perc(yearly.flights_Europe, i, 1) for i in range(len(yearly))]

# work load units
yearly['wlu'] = calculate_wlu(yearly)