Aim is to propose a simple algorithm that read, parse, store, process and display financial data for individuals πΈ.
Project pitched and started the 11th december 2020
- First expected release the friday 15th december 2020
- Second expected release the 10th january 2021
-
π₯οΈ Set your Virtual Environment:
# Download venv librairy apt-get install python3-venv -y # Create your venv python3 -m venv venv # Activate your venv . venv/bin/activate
For more information, go to Python Virtual Environment Official Documentation.
-
π¦ Install the project dependencies:
apt install python3-pip pip install PTable pip install Flask pip install PyPDF2
-
Database configuration:
mkdir -p back/database/ && touch back/database/accounting.db mkdir -p data/sg/ # create the input directory for file integration
-
To start the backend server, simply run bellow commands:
export FLASK_APP=controller.py export FLASK_ENV=development flask run # * Running on http://127.0.0.1:5000/
-
Database
- Create schema
- Try to use some DB framework
- Fix the duplicate issue
-
Payments
- Create account
- Fake few payments
- Compute few metrics
-
REST API
-
Expose data
- Flask
- GraphQL ~> not very effective
-
Design API (Postman ~> not effective)
-
Insert payments ?
-
Expose metrics
-
-
Integration
- CSV from Societe Generale
- Get all files in directory
- read each file, one after the other
- Parser rows and map to RawPayments
- Save in database
- Generic object's management in database
- If file is duplicate => skip
- View all payments and duplications between files (count same lines in file and across files)
- CSV from N26
- 4% of the database (72/1685 payments) is corrupted by duplicated values from different files
- CSV from Societe Generale
-
Statistics
- Low level stats
- Total credit/debit for quantity and amount
- Min, Max, Avg, opening, closing
- Handle consumption periods (~daily, weekly, monthly)
- Add periodicity: Trimester, Semester
- Metrics column info
- Add header info line for metrics column
- Add footer avg line for metrics column
- Identify FIXED income and expenses (try to rely on LABELS)
- Define profile
- string similarity calculation to identify recurrent transactions
- Low level stats
-
Filter v2
- Allow labeling (Add, remove, reset)
- Auto labeling on token
- Available labels: transport, rent, salary, phone, AMZ, SG, Healthcare...
- Filter payments on account & list of labels
- Ensure payments uniqueness
- Group some labels together (expose groups to client ?)
- Filter payments on account & group
- Percentage of payments (qty & amount) labeled (or group) for a given period
- Pie chart for example
Filter v1 (Click to expand)
- Labels
-
Tag all payments
-
Define groups based on tags
-
Create groups that matches perfectly one tag, multiple tags or other groups
-
Apply metrics on groups
-
Allow enforced new tag for payment id
-
Count payments in groups
-
Count payments untagged
-
Identify overlapping tags
-
Auto labeling on rules
-
Endpoint for labeling
-
Create categories and pattern that fall in this category
- Courses
- Amazon
-
Can 2 categories share same payments ?
- Need exclusive categories for global expenses pie-chart
- and non-exclusive
-
-
Integrate PDFs
- Download all PDFs available from banking platforms
- Read Parse (PyPDF2, tabula)
- Extract data ~> not very effective
- Store raw payments
-
Architecture
- Design first diagram of internal services
- Try coding schema
- Add the schema to README
- Define API specification using Swagger
- Design first diagram of internal services
-
Front
- Consumption map on a calendar just like github contribution calendar
- Display payments curve