question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mark_rect handling handling of missing data

See original GitHub issue

I’m trying to create a heat map with mark_rect() as described here.

I’ve attached the data as a csv to this issue, as well as a snippet of (hopefully) reproducible code as well as a snippet of what I expect it to look like using Seaborn (note the difference in handling of “missing (NaN) data”, it’s grey in Seaborn and ?? in Altair).

csv needed to run example: testdf.csv.zip

import seaborn as sns
sns.set(rc={'figure.figsize':(11.7,8.27)})
df = pd.read_csv('testdf.csv')

# Seaborn plot
dff = df.pivot('state','year','annual_rate')
sns.heatmap(dff,vmin=0,vmax=300)

Unknown

In Altair: visualization-9

Any ideas?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jakevdpcommented, Oct 27, 2019

And from the question, it sounds like you want to impute the y-axis, not the color, correct?

0reactions
firasmcommented, Oct 28, 2019

Indeed - impute the y-axis was the solution. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dealing with missing data: Key assumptions and methods for ...
Appropriately dealing with missing can be challenging as it requires a careful examination of the data to identify the type and pattern of...
Read more >
How to Deal with Missing Data - Master's in Data Science
Missing data can skew anything for data scientists, from economic analysis to clinical trials. After all, any analysis is only as good as...
Read more >
The prevention and handling of the missing data - PMC - NCBI
One technique of handling the missing data is to use the data analysis methods which are robust to the problems caused by the...
Read more >
Handling missing values in R - R-bloggers
Another traditional way of handling missing value is based on complele.cases. The function complete.cases() returns a logical vector indicating ...
Read more >
Handling Missing Values in Information Systems Research
In today's big data environment, missing values continues to be a problem that harms the data quality. The bias caused by missing values...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found