You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Inspired by the police.uk crime maps, where they cleverly cluster data together depending on how far zoomed in you are, this MySQL snippet goes a long way to explaining the logic behind such an operation.
A perfect grid
This snippet groups sites to a perfect grid while the police.uk algorithm has some sort of trickery that moves their points about somewhat, looking at their blogs and documentation I would conclude that they have a predefined set of points, each with a catchment area of postcodes. It looks like a whole lot of scraping and manual labour went into their database and quite frankly I don't have the time nor inclination do attempt such a task.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters