Skip to content

Has anyone tried to use MapScaler together wit Altair? #2726

Answered by mattijn
knutwannheden asked this question in Q&A
Discussion options

You must be logged in to vote

Mapscaler just updates your geometry. So this should work:

import mapscaler as ms

# mapscaler stuff
loader = ms.MapLoader()
df = loader.fetch_counties()['df']
ss = ms.ShapeScaler()
scaled_df = ss.scale_map(df, 'EST_POP_2019', map_vel=.001, group_vel=.15, verbose=True)

import altair as alt
alt.Chart(scaled_df).mark_geoshape().project('albersUsa')

But for me the mapscaler function runs more than 30 minutes. So the problem is not so much altair in this.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@knutwannheden
Comment options

Answer selected by knutwannheden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants