Note that this analysis is basically the same for every class of my personal outgoing expenses. Thus, I will comment only the first class, i.e. supermarket expenses.
Bank Statement Analysis in Mathematica
Bank Statement Analysis in Mathematica
In this file, I am going to investigate my own outgoing expenses from my online banking. First, I will import the first six months of 2017 as a comma-separated values (CSV) file. Second, I will use some Mathematica built-in functions in order to classify my personal outgoing expenses. Such a classification will allow me to obtain the trend of each class.
June 23, 2017—Federico Dradi
Importing the CSV File and Visualization of My Dataset
Importing the CSV File and Visualization of My Dataset
Import the CSV file.
fileImp=Import["f5.csv"];
Dimension of data frame.
Dimensions[fileImp]
{193,4}
Data frame visualization.
Dataset[fileImp]
Dimensions[Dataset[fileImp]]
{193,4}
Transform the data frame into a list of associations, and pad the associations with zeros where we have no values.
named=Map[AssociationThread[First[fileImp]PadRight[#,4]]&,Rest[fileImp]];
Selecting Specific Columns and Changing the Date Format
Selecting Specific Columns and Changing the Date Format
List of Months
List of Months
Supermarket Expenses
Supermarket Expenses
Withdrawal Expenses
Withdrawal Expenses
Travel Ticket Expenses
Travel Ticket Expenses
Rent Expenses
Rent Expenses
Visa Card Expenses
Visa Card Expenses
All Together
All Together
FURTHER EXPLORATIONS
A further exploration would be cleaning this code and using many more built-in functions in order to make it more efficient and beautiful.
AUTHORSHIP INFORMATION
Federico Dradi
6/23/17
6/23/17