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

vba_choropleth API #45

Closed
darribas opened this issue Jan 28, 2019 · 6 comments
Closed

vba_choropleth API #45

darribas opened this issue Jan 28, 2019 · 6 comments
Assignees

Comments

@darribas
Copy link
Member

I'm taking splot out for a spin and this is great! While using vba_choropleth, it works as documented, but here are a few ideas on how the API could be made more "newbie"-ready and maybe more streamlined:

  • It'd be great, if gdf contains the variables to plot, that the user could simply pass their name rather than having to "pull them out" manually. So, if x and y are in gdf, you could just pass the string with the variable name. I think the current setup is still useful in some cases, so it'd be great leaving it as an option, but I can imagine a lot of people will want to plot variables stored in the same GeoDatraFrame as the geometries.

  • Maybe it's a bit redundant, but it'd be great if y was optional. This would make the method a standard choropleth, but it'd make the function more useful IMHO.

I'll drop these here for discussion, not sure everything would necessarily have to be implemented, but just food for thought.

@darribas
Copy link
Member Author

darribas commented Feb 9, 2019

One more from playing with this for a workshop this past week. It seems the function throws an error if alpha_mapclassify and rgb_mapclassify don't have a value (the default None don't seem to work). I picked this up from the example notebook, where everything is passed and it works great, but from the docs, it seems to imply that it'd be just fine by passing the variables. Is that the case? If so, happy to open up a separate issue.

@slumnitz
Copy link
Member

@darribas yeah I think it would make sense to potentially integrate map classify into splot (which we have talked about before), offer a very high level function for plotting choropleths in all forms with one gdf and then potentially offer a couple more detailed functions?

@renanxcortes
Copy link
Contributor

renanxcortes commented Apr 15, 2019

Hey, I'm working on this issue and I think I have a version that I'd like to show to you and started to update the docstrings. However, I realized that in some cases the function is used with 'x' before 'y' and sometimes the opposite way. Is this an issue? Wasn't supposed to be all 'x' before 'y'?

Here's the line:

>>> vba_choropleth(y, x, gdf, cmap='viridis', ax = axs[0,0],

image

@slumnitz
Copy link
Member

fixed with #52 so closing

@darribas
Copy link
Member Author

darribas commented Apr 20, 2019

That's great! One quick question: does #52 also cover my second point (ie. enabling the user to only pass one instead of two variables)? It's my bad for including two features in one issue. If that's not the case and that'd be a useful feature, I'm happy to open it in a new issue, this time separately.

@slumnitz @renanxcortes

@darribas
Copy link
Member Author

Nevermind, that is really #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants