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

'map_join'-variable is lost after stat is applied #664

Closed
OLarionova-HORIS opened this issue Jan 12, 2023 · 1 comment
Closed

'map_join'-variable is lost after stat is applied #664

OLarionova-HORIS opened this issue Jan 12, 2023 · 1 comment
Assignees

Comments

@OLarionova-HORIS
Copy link
Contributor

Use a pie as an example, where the 'count2d' stat is applied by default

coords = pd.DataFrame( {'City': ['A', 'B'], 'x': [-80, 80], 'y': [-40, 40]} )
gdf = geopandas.GeoDataFrame(coords, geometry=geopandas.points_from_xy(coords.x, coords.y))

df = {
    "Name": ["A", "A", "B", "B"],
    "FullName": ["CityA", "CityA", "CityB", "CityB"],
    "Vote": ["Yes", "No", "Yes", "No"],
    "Number": [120, 30, 20, 80 ]
}

ggplot() + geom_pie(aes(fill='Vote', weight='Number', group='FullName'), 
                    data=df, map=gdf, map_join=['Name','City'])

Out:

Variable not found: 'Name'. Variables in data frame: ['Vote', '..y..', 'FullName', '..count..', '..x..']

@OLarionova-HORIS OLarionova-HORIS self-assigned this Jan 12, 2023
@OLarionova-HORIS
Copy link
Contributor Author

Fixed: 1e911d5

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

No branches or pull requests

1 participant