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

How to hide null/Nan values on a CircleViz ? #188

Open
annesophie-cls opened this issue Oct 19, 2021 · 3 comments
Open

How to hide null/Nan values on a CircleViz ? #188

annesophie-cls opened this issue Oct 19, 2021 · 3 comments

Comments

@annesophie-cls
Copy link

Null values are displayed with black circles on the map
How can i hide them ?

code1

code2

@akacarlyann
Copy link
Collaborator

akacarlyann commented Oct 19, 2021

Neat viz!! How about dropping the nans from your data frame?

datadf.dropna(inplace=True)

The other thing you could do is alter the color stops so the default color is rgba(0,0,0,0) or directly supply a transparent color_default='rgba(0,0,0,0)' to CircleViz.

@annesophie-cls
Copy link
Author

Thank you for your answer

dropna() is a solution I tried before, it works when there are other values than NaN is the dataframe, but when the dataframe is empty (had only NaN), the map is not displayed at all (blank page)

The color_default='rgba(0,0,0,0)' in CircleViz doesn't change anything

@akacarlyann
Copy link
Collaborator

akacarlyann commented Oct 21, 2021

In this particular case, it wouldn't be an empty dataframe though, would it? What about just dropping the entries where "ssh_karin" is null before creating the geojson layer?

Thanks for the reminder about the color default. I forgot that is for categorical color stops. It would be good to have the option to customize the color for missing data, though we didn't want to hide those points by default.

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

2 participants