Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cee wu chart #1

Open
wants to merge 4 commits into
base: wu-chart
Choose a base branch
from

Conversation

hcorson-dosch-usgs
Copy link

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.

image

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 the basin_dict

I'll make issues for these last 2 things.

@hcorson-dosch-usgs
Copy link
Author

Okay made a note of the basin id issue (both re: the svg and the >1:1 mapping) in USGS-VIZLAB#8. Realized as I was writing it out that if we end up adding all of the dataset basins (which I think would look really cool), and want to add interaction for all of those basins, then that would get us back to the 1:1 mapping, so would resolve the multiple ids issue. In that case I think we'd want to highlight the selected basin on the map clearly, so that it would be clear, for example, that you're only selecting 1 of the 2 IWS illinois river basin basins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant