/python-challenge

I analyzed financial data in `budget_data.csv` to compute metrics and identified profit trends in PyBank, while in PyPoll, I modernized vote counting by calculating election metrics and determining the winner based on `election_data.csv`.

Primary LanguagePython

python-challenge

PyBank Financial Analysis

## Overview
This project analyzes financial records from a dataset (`budget_data.csv`) using Python. 
It calculates various financial metrics including total number of months, net profit/loss, average change in profit/loss, and identifies the greatest increase and decrease in profits over the entire period.

## Dataset
The dataset (`budget_data.csv`) consists of two columns:
- **Date**: Date of the financial record.
- **Profit/Losses**: Financial profit or loss for the corresponding month.

## Requirements
- Python (version 3. recommended)
- CSV module (standard library in Python)

## Installation
1. Clone the repository:
```bash
git clone <https://github.com/kittychew/python-challenge>
cd /Users/katchu/Desktop/Data Analysis Bootcamp/python-challenge/PyBank/main.py
2. Install necessary dependencies

## Usage
1. Ensure Python and necessary modules are installed.
2. Run the Python script main.py to perform financial analysis on budget_data.csv.

## Files
    •	main.py: Python script for financial analysis.
    •	budget_data.csv: Dataset containing financial records.

## Output
Upon running main.py, the script will print the following financial metrics to the console:

    •	Total Number of Months
    •	Net Profit and Losses
    •	Average Change in Profit/Loss
    •	Greatest Increase in Profits (Date and Amount)
    •	Greatest Decrease in Profits (Date and Amount)

PyPoll:Vote Counting

## Overview
This project aims to modernize the vote-counting process for a small, rural town using Python. 
We analyze election data provided in a CSV file (election_data.csv) to calculate and display the following election metrics:

•	The total number of votes cast
•	A complete list of candidates who received votes
•	The percentage of votes each candidate won
•	The total number of votes each candidate won
•	The winner of the election based on popular vote

## Dataset
The dataset (election_data.csv) consists of three columns:

•	Voter ID: Unique identifier for each voter.
•	County: County where the vote was cast.
•	Candidate: Name of the candidate voted for by the voter.

## Requirements
- Python (version 3. recommended)
- CSV module (standard library in Python)

## Installation
1. Clone the repository:
```bash
git clone <https://github.com/kittychew/python-challenge>
cd /Users/katchu/Desktop/Data Analysis Bootcamp/python-challenge/PyPoll/main.py
2. Install necessary dependencies

## Usage
1.	Ensure Python and necessary modules are installed.
2.	Run the Python script main.py to perform election analysis on election_data.csv.

## Files
    •	main.py: Python script for election analysis.
    •	election_data.csv: Dataset containing election records.

## Output
Upon running main.py, the script will print the following election results to the console:
    •	Total Votes: Total number of votes cast
    •	List of Candidates: Each candidate who received votes, with their percentage of the total vote and total number of votes received
    •	Winner: Name of the candidate who won the election based on popular vote

## Resources
    •	ChatGPT: Consulted ChatGPT for assistance during the completion of both the PyBank and PyPoll projects.