Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Okay - I've got a basic single direction interaction working -- if you hover over one of the IWS basins, it populates the card and selects the corresponding bars in the barcode charts. Eventually I think it would be nice to highlight the selected basin on the map somehow.
Note: If the basins aren't filled, it seems like only the actual border of the basins triggers the mouseover. Therefore, in case we want to only color the borders, I'm using only a mouseover, rather than a mouseover and mouseout. If we leave the fill I've added, or we want to add more complexity to the interaction, we can switch to using a mouseout. Also, because I'm only using the mouseover, the card will remain populated with the last basin you selected until you hover over the next basin. This was the simplest setup -- figure we can finetune it later as needed.
Note: As of right now, the map svg elements for the IWS basins have ids like
iws_delaware
. Eventually it would be helpful to include the actual basin id(s) as the id or as classes, so that we can join to the data more easily. For now, I manually added a dictionary (basin_dict
) that does that crosswalk for the 3 IWS basins.Note: In digging deeper into the data, I realized that some IWS basins seem to be associated with >1 IWS 'basin_id', so that complicates populating the card, as we'd need to present some sort of average (area weighted or otherwise). For now, for simplicity's sake, I'm only indicating that there is a single
basin_id
associated with each basin in thebasin_dict
I'll make issues for these last 2 things.