The /home/m280-data/la_payroll/LA_City_Employee_Payroll.csv
file on teaching server contains payroll information of LA City employees in years 2013-2017. It was downloaded from LA City Controller’s Office. Make a Shiny app to facilitate exploratory data analysis.
For efficiency of the Shiny app, you should first pre-process, pare down, tidy, and save the data, e.g., as a compressed RDS file, to be used in the app.
Total payroll by LA City. Visualize the total LA City payroll of each year, with breakdown into base pay, overtime pay, and other pay.
Who earned most? Visualize the payroll information (total payment with breakdown into base pay, overtime pay, and other pay, Department, Job Title) of the top \(n\) highest paid LA City employees in a specific year. User specifies \(n\) (default 10) and year (default 2017).
Which departments earn most? Visualize the mean or median payroll, with breakdown into base pay, overtime pay, and other pay, of top \(n\) earning departments. User specifies \(n\) (default 5), year (default 2017), and method (mean or median, default median).
Which departments cost most? Visualize the total payroll, with breakdown into base pay, overtime pay, and other pay, of top \(n\) expensive departments. User specifies \(n\) (default 5) and year (default 2017).
Visualize any other information you are interested in.
Publish your Shiny app to https://www.shinyapps.io and share the link.
My app is located at https://emjcampos.shinyapps.io/la-payroll/.
The SQLite database /home/m280-data/la_parking/LA_Parking_Citations.sqlite
on teaching server contains information about parking tickets in LA City. It was downloaded from LA Open Data Portal. Connect to the database and answer following questions using plots and summary statistics. In this exercise, you are not allowed to load whole data into memory. Use the transform in database, plot in R strategy.
The data set looks like this:
There are 4,044,488 tickets in this data set. The parking tickets span 4/27/2010 to 12/30/2017. From the preceding plot, we see the most data is from 2015-2016.
Time | Highest | Tickets | Lowest | Tickets. |
---|---|---|---|---|
Hour | 12 | 506580 | 5 | 18317 |
Weekday | 3 | 796643 | 7 | 125327 |
Day of the Month | 22 | 144331 | 31 | 75464 |
Month | 3 | 392473 | 11 | 177039 |
The make with the most citations is TOYT.
There are 66 colors and BK attracted the most tickets.
The top 10 ticket types are depicted with their counts in the following bar plot:
The total amount of fines collected on parking tickets in 2015 and 2016 was $274,242,930.
Most fines are concentrated under $100, but there are upticks around $160 and $360.