Inspiration

We began by looking at datasets available online, including sets from fregis, and https://data.gov.uk/data/search , where we stumbled upon the existence of the data.police.uk api, which provides geographical crime data for the whole uk for the past 5 years. After some brainstorming we decided that providing at a glance crime stats to travels, prospective home owners, etc. could be quite a useful project.

What it does

It allows you to visualise the the total crime levels per category, and also time series data per category, in a mile radius around a point, for the past year.

How I built it

  • npm - to run webpack, and babel (with jsx and e66 presets) to support reactjs
  • react googlemaps component to handle map rendering
  • react chartjs components for nice looking data visualisation
  • A custom api module for data.police.uk
  • hacky, inplace edits to files in node_modules to make http-browserify work okay with data.police.uk's CORS settings.

Challenges I ran into

  • It's not possible to query more than a month of data with one request, or to query in any other manner than geodata (i.e. not possible to extract averages to compare/normalise the data to) from the api.
  • Cross-origin wildcards + http-browserify don't play nicely together, and there's no way to change the setting that needs changing without editing the module file.
  • Webpack errors can be rather cryptic, this is probably made worse by using babel too.

Accomplishments that I'm proud of

  • Learned to use: react, webpack, babel, and es6 syntax, all in one go.

What I learned

  • It's probably not so wise to try to pickup so many new tools at once, especially if you are aiming to have some sort of working product at the end as there are many idiosyncracies and small issues you won't notice.

What's next for Neighbourhood crime app

  • Comparisons of locations.
  • Comparisons against a national/city/county average level.
  • Visualisation of crime along a route, and tighter maps integration.

Built With

Share this project:
×

Updates