Source: google
The Quantified Self is a thrilling prospect that allows Self improvement by collecting and monitoring the data. I chose to collect and monitor my finances by utilizing the Discover credit card spend analyzer data which is available on the website that includes the spending summary for the past 6 months( March to Present).
This has allowed me to get an understanding of what areas I have been spending the most & helps to keep track and manage the expenses. Based on this data, I consider the following questions: 1) Which category has maximum spending ? 2) During past 6 months,which month have I spent the most ? 3)For Merchandise , what is the spending by month in 2017 ? 4)For Services , what is the spending by month ? 5)For SuperMarkets , what is the spending by month ?
It is important to know where you use your credit card the most i.e. the category of purchase. I used a donut chart to understand the maximum spending category, because of its ease of understanding. Maximum expenses were seen to be coming from the Merchandise which is around 29.5%, and other major expenses are from Services (25.4%) and Supermarkets (15.6%).
It is always interesting to note which month of the year you spent the most. I used a simple Bar chart to get an understanding this. Maximum payments were done in the Month of May this year which is more than $750.
The bar plot explains the expense by month for the Merchandise Category. The maximum spending for Merchandise is in the Months May, March , and July.
The second most spending categories is Services. From the plot it is seen that maximum money was spent on Services during the month of April. I used my credit card for Services like Internet payment, Entry fees, Parking fees etc.There is both an increase and decrease in the payments, maximum being in the month of April.
Besides Merchandise and Services, one of the other major spending category is Supermarkets. I tried to dig deeper and identify the trend of the months in which I spent the most for Groceries. I believe I used my Discover credit card for most of the expenses in the month of May.
---
title: "ANLY 512 PROJECT"
author: "Sowmya Puranam "
output:
flexdashboard::flex_dashboard:
storyboard: true
social: menu
source: embed
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(flexdashboard)
library(knitr)
library(ggplot2)
library(rnoaa)
library(tidyverse)
library(maps)
library(scatterpie)
library(ggiraph)
library(plotly)
library(gdtools)
library(readxl)
library(dplyr)
library(xts)
library(zoo)
setwd("C:\\Users\\sowmy\\Desktop\\HU\\ANLY512\\Project")
```
###Overview

****
The Quantified Self is a thrilling prospect that allows Self improvement by collecting and monitoring the data. I chose to collect and monitor my finances by utilizing the Discover credit card spend analyzer data which is available on the website that includes the spending summary for the past 6 months( March to Present).
This has allowed me to get an understanding of what areas I have been spending the most & helps to keep track and manage the expenses.
Based on this data, I consider the following questions:
1) Which category has maximum spending ?
2) During past 6 months,which month have I spent the most ?
3)For Merchandise , what is the spending by month in 2017 ?
4)For Services , what is the spending by month ?
5)For SuperMarkets , what is the spending by month ?
```{r,echo = FALSE, message = FALSE}
discoverdata = read.csv("C:\\Users\\sowmy\\Desktop\\HU\\ANLY512\\Project\\spendanalyzer1.csv")
```
### Which category has maximum spending ?
```{r}
q <- discoverdata%>%
plot_ly(labels = ~Category, values = ~Amount) %>% add_pie(hole = 0.6)%>%
layout(title = "Spending categories ", showlegend = T,
xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
q
```
***
It is important to know where you use your credit card the most i.e. the category of purchase. I used a donut chart to understand the maximum spending category, because of its ease of understanding. Maximum expenses were seen to be coming from the Merchandise which is around 29.5%, and other major expenses are from Services (25.4%) and Supermarkets (15.6%).
### Q.2 Which month has maximum spending ?
```{r}
library(ggplot2)
new_date<- as.Date(discoverdata$Trans..Date, "%m/%d/%Y")
Month<- strftime(new_date, "%m")
plot2<- ggplot(discoverdata, aes(x = Month, y=Amount)) +
geom_bar(stat = "identity", fill = "Green")+
labs(title = "Spending per Month", x = "Month", y = "Amount") +
theme_minimal()
plot2
```
***
It is always interesting to note which month of the year you spent the most. I used a simple Bar chart to get an understanding this. Maximum payments were done in the Month of May this year which is more than $750.
### Merchandise category spending by month
```{r}
Merchandisedata<- subset(discoverdata, Category=='Merchandise')
new_date<- as.Date(Merchandisedata$Trans..Date, "%m/%d/%Y")
Month<- strftime(new_date, "%m")
p<- ggplot(Merchandisedata, aes(x = Month, y=Amount)) +
geom_bar(stat = "identity", fill = "Blue") +
labs(title = "Spending on Merchandise per Month", x = "Month", y = "Amount") +coord_flip()+
theme_minimal()
p
```
***
The bar plot explains the expense by month for the Merchandise Category. The maximum spending for Merchandise is in the Months May, March , and July.
### Services the spending by month ?
```{r}
Servicesdata<- subset(discoverdata, Category=='Services')
new_date<- as.Date(Servicesdata$Trans..Date, "%m/%d/%Y")
Month<- strftime(new_date, "%m")
p<- ggplot(Servicesdata, aes(x = Month, y=Amount)) +
geom_bar(stat = "identity", fill = "Orange") +
labs(title = "Spending on Services per Month", x = "Month", y = "Amount") +
theme_minimal()
p
```
***
The second most spending categories is Services. From the plot it is seen that maximum money was spent on Services during the month of April. I used my credit card for Services like Internet payment, Entry fees, Parking fees etc.There is both an increase and decrease in the payments, maximum being in the month of April.
### Q.5 SuperMarkets category spending by month ?
```{r}
Supermarketsdata<- subset(discoverdata, Category=='Supermarkets')
new_date<- as.Date(Supermarketsdata$Trans..Date, "%m/%d/%Y")
Month<- strftime(new_date, "%m")
p<- ggplot(Supermarketsdata, aes(x = Month, y=Amount)) +
geom_bar(stat = "identity", fill = "Purple") +
labs(title = "Spending on Grocery per Month", x = "Month", y = "Amount") +
theme_minimal()
p
```
***
Besides Merchandise and Services, one of the other major spending category is Supermarkets. I tried to dig deeper and identify the trend of the months in which I spent the most for Groceries. I believe I used my Discover credit card for most of the expenses in the month of May.