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

ENH: add datatype geojson #1714

Merged
merged 7 commits into from
Oct 1, 2019
Merged

ENH: add datatype geojson #1714

merged 7 commits into from
Oct 1, 2019

Conversation

mattijn
Copy link
Contributor

@mattijn mattijn commented Oct 1, 2019

This PR adds the :G option for geojson data type. As was found out in #1711 this was missing in Altair.

With this PR the following example (part of this PR) will work:

import altair as alt
from vega_datasets import data

states = alt.topo_feature(data.us_10m.url, 'states')
source = data.income.url

alt.Chart(source).mark_geoshape().encode(
    shape='geo:G',
    color='pct:Q',
    tooltip=['name:N', 'pct:Q'],
    facet='group:N'
).transform_lookup(
    lookup='id',
    from_=alt.LookupData(data=states, key='id'),
    as_='geo'
).properties(
    width=300,
    height=175,
    columns=2
).project(
    type='albersUsa'
)

image

@jakevdp
Copy link
Collaborator

jakevdp commented Oct 1, 2019

Looks great, thanks!

@jakevdp jakevdp merged commit a8633e4 into vega:master Oct 1, 2019
@mattijn
Copy link
Contributor Author

mattijn commented Oct 2, 2019

Grmpf. The PR of #1707 was in my local master when I made a new branch for this current PR. To make the current PR clean I removed these commits.

But now this last commit is also applied on the master of Altair.
So my last commit on this PR removed #1707 again..:(

Any advice how to solve?

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.

2 participants