Google Maps Meets Swansea PD 2
I've made a few updates to the Swansea, MA Police Dispatch Log page.
- The date range for the incidents in the database is now displayed.
- The number of incidents to display on the map at one time is now adjustable. This can be adjusted based on the performance of your machine.
- The incident and date are listed in the marker list links
- The database was populated back through January 2009.
I did receive questions as to how often the database is updated. The database is updated shortly after the Swansea Police Department Dispatch Log
is update on the Swansea Police Department
Google Maps meets Swansea PD
Anyone that knows me knows that while I am sitting at my desk clicking away on the keyboard I am also listening to the Police Scanner. I have been listening to a Police Scanner for as long as I can remember. One of the departments I have programmed into the scanner is the Swansea Police Department. The Swansea Police Department also posts their Police Dispatch Log on their website (You can view my version Swansea Police Dispatch Log here).
In preparation for a future project, the other day I decided to start dabbling with the Google Maps API. APIs allow developers to easily integrate functionality from other applications/services into their application. The Google Maps API offers a wide range of map/location features.
As I was listening to the scanner I thought it'd be a great idea to see where the Swansea Police have been dispatched over a period of time on a map. Seeing the locations on a map clearly displays the more active areas. The concept was simple, but the question was on how I was going to get all of the incidents into a database for display in a map. With the Swansea Police Department having their Dispatch Log online, the question was easily answered. The answer is...
The format of the incidents on the police log is a pretty standard format, so I wrote a program that uses RegularExpressions to parse out the Date, Time, Reason and Location of the dispatch incidents. Each incident is then stored in a SQL Database. After the page is parsed, I then determine the longitude and latitude location for each incident by GeoCoding the address using the Google Maps API. I store the status, accuracy value, longitude and latitude of the address in the database. I then created a page that reads the database (for a filtered set of incidents) and display markers on a map for each incident. Only incidents that have been successfully geocoded are displayed. If you click on a marker you can see the date, time, reason and location of the incident. You can also click on an incident link to see where it is located on the map.
View my version Swansea Police Dispatch Log here.
I have a few other enhancements I am planning on adding to the map in the future. Check it out!
I know, I know, I am often told 'I am such a geek...'
FarmVille References Updated
There has recently been a significant number of changes to the popular Facebook game FarmVille. Flowers have been added to the list of crops. Fertilized crops yield additional XP when harvested. Pink cows have wondered onto the farm, fresh out of the strawberry patch, and we can't forget those little turtles that seem to have gotten lost.
Just as changes have been made to the game, so to have changes been made to the FarmVille Reference Tables.
The new items have been added to the list, and the display grid now uses AJAX, which eliminates the need to refresh the entire page when changing sort options (don't forget the multi-column sort). Using the reference tables you can easily see, when things are equated on the hour, that:
- Asparagus is the most profitable Vegetable yielding 7.63 coins per hour
- Sugar Cane is the most profitable 8 hour seed yielding 59 coins or 7.38 per hour
- Black Berries are the top when looking for coins and XP, yielding 6.75 and 0.50 per hour
It is time to go view and sort the chart
to see how seeds and items yield for the farmer.