Geo Visualisation with ELK Stack

Preconditions

Step 01. Creating the Index and Index Map

“uela-dataset-01-geo-all” index created with a PUT from DevTools console
Index Creation Pattern for the dat to publish

Step 02. Preparing Logstash ~ The config file

Logstash config file — Filter section mutate to add geo locations information
input {  file {
type => "dataset_01_2009_2017_BO"
path => "${ELK_STACK_UELA_DATASET}/DATASET_01_2009_2017_BO.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
mutate {
add_field => { "[location][lat]" => "-34.5834529467442" }
add_field => { "[location][lon]" => "-58.4053598727298" }
}
mutate {
convert => {"[location][lat]" => "float"}
convert => {"[location][lon]" => "float"}
}
}
output { elasticsearch {
index => "uela-dataset-01-geo-all"
hosts => "${ELK_STACK_CLOUD_HOST}"
user => "${ELK_STACK_CLOUD_USER}"
password => "${ELK_STACK_CLOUD_PASS}"
}
stdout {}
}

Step 03. Run Logstash to ingest data

$ logstahs -f logstash-dataset-01.all.cof
The index pattern is alive and it is match out index!
Location is from the type “geo_point”! (thanks to our initial map set)

Step 04. Query the data in the geo map

Data indexed and geo location in “La Boca” and “Centenario Park” neighborhoods

Step 05. Sample Queries ~ How much geo points?

There are 149780 docs
All four points have the same size: 37445 and 37445 x4 = 149780

Final words

Resources

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store