Mathieu C.
2020-01-24
Welcome to this short presentation about the shiny webapp available at the following address.
The idea of the webapp is to let the user (that's you!) select which informations he/she wants displayed on the right in an interactive and easy way.
The data comes from the swiss Federal Office of statistics.
The database used relates information about swiss taxpayers.
The original dataframe can be found at this address.
NB: The format is a .px file that required the use of the pxR package.
The variables were translated in english and are :
year -> the year that value is fromemployement status -> the employement status of the group observedcivil status -> the civil status of the group observedcanton -> the canton (state) in which the observation was made (there's 26 of them)observation unit -> the unit of the value and the nature of the observationvalue -> the actual value of the observation (unit depends on the previous variable)Except from that, the variables were left as is.
Here are some sample rows from the database.
year employment.status civil.status
9662 2004 pensioners single with child
11899 2015 independent workers other status
12179 2015 independent workers single with child
14050 2010 inactives single with child
14574 2016 employees other status
15244 2014 employees other status
canton observation.unit value
9662 Obwalden taxable income in 1000CHF 2065.6
11899 Aargau taxable income in 1000CHF 418990.7
12179 Ticino taxable income in 1000CHF 67897.9
14050 Obwalden total tax in CHF 66542.0
14574 Zug total tax in CHF 88895565.0
15244 Basel-Landschaft total tax in CHF 51354018.0
Of course, one could plot a subset of the dataframe like below :
However, this method has several disadvantages :
My attempt was to make the database as easy to manipulate as possible.
When on the app page, you just have to select the options in the left panel and the main panel on the right will display the graph you required. You can then use the graph options from plotly to further zoom/investigate the data. They are on the graph itself, in the upper-right corner.
I hope you enjoy it!