The goal of trafficdatacollector is to aid the field officers in traffic data collection as well as view the collected data.
This is a basic example which shows you how to solve a common problem:
library(trafficdatacollector)
## basic example code
- Uses
golem
to generate a package from R Shiny code. (https://github.com/ThinkR-open/golem) - Uses modules for effective code management. (https://shiny.rstudio.com/articles/modules.html)
- Validation of user inputs before insertion into database using sqlInterpolate to avoid SQL injection attacks. (https://www.rdocumentation.org/packages/DBI/versions/0.5-1/topics/sqlInterpolate)
- Uses
bs4Dash
to get the husky colors andshinyWidgets
actionBttn. (https://rinterface.github.io/bs4Dash/index.html, https://github.com/dreamRs/shinyWidgets) - Diabling buttons until all the required fields have been filled using shinyjs. (https://deanattali.com/shinyjs/)
- Mobile-friendly user-interface except the direction counter.
Shinyapps: https://cp84.shinyapps.io/trafficdatacollector/
Please note that the ‘trafficdatacollector’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.