This analysis looks at the total amount of expenses paid to MPs in the UK and splits this amount by category. This is the first analysis I have done with this dataset. I probably should have done something simpler; looking at summary statistics and the like, but as I was playing around with the data this caught my eye and I ran with it.
As ever, if you have any comments, questions or suggestions, please do say!
These are the modules I'll import for this analysis.
urllib.request interacts with the parliamentary-standards website to download the data.
numpy allow for the manipulation of data, and
plotly is the library which I'll be using to visualise the data.
from urllib import request import pandas as pd from pandas import Series, DataFrame import numpy as np import plotly.offline as pyo from plotly.graph_objs import * import plotly.plotly as py from plotly import tools pyo.offline.init_notebook_mode() # run at the start of every ipython notebook