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

Transform sensor data to quality values #62

Closed caseycesari closed 5 years ago

caseycesari commented 5 years ago

Overview

Add functionality to transform the sensor data into water quality ratings which can be used by other parts of the app to convey the health of each waterbody.

A few tests for the water quality ratings are added for good measure.

The healthy ranges are placeholders for the moment as we await real data from the client.

Connects #60

Demo

image

image

Testing Instructions

caseycesari commented 5 years ago

Also tagging @kellyi for a review since you provided some insight on doing side-effect type stuff in actions.

kellyi commented 5 years ago

I didn't test this out but did look through the code and made some suggestions inline. Most of them were style related, but there's one Redux design suggestion I made which is:

I think it makes sense either to

Either one would simplify being able to reason about when/how these API requests would update the state.

It's not a huge design change either way, but it might be far enough out of scope for this card to turn it into a new issue.

caseycesari commented 5 years ago

Pushed up a fixup commit with some changes. Ready for another look.

fungjj92 commented 5 years ago

Taking a look ~ (edit on 4:49pm Thurs 2/28: Oops! Gotta run, will pick up in the morning)

fungjj92 commented 5 years ago

Tested and works 👍

caseycesari commented 5 years ago

Thanks for the reviews everyone!