Analyzes data and makes dynamic charts, graphs, and maps for http://www.somervillema.gov/dashboard/daily.html
Basically, this crunches the data and 'knits' it into an HTML file using knitr. The HTML relies on highcharts for the charts and leaflet for the maps. Also, it uploads the HTML and geojson files to our production server
For the theory and another working example, see http://danielphadley.com/How-To-Dashboard-R/
- In Windows task scheduler, I create a new task that runs daily with highest privilges
- The "Actions" is "start a program," which points to the .bat file in this directory
- The .bat file runs the .R script, which uploads the data to our web server through FTP
- Use github to get the latest version, which should be current on the official Somerville account
- Change the file paths in all R scripts and .bat files to reflect your desktop environment
- Copy the config.R file from the current maintainer (this is not commited in Github)
- Install all of the R packages listed in each script
- Follow the instruction above to automate
- Profit
Refactor and clean codeMake sure all NAs in charts get replaced with 0sBasic daily mapsTracking for QOL callsMake tracking weekly, rather than monthlyTop internally-generated work ordersScrub every comment of weird characters before turning to geojsonMake tracking based on some measure of statistical significanceTry to do charts by 7 day periods, or at least label the x-axis by max(date)Seperate DPW driven from work requestsTop three increases map and chart from top 25Map of top building permitsWeather