Clear Water App
This is a companion repository to the Clear Water model repo for predicting beach water quality. It can be used as a production-ready solution to deliver model predictions to a Socrata data portal and map.
model.Rds is obtained by running
Master.R in the
Clear Water model repo.
To generate the file, set the
productionMode variable in the model repo to TRUE. Place the file in the
data directory of this repo.
Make sure you also set the
datasetUrl variable in
To upload predictions to a Socrata portal, this application uses Chicago's
R package. You will have to authenticate with your data portal creditionals in order to add data to a predictions dataset. To authenticate with Socrata and upload predictions using this
automated app, create files to save login and app token details in the
credentials folder, named as follows:
App.R will read these credentials and use them to send the data
to the Socrata dataset.
This app is currently configured to predict water quality at beaches within a regional system. Specifically, it predicts the quality of some beaches along Chicago's Lake Michigan coastline based on the same-day bacteria observed at 5 predictor beaches.
If you are interested in contributing to this project, see our Contribution Guide.