Now it's time to implement heatmap application. We will start from creating query to get sample data for application and then move forward to coding visualization using Javascript and Python.
Let us start to get acquainted with the data we have. We are going to explore sample data to make the process faster.
We are going to use the next query during development. We will display a heatmap for the center of Milano. The other simplification is a hardcoded time interval. We removed all other intervals from the sample dataset using the Pig script earlier. The general idea is to reduce the amount of data and make the development cycle shorter:
(index="milano_cdr_sample" time_interval=1385884800000 AND ( (square_id >5540 AND square_id < 5560) OR (square_id >5640 AND square_id < 5660) OR (square_id >5740 AND square_id < 5760) ) ) | fields square_id, sms_in, time_interval | stats sum(sms_in) as cdrActivityValue by square_id, time_interval...