-
Notifications
You must be signed in to change notification settings - Fork 370
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
New Data Type + Action: Automatic geographic attribute visualizations #253
New Data Type + Action: Automatic geographic attribute visualizations #253
Conversation
cc: @dorisjlee. Just worked through this issue! Lux can now detect and visualize geographical attributes. I may have pulled upstream changes in a way s.t. this PR includes merged commits from other PRs, but the logic from those remains unchanged. Let me know if there are changes I might need to make. I hope this helps! |
…o-attributes-choropleth
…o-attributes-choropleth
…y tests, use PandasExecutor
…o-attributes-choropleth
Hi @dorisjlee, I've added the ability to export choropleths, as requested. An example output is shown below. Let me know if there's anything else I should modify! |
…o-attributes-choropleth
Hi @micahtyong, df = pd.read_csv("https://github.com/covidvis/covid19-vis/blob/master/data/interventionFootprintByState.csv?raw=True",index_col=0)
df['dateBefore'] = pd.to_datetime(df['dateBefore'], format='%Y-%M-%d')
df
I'll wait until @caitlynachen does a code review on this PR before merging this in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Maybe next steps is to work on the same geo feature for Matplotlib, but amazing job figuring it out for Altair!
Thanks @micahtyong! Feel free to open new issues on some of the next steps that we discussed for extending the geo vis features (e.g., matplotlib, etc). |
In this PR
Closes #123 by adding a new data type,
geographical
, which detects columns representing geographic attributes (e.g.state
,country
), then calls the default action,univariate
, which then aggregates quantitative attributes and displays the corresponding choropleth symbol map.Changes
geographical
datatypeunivariate
default action and addedSymbolMap
visualizationPandasExecutor.py
tests/test_type.py
,tests/test_action.py
, andtest_vegalite_default_actions_registered
for correctness and failure casesExample Output