1/26/2019

Background

This is an example of Shiny web app with associated supporting documentation, aiming to answer to the following question:

What is the best Canadian state to live, according to the desired salary?

User can Enter the desired salary, and after hitting Submit, the dashboard will show number of tax filers per each province which obtained the User inserted salary. In addition, user can see other important information: Income per Source, Income per Range, as well as three Key Performance Indicator (KPI), namely Top Income Range, Total Number of Tax Filers, top Predicted Income per source.

Both ui.R and server.R are available in the github repository: https://github.com/lilianabraescu/Developing-Data-Products-The-best-Canadian-state-to-live

Data

For this web app, data representing Individual statistics by tax filing method for all returns filed, economic characteristics, 2014 tax year, Canada Revenue Agency - recorded by the Open Data Government of Canada and released at 2018-06-27 (downloaded on January 25, 2019): https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1110004601 were sorted, cleaned and manipulated.

The finalized data file used for this app has 16,635 observations and 5 variables:

  • State has 12 categories: AB, BC, MB, NB, NL, NS, NT, ON, PE, QC, SK, YT.

  • Source.Income has 7 categories: Employment, Investment, Pension, Self-employment, Other sourses of income, Multiple sources of income, No income.

More about variables

  • Income.Range has 4 categories: Less than $25,000; Between $25,000 and $49,999; Between $50,000 and $99,999; $100,000 and Above.

  • Number.Tax.Filler for 2014 tax year.

  • Average.Income was used for building reactive output, in order to have a numeric value for income, which can be compared with salary inserted by the user.

income <- read.csv("Income_Canada_2014.csv")
str(income)
## 'data.frame':    16635 obs. of  5 variables:
##  $ State             : Factor w/ 12 levels "AB","BC","MB",..: 5 5 5 5 5 5 5 5 5 5 ...
##  $ Source.Income     : Factor w/ 7 levels "Employment","Investment",..: 1 1 1 1 1 1 1 1 2 2 ...
##  $ Income.Range      : Factor w/ 4 levels "$100,000 and Above",..: 4 4 2 2 3 3 1 1 4 4 ...
##  $ Number.Tax.Fillers: int  3310 410 2920 800 2760 990 880 0 60 100 ...
##  $ Average.Income    : int  20000 20000 37000 37000 75000 75000 130000 130000 20000 20000 ...

App Overview

Top 3 Canadian states with income average larger than $110,000