https://github.com/pythoninthegrass/airline_delays
Calculate the percentage of security-caused flight delays for the United States by calendar year (e.g., 2004).
https://github.com/pythoninthegrass/airline_delays
Last synced: about 1 year ago
JSON representation
Calculate the percentage of security-caused flight delays for the United States by calendar year (e.g., 2004).
- Host: GitHub
- URL: https://github.com/pythoninthegrass/airline_delays
- Owner: pythoninthegrass
- License: unlicense
- Created: 2023-06-22T01:49:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-16T15:45:20.000Z (over 2 years ago)
- Last Synced: 2025-01-11T16:50:29.788Z (over 1 year ago)
- Language: Python
- Size: 449 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# airline_delays
Calculate the percentage of security-caused flight delays for the United States by calendar year (e.g., 2004).
## Setup
### asdf
* Install [asdf](https://asdf-vm.com/guide/getting-started.html)
* Install python plugin for asdf
* `asdf plugin add python`
* Install poetry plugin for asdf
* `asdf plugin add poetry`
### poetry
* Install poetry
* `asdf install poetry 1.4.2`
### python
* Install python 3.11.4
* `asdf install python 3.11.4`
* Install virtual environment
```bash
# virtual environment in the project directory
poetry config virtualenvs.in-project true
# create virtual environment
poetry install
```
## Quickstart
```bash
# activate virtual environment
poetry shell
# run script
λ python main.py
airlines.json already exists
Available years:
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
Enter a year: 2004
Average percentage of delayed flights: 7.93%
Average minutes delayed: 42.59 minutes
# force quit script if necessary
ctrl-c # ^C
# deactivate virtual environment
deactivate
```
## Further Reading
[Airline Dataset](https://think.cs.vt.edu/corgis/datasets/json/airlines/airlines.json)