Crime Watch
Deployed here: https://cultureofinsight.shinyapps.io/crime-watch/
RStudio Cloud space here: https://rstudio.cloud/project/192971
This is an example of how shiny can be used to ‘democratise’ a data source by connected users to an API via a simple, effective user interface.
This application uses geocoding and GPS to allow users to retrieve and map data from the UK Police data base at a location of their choice within England, Wales or Northern Ireland.
Currently the app will return data for the most recent month available in the data base. Functionality could be added to allow users to request data from previous months.
Criminal incidents within a 1 mile radius of the users chosen location are retrieved and mapped at the latitude + longitude recorded by the police. A summary count of all incidents, grouped by category, is also visualised in a bar chart.
Credits
- Geocoding via the ropensci opencage R package
- GPS locater via Dr Tom August's shiny geolocation Javascript script
- API calls to the data.police.uk data base via @njtierney's ukpolice R package