Hack the Police + Elasticsearch

curl -XPUT "localhost:9200/_ingest/pipeline/crime_csv" -H "Content-Type: application/json" --data '{
"description": "Parse crime data",
"processors": [
{
"grok": {
"field": "crime",
"patterns": [
"%{WORD:type},%{NUMBER:location.lat},%{NUMBER:location.lon},%{DATA:gender},%{DATA:age},%{DATA:ethnicity},%{DATA:officer_ethnicity},%{DATA:legislation},%{DATA:search_object},%{DATA:outcome},%{DATA:search_object_link},%{DATA:more_than_outer_clothing}"
]
}
},
{
"remove": {
"field": "crime"
}
}
]
}'
curl -XPOST "localhost:9200/_template/crime_template" -H "Content-Type: application/json" --data '{
"template": "hack_the_police",
"settings": {
"number_of_shards": 1
},
"mappings": {
"crime": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}'
Screenshot of Elasticsearch index after successful import
Screenshot of Kibana Discover interface
Pie charts showing some demographics like gender and ethnicity
Map showing concentration of stop and search in the Lincolnshire area
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade