https://github.com/melogabriel/nubank-expenses-analysis
This project consolidates monthly credit card statement data from Nubank into a single CSV file using Python, enabling data visualization through a Google Sheets dashboard in Looker Studio.
https://github.com/melogabriel/nubank-expenses-analysis
data-analysis data-visualization googlesheets lookerstudio pandas python
Last synced: 7 months ago
JSON representation
This project consolidates monthly credit card statement data from Nubank into a single CSV file using Python, enabling data visualization through a Google Sheets dashboard in Looker Studio.
- Host: GitHub
- URL: https://github.com/melogabriel/nubank-expenses-analysis
- Owner: melogabriel
- License: mit
- Created: 2025-01-21T22:36:47.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-03-01T14:05:08.000Z (8 months ago)
- Last Synced: 2025-03-01T15:19:50.539Z (8 months ago)
- Topics: data-analysis, data-visualization, googlesheets, lookerstudio, pandas, python
- Language: Python
- Homepage:
- Size: 5.3 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nubank Expense Dashboard Project
This project consolidates monthly credit card statement data from Nubank into a single CSV file using Python, enabling data visualization through a Google Sheets dashboard in Looker Studio.
## Features
- Combine multiple `.csv` files containing Nubank credit card statements.
- Export a consolidated dataset for analysis.
- Use the dataset in Google Sheets to create a dashboard in Looker Studio.## Project Workflow
1. **Data Collection**: Download monthly credit card statements from Nubank as `.csv` files.
2. **Data Consolidation**: Use a Python script to merge all `.csv` files into a single dataset.
3. **Data Visualization**: Import the consolidated CSV file into Google Sheets, and create a Looker Studio dashboard for visual insights.## Prerequisites
- Python 3.x
- Pandas library (`pip install pandas`)## Project Files
- `faturas_nubank_merge.py`: Python script to combine `.csv` files.
- `faturas_nubank.csv`: The consolidated dataset (generated after running the script).
- **Looker Studio Dashboard**: A visual representation of the data.## Script Overview
The Python script reads all `.csv` files in a specified directory and combines them into a single file:
```python
import os
import glob
import pandas as pd# Set the working directory
os.chdir("/path/to/your/folder")# Get all CSV files in the directory
extension = 'csv'
all_filenames = [i for i in glob.glob('*.{}'.format(extension))]# Combine all files in the list
combined_csv = pd.concat([pd.read_csv(f) for f in all_filenames])# Export the combined dataset
combined_csv.to_csv("faturas_nubank.csv", index=False, encoding='utf-8-sig')```
## How to Use the Script
1.Place all the .csv files in a single folder.
2. Update the os.chdir path in the script to point to your folder.
3. Run the script to generate faturas_nubank.csv.## Importing into Google Sheets
1. Upload the faturas_nubank.csv file to Google Sheets.
2. Format the data as needed for visualization.## Looker Studio Integration
1. Link the Google Sheet to Looker Studio.
2. Create charts and metrics to visualize your credit card expenses.Looker Studio Dashboard Example:
## Future Enhancements
- Automate the download of Nubank statements using the API (API is no longer supported see this issue in [pynubank](https://github.com/andreroggeri/pynubank/issues/419)).
- Add more data cleaning or transformation steps in the script.
- Automate the data collection process via e-mail (under development)
- Automate the data collection process using OpenAi agents (under development)## License
This project is licensed under the MIT License.