Skip to content

SketchingDev/PoliceUK.NET

Repository files navigation

PoliceUK.NET Build Status

An API wrapper for the Police UK API that provides easy access to crime data provided by data.police.uk.

Example Usages

Get a summary for all forces

var policeClient = new PoliceUkClient();
IEnumerable<ForceSummary> forces = policeClient.Forces();

Get street level crimes

var policeClient = new PoliceUkClient();

var chawton = new Geoposition(51.133112, -0.989054);
StreetLevelCrimeResults results = policeClient.StreetLevelCrimes(chawton);

foreach (Crime crime in results.Crimes)
{
    Console.WriteLine(crime.Category);
}

Installation

NuGet

Run the following command in the Package Manager Console

PM> Install-Package PoliceUK 

Manually

Download the latest release and add a reference to PoliceUK.dll in your project.

Prerequisites

.NET 3.5+ or Mono.

License

PoliceUK.NET is released under the MIT License.

The data provided by data.police.uk is covered by the Open Government Licence v3.0.