visdesignlab / upset2

UpSet - Visualizing Intersecting Sets
https://upset.multinet.app/
BSD 3-Clause "New" or "Revised" License
50 stars 7 forks source link

TypeError when uploading new file #314

Closed alex-r-bigelow closed 7 months ago

alex-r-bigelow commented 7 months ago

Hi all!

Not sure if this kind of report is useful—or if this is even the right place—but I was playing around with Multinet and seem to hit this error anytime I try to visualize a file with UpSet:

index-073d7c08.js:60 TypeError: Cannot read properties of undefined (reading 'push')
    at index-073d7c08.js:1063:7986
    at Array.forEach (<anonymous>)
    at _Ne (index-073d7c08.js:1063:7937)
    at $tn (index-073d7c08.js:1063:15285)
    at Etn (index-073d7c08.js:1063:15447)
    at _tn (index-073d7c08.js:1063:15664)
    at Atn (index-073d7c08.js:1063:15749)
    at INe (index-073d7c08.js:1063:15794)
    at lJ (index-073d7c08.js:1063:15941)
    at Rtn (index-073d7c08.js:1063:16052)

An example file to reproduce the error—I picked primary key for the first column, and boolean for the rest:

committeeSets_100rows.csv

In case it's relevant, my use case is trying to use UpSet to figure out whether there is a natural class hierarchy in Federal Election Commission data, trying to accomplish tasks like "If all Party Committees are also PACs, I want to model those as a subClassOf PAC, instead of a subClassOf Committee:"

image
JakeWags commented 7 months ago

Hi Alex,

Thanks for making this issue. It seems like this is an issue in the gray area between Multinet and UpSet.

I tried uploading the dataset you provided, and got the same problem. However, I noticed that your dataset has empty cells to represent 0. My understanding is that this isn't currently supported in Multinet. After I added values (0) to the empty cells, I was able to get the provided dataset to load in Upset. *Note: I tested this with both primary_key and string for the committee id column, both worked.

Here is the updated csv: committeeSets_100rows_updated.csv

Here is a screenshot of that Upset plot: image

This is something we should probably either support or warn users about. Whether this is something that should happen in Upset or Multinet is open for discussion. I'll talk to @JackWilb and open a new issue in the relevant repository.

Feel free to re-open this issue if you run into related problems.