Good news for the aerospace industry because the number of passengers passing through TSA checkpoints this year is the same as in 2019 (before COVID-19).
import pandas as pd import numpy as np import math import matplotlib.pyplot as plt from plotnine import ggplot, geom_point, aes, stat_smooth, facet_wrap,geom_smooth,labs, scale_x_continuous,geom_line from plotnine import * import matplotlib print(matplotlib.__version__) df=pd.read_csv("data_tsa2.txt", delimiter=r"\s+") a2019=( ggplot(df) + geom_line(aes(x = 'Date', y = 'c2019',colour ='"blue"'),size=0.1) + geom_point(aes(x = 'Date', y = 'c2019',color='"blue"'),size=0.2) + geom_smooth(aes(x = 'Date', y = 'c2019',color='"blue"'),span=.3,size=1.0) + geom_line(aes(x = 'Date', y = 'c2020',colour = '"black"'),size=0.1) + geom_point(aes(x = 'Date', y = 'c2020',color='"black"'),size=0.2) + geom_smooth(aes(x = 'Date', y = 'c2020',color='"black"'),span=.1,size=1.0) + geom_line(aes(x = 'Date', y = 'c2021',colour = '"green"'),size=0.1) + geom_point(aes(x = 'Date', y = 'c2021',color='"green"'),size=0.2) + geom_smooth(aes(x = 'Date', y = 'c2021',color='"green"'),span=.3,size=1.0) + geom_line(aes(x = 'Date', y = 'c2022',colour = '"orange"'),size=0.1) + geom_point(aes(x = 'Date', y = 'c2022',color='"orange"'),size=0.2) + geom_smooth(aes(x = 'Date', y = 'c2022',color='"orange"'),span=.3,size=1.0) + geom_line(aes(x = 'Date', y = 'c2023',colour = '"red"'),size=0.1) + geom_point(aes(x = 'Date', y = 'c2023',color='"red"'),size=0.2) + geom_smooth(aes(x = 'Date', y = 'c2023',color='"red"'),span=.3,size=1.0) + scale_x_continuous(breaks=range(0,365,14)) + theme(text=element_text(family="Tahoma", size=10)) + scale_colour_manual(name = "Years", values = ["blue","black", "green","orange","red"], labels = ['2019','2020','2021','2022','2023']) + labs(title='Number of passengers at USA Airport TSA checkpoints', x='Day #', y='Number of Passengers') ) p1=print(a2019) plt.savefig('ex372.png', dpi=300) plt.show()
Recent Comments