What did you make?

A lot of useful information is all around us and updated regularly but it’s either hard to get to, hard to find or cumbersome to explore. We wanted to take the pain out of this and make something that sends the local information you care about to you, so, we made BathAlerts.

By entering a postcode within BANES, the BathAlerts website will find Flood Alerts, Planning Applications, Crimes and House Prices around you and display them on a map. If you want to, you can then change your search radius and starting point to refocus your search on a new area.


Once you’re happy with the search area and the amount of results you’re getting back (visible in the lists below the map), you can tick which information you’d like to be alerted about by using the checkboxes next to each of the section titles. Clicking the ‘Create Alert’ button or scrolling to the bottom of the page will reveal the email sign-up form which allows you to subscribe to daily emails for Flood Alerts (if one has been issued) and monthly emails for the Planning Applications, Crimes and House Sales. You can set-up as many alerts as you’d like and can unsubscribe from each one at any time by following the instructions at the bottom of an email alert.


Which data sources/tools did you use?

We chose to focus on five datasets due to the limited time we had for the hack. These were:

The result was a website built using:

  • PHP, HTML5, Sass and jQuery
  • Font Awesome for the icons
  • Leaflet, Leaflet.AwesomeMarkers, Leaflet.draw and Leaflet.markercluster for the map and markers
  • A MySQL database for storing users email addresses and selected alert options
  • A daily cron for Flood Alerts
  • A monthly cron for everything else
  • Transactional emails using Mandrill

What were the challenges?

The Bath: Hacked data store made accessing the information really easy. The hardest parts however were certainly integrating data from multiple sources into a single application and getting this right at the very beginning of the project. Such issues were showing the various data sources as layers on the map, different API calls and the flood data was not in the Bath Hacked datastore.

What would you do to improve your project further?

There’re a few minor bugs and usability issues that we would address immediately which we missed in testing due to rare occurrences and limited time. The unsubscribe process is also a little clunky. Ultimately though, adding new, regularly updating data sources and more options for alert frequency combined with a nicer designed email alert feel like they would be the obvious next steps. It’s worth noting that it would be easy to slip into the trap of adding datasets with static information (grit bin locations for example) just to pad out the service which isn’t what we set out to do and something we would try hard to avoid unless we felt it added significant value to the user.

If you shipped, where can we find it?

The completed project is at: bathalerts.bathhacked.org

The code is available at: https://github.com/Crashthatch/bathalerts


Comments are closed.