Skip to content

Geoshape docs revamp 5.0#2688

Closed
mattijn wants to merge 36 commits intovega:masterfrom
mattijn:docs-revamp-5.0
Closed

Geoshape docs revamp 5.0#2688
mattijn wants to merge 36 commits intovega:masterfrom
mattijn:docs-revamp-5.0

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