All examples By author By category About

etpinard

Convert a set of scatter values to the scatter density

Scatter density problem

Starting from three 1-dimensional arrays representing the longitude, latitude and some scaler value (e.g. the amount of precipitation in the image on the left) at a set of locations, write an algorithm that converts the data into scatter density (e.g the image on the right).

The scatter density is defined as the average value of all the points located inside a longitude/latitude box.

Write your answer starting the provided anwser.js file in this directory.