In this assignment you will perform some data analysis on the budget history of the city of Providence,
RI, from the last several years. The data are provided as a .csv file, that is available on Canvas, or from the
original source at data.gov1
You may use any Python tools you would like to solve this assignment.
The data set includes budget information (both planned and actual) for the years 2012–2021, broken
down into several categories. To answer the questions below you will need to sort and filter the data by
category and/or time period, using tools such as those demonstrated in class.
a. A single .py file containing all the code you used for the assignment (and nothing else please!). Please
comments your code to indicate what each section is for, and in particular where the solution to each
of the questions listed below begins.
b. A screenshot of the output of your code in a python terminal.
c. Graphics files of any plots (.png, .jpg, etc.).
Please answer the following questions, making sure to explain how you arrived at your answers:
1. What are the main expense types in the data set, and what is the total amount of spending for each
of the main expense types over the entire period of the record?
Please break this down by the categories listed in the ’Expense Type’ column, and look at the actual
(not recommended or approved) amounts.
2. Which departments are the two highest in terms of total spending on salaries?
3. What fraction of total spending on salaries by the city is represented by each of the two top depart-
4. For each individual year, what are the mean recommended, approved, and actual total amounts for
dental insurance (as indicated in the Expense Category column)?
5. Draw a line plot showing how the actual, approved, and recommended amounts for F.I.C.A taxes (in
the expense category column) increased year-to-year.
Hint: you may use the df.replace(0.0, np.NAN) method in pandas to replace the zero approved and
actual amounts in 2020 and 2021 with NaNs, so that the line plot does not show zero for those years
(but you will not lose points for plotting the zero values.)
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more