willayy / DAT257-Agile

Agile project in DAT257
1 stars 0 forks source link

56 heatmap rendering is invalid #61

Closed DuchessMuhr closed 5 months ago

DuchessMuhr commented 5 months ago

What

Moved the geoJson files into a local folder and updated these so that the location names correspond to what we get from the API. Updated the colors and legend to be dynamic with the highest number of reported crimes for a specific crime, divided into sixths.

How

GeoJson: Deleted the fetching file and replaced them with local json files. The legend updates a variable with the highest reported number when creating the dictonary. This variable is then used for calculating the limits when creating the legend and assigning color.

Why

To make the heatmap more understandable and colors actually meaning something when looking at the map.

Notes

At the moment the maxCrime variable is based both on regions and municipalities which in turn results in a very bleak looking map when looking at regions and fire since the max value for fire in municipalities is so high.

DuchessMuhr commented 5 months ago

@willayy i have now removed the unused imports, variables and added missing commenting.