Skip to content

Map visualization for interventions made by Municipal Police of Poznań, Poland.

License

Notifications You must be signed in to change notification settings

andre-wojtowicz/poznan-mp-interventions

Repository files navigation

Municipal Police of Poznań - visualization of interventions

This repo contains scripts and data necessary to visualize on a map the interventions given by Municipal Police of Poznań. Statistics are presented for 2013-06-17 - 2013-10-09.

Tableau

Update

I moved some results to Tableau. The packaged workbook file (v10.2) is stored in Releases. The online version is available on Tableau Public. Here is a screeshot of a generated dashboard:

tableau

District HTML heatmaps

Generated interventions heatmaps for districts:

QGIS

Final maps are stored in QGIS format. Generated images of QGIS interventions heatmaps for districts:

all

alcohol

parking

disturbing public order

Other statistic

Generated statistics are stored as XLSX.

Time of reports:

time of reports

Reproducibility

Requirements

  • R 3.x with vwr library
  • Python 2.6 with requests library

How-to

I assume you have your own raw copy of the list of MP interventions, i.e. db/poznan-mp-interventions-2013-06-17-2013-10-09.csv.

Execution goes as follows:

  1. extract_streets_and_places.R - looks for name of street or place in description of intervention,
  2. add_lat_lon.py - performs reverse geocoding using Google Maps API,
  3. clean_csv.py - removes unnecessary columns,
  4. add_district.py - adds name of district to intervention,
  5. create_html_visualizations.py - generates nice html heat-maps for districts (in Polish).

Notes for scripts

  • add_lat_lon.py - sometimes Google returns that there is no lon/lat for given address; then just re-run the script.
  • add_district.py - some of coordinates given by Google may lay outside the districts boundaries; the script will output ids of such interventions.

Sources of data

About

Map visualization for interventions made by Municipal Police of Poznań, Poland.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published