This project scrapes and analyzes TSA passenger volume data from 2019 to present.
- Scrapes TSA passenger volume data from TSA.gov
- Handles both historical and current year data
- Creates CSV files for each year
- Generates visualizations of the data
- Python 3.8+
- Required packages listed in
requirements.txt
pip install -r requirements.txt- Scrape TSA data:
python tsa_scraper.pyThis will create CSV files for each year (e.g., tsa_passengers_2024.csv)
- Generate visualizations:
python tsa_visualizer.pyThis will create three visualization files:
tsa_daily_trends.png: Daily passenger volume trendstsa_monthly_averages.png: Monthly average passenger volumestsa_weekly_patterns.png: Weekly patterns of passenger volume
Each CSV file contains:
Date: The date of the passenger countPassengers: Number of passengers screened by TSA
- The scraper automatically handles the current year's data differently
- Visualizations are saved as PNG files in the current directory
- The script updates existing CSV files with new data when run multiple times