azavea / ism-watershed-wellness-snapshot

A tool to collect and display watershed wellness indicators for the International Seaport Museum
1 stars 2 forks source link

Make changes to sensor state structure #64

Open caseycesari opened 5 years ago

caseycesari commented 5 years ago

In both #62 and #63, additional properties related to the sensor API data were added to the sensor GeoJSON state. I think it might be worth consolidating state.map.sensors into state.app.sensors for better clarity.

Along with that, the sensor API data and the sensor water quality ratings state should probably live on each sensor in state.app.sensors rather than as a separate, consolidated block. The change in state structure may require changes in some of the mechanics of how the data is retrieved. However, the sensor data should be retrieved independently, as it is now, since the availability of each sensor varies and the app is designed in a way that we don't need every sensor to retrieve data successfully. Some relevant discussion can be found at https://github.com/azavea/ism-watershed-wellness-snapshot/pull/62#discussion_r261313605.