goldilocks
goldilocks copied to clipboard
Can you provide some documentation on how to extend this please?
I'd be totally interested in adding additional data for other countries etc, but for the life of me I can't really understand how the code in app.js works, so it's hard to contribute.
Could you write a guide on how to extend the app to support other regions if people can get the data for their country in a standardised data format?
Hi, thanks for your interest.
To add a new region, you need two things: temperature data, and a set of geoJSON coordinates. The coordinates should be a set of hexagons that tile the region of interest. Then you would add each hexagon as an entry in data/hex50kmWxStations2.js, e.g.:
{
"type": "Feature",
"properties": {
"id": 9540,
"avgBelow": [<temp data here>],
"minBelow": [<temp data here>],
"maxBelow": [<temp data here>],
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[145.0145452, 13.7925099],
[144.84681998, 13.99894945],
[144.92555324, 14.26165831],
[145.17294417, 14.3177603],
[145.34053583, 14.11104036],
[145.26087301, 13.84849989],
[145.0145452, 13.7925099]
]
]
}
}
Okay, but where do we get the temperature data and the coordinates? That part...I can't really help you with. I hired someone on Upwork to build this MVP, and although I know they used the NOAA climate dataset, I don't know where the hexbin coordinates came from, or how they mapped the temperature data to those bins. :/