Code Monkey home page Code Monkey logo

Comments (5)

xiaohk avatar xiaohk commented on May 22, 2024

Hi @Fquico1999, thanks for trying out Dodrio!

Do you get any error in the browser console?

For example, if you use chrome, you can open the web console by following these instructions.

from dodrio.

Fquico1999 avatar Fquico1999 commented on May 22, 2024

Yes, @xiaohk I do see some errors,
image
Im not very experienced with js or d3, so I'll attempt to debug and report here with any results.
In the meantime, if you have any ideas what this could be, please let me know

from dodrio.

xiaohk avatar xiaohk commented on May 22, 2024

It seems one of the data variables (headOrderMap.syntactic, headOrderMap.semantic , or headOrderMap.important) is not initialized (undefined). You can try to print out these variables in before the error line, e.g. console.log(headOrderMap).

Good luck! Keep us updated.

const initData = async (dependencyFile, saliencyFile, syntacticOrderFile,
semanticOrderFile, importantOrderFile) => {
// Init dependency data
data = await d3.json(dependencyFile);
data = data[instanceID];
let relationCounter = new Map();
selectedRelations = {};
// Create a set of existing [parent, child] pairs
existingLinkSet = new Map();
data.list.forEach(d => {
existingLinkSet.set(String([d.parent, d.child]), d.relation);
if (relationCounter.has(d.relation)) {
relationCounter.set(d.relation, relationCounter.get(d.relation) + 1);
} else {
relationCounter.set(d.relation, 1);
// Select all relations in initialization
selectedRelations[d.relation] = true;
}
});
relationCounter = new Map([...relationCounter.entries()].sort((a, b) => b[1] - a[1]));
relations = [...relationCounter.entries()];
// Init saliency data
saliencies = await d3.json(saliencyFile);
saliencies = saliencies[instanceID];
// Init the dependency layer/head accuracy list
headOrderMap.syntactic = await d3.json(syntacticOrderFile);
headOrderMap.semantic = await d3.json(semanticOrderFile);
headOrderMap.semantic = headOrderMap.semantic[instanceID];
headOrderMap.important = await d3.json(importantOrderFile);
headOrderMap.important = headOrderMap.important[instanceID];
};

from dodrio.

Fquico1999 avatar Fquico1999 commented on May 22, 2024

@xiaohk It seems like the problem arises when trying to access the index instanceID. Since my dataset has less elements than 1562, it returns undefined for several parameters.
I've seen references and definitions of instanceID in several locations, where would be the best place to change it?

from dodrio.

Fquico1999 avatar Fquico1999 commented on May 22, 2024

Got it working!
image

The problem was the one describe above, instanceID is defined in several files to be 1562, and needs to be changed to an index that exists in the dataset. Once that was changed, it seems to work.

I believe it would be useful to have instanceID defined in a single accessible location. Or if that is not possible, then perhaps changing it to 1 under the assumption that most datasets are at least length 1.

from dodrio.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.