block by etpinard 4416bd1403259a7815cc

Convert a set of scatter values to the scatter density

Full Screen

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.

index.html

scatter-density

answer.js

package.json