rawgraphs-app
rawgraphs-app copied to clipboard
Handling of NAs
First off, thank you for developing this. It's a really amazing tool for exploring data visualization. I'm particularly keen to use this in the classroom (grades 5-16).
That said, in order to use realistic data sets, it would be great to have some intuitive handling of missing data. Right now, blanks seem to be interpreted as 0, and both NA (default blank output for R) or "#N/A" spit out by Excel lead to an error in data import. Ideally all 3 inputs would be interpreted as missing and simply not plotted (and paired observations removed).
Steps to reproduce this Specific example data where blanks are wrongly interpreted as 0.
Year | Heterozygosity | MinPopEst |
---|---|---|
1985 | 30 | |
1986 | 0.227 | 28 |
1987 | 0.224 | 26 |
1988 | 0.217 | 26 |
1989 | 0.197 | 22 |
1990 | 0.191 | 29 |
1991 | 0.194 | 19 |
1992 | 0.189 | 28 |
1993 | 0.184 | 22 |
1994 | 0.191 | 24 |
1995 | 0.195 | 26 |
1996 | 0.184 | 34 |
1997 | 0.195 | 41 |
1998 | 0.197 | 49 |
1999 | 0.205 | 51 |
2000 | 0.208 | 62 |
2001 | 0.227 | 78 |
2002 | 0.226 | 80 |
2003 | 0.24 | 76 |
2004 | 0.244 | 84 |
2005 | 0.246 | 92 |
2006 | 0.25 | 94 |
2007 | 0.247 | 117 |
2008 | 104 | |
2009 | 113 | |
2010 | 115 | |
2011 | 110 | |
2012 | 123 | |
2013 | 133 |
To produce this graph, I chose "Bubble chart" with mapping X=Year, Y=Heterozygosity, Size=MinPopEst, color="MinpopEst, Label=Heterozygosity
Additional context
Interesting to note @drwilkins that in my experience with BLANK, N/A, or NULL values is not just that they are improperly represented as zeros- but I'm curious if you try to sort the data by the column 'Heterozygosity' (by clicking on the word at the top of the dataset) does your entire rawgraphs app page crash like I have been finding? It ruins the entire input data and has me start from 0 which is terrible if I have yet to save the project as a .rawgraphs file. The error output by the page console log is:
react-dom.production.min.js:209 TypeError: Cannot read property 'toString' of null
at DataGrid.js:325
at Array.sort (
Edit: In hindsight, this may only occur for NULL values in a STRING-VALUE column, not a numerical column, as the first line of the error is "Cannot read property 'toString' of null"