A Python program that processes gas price data from 1993 to 2013 to perform various analyses, including calculating average prices, finding highest and lowest prices, and sorting prices. The program reads data from a text file (GasPrices.txt) and generates results and sorted files for further analysis.
- Yearly Average Price: Calculates and displays the average gas price for each year from 1993 to 2013.
- Monthly Average Price: Calculates and displays the average gas price for each month over the entire dataset.
- Highest and Lowest Prices Per Year: Identifies and displays the highest and lowest gas prices for each year.
- Sorted Price Files:
- Generates a file (
lowToHigh.txt) with prices sorted from lowest to highest. - Generates a file (
HighToLow.txt) with prices sorted from highest to lowest.
- Generates a file (
- Python: Used to process and analyze gas price data.
- File Handling: Reads gas price data from a file and writes results to new files.
- Data Analysis: Implements functions to compute averages, sort data, and extract insights.
- Open the Python Source file (
gas_prices.py) in Visual Studio Code. - Run the project.
This project was developed for my python programming class.