Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gowhale/daily-spend-analysis
Python script to analyse spending habits.
https://github.com/gowhale/daily-spend-analysis
data-visualization pandas python
Last synced: about 10 hours ago
JSON representation
Python script to analyse spending habits.
- Host: GitHub
- URL: https://github.com/gowhale/daily-spend-analysis
- Owner: gowhale
- Created: 2021-07-02T08:44:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-02T10:39:05.000Z (over 3 years ago)
- Last Synced: 2024-04-17T17:12:03.468Z (7 months ago)
- Topics: data-visualization, pandas, python
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# daily-spend-analysis
The aim of this script is to process a CSV of transactions, and output a graph and a value for the CSV's daily spending average.
## Source Data
This script takes in a CSV called "data.csv" and it has the following headings:
Transaction ID,Date,Time,Type,Name,Emoji,Category,Amount,Currency,Local amount,Local currency,Notes and #tags,Address,Receipt,Description,Category split,Money Out,Money In
## ProcessThe following steps are taken to process the data:
1. Date variables are entered to specify wanted date range
2. CSV is loaded into dataframe
3. dataframe is trimmed to be between wanted dates
4. unwanted transactions taken from "unwanted_transactions.txt" are removed from the dataframe
5. A daily expenses is created and saved to .csv
6. Daily expenses dataframe is visualised on a graph
7. Avarage daily spend is printed to terminal## Example Graph Output
This script generates an interactive graph which looks like this:
## Example Terminal Output
The average daily spend between 25/06/2021 and 01/07/2021 is £23.09
## RequirementsThis script was last executed using Pyhton 3.8.5 and requires pandas and plotly modules. Use the following command to install needed modules:
pip3 install -r requirements.txt