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

Geoshape docs revamp 5.0 #2688

Closed
wants to merge 36 commits into from
Closed

Geoshape docs revamp 5.0 #2688

wants to merge 36 commits into from

Conversation

mattijn
Copy link
Contributor

@mattijn mattijn commented Oct 7, 2022

As per joelostblom#1 (comment).

I just changed the base repository to merge into, but I'm not sure if this will result in merge errors.
Can you check @joelostblom if this works for you once starting with #2607?

Note, I remember seeing this, #2651 (comment) example from you. It would be nice to integrate thhat as well.

I tried it using geopandas, but did not really succeed:

import altair as alt
import geopandas as gpd
import json

gdf_ne = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
extent_africa = gdf_ne.query("continent == 'Africa'").unary_union.envelope
fit_africa = json.loads(gpd.GeoSeries([extent_africa]).to_json())['features']
# this does not work
alt.Chart(gdf_ne).mark_geoshape(clip=True).project(fit=fit_africa)

# but this does a bit better.. not sure why
del fit_africa[0]['geometry']['coordinates'][0][0][0]
alt.Chart(gdf_ne).mark_geoshape(clip=True).project(fit=fit_africa)

Also not sure if this all should be within the mark geoshape documentation

joelostblom and others added 30 commits March 24, 2022 19:58
Also move a couple of section inside conf.py
Remove dollar sign for easy copy paste
@joelostblom
Copy link
Contributor

Great, thanks @mattijn ! I will try this out when starting to work on the other PR (and also try to experiment with the additional example). Could you rebase this PR on current master branch? I think that will get rid of all my commits here that we already squash merged in #2566

@mattijn
Copy link
Contributor Author

mattijn commented Oct 7, 2022

Yes, @joelostblom. After some fight with git, I think I've rebased properly with the current main branch of altair repo.

@mattijn mattijn closed this by deleting the head repository Oct 19, 2022
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