I worked on my project, and everything appears to work correctly. When I reload the page, it seems that one or more cells do not run, so I see an error. And by running that cell again, I can see the correct output. Do you have any ideas how I can fix it? I was thinking of a while loop as an example.
As Mike indicated, youâve got a side effect that needs to finish before your visualizations can run. In particular, the cell that looks like so
{
// in this cell we want to add calculated similarity column, for each car, with the BMW 2002
data.forEach((element) => {
...
}
}
processes and modifies the data to make some changes that are necessary for the visualizations. To fix this, you can name that cell and then refer to that value in the cells that require it. Perhaps something like:
process = {
// in this cell we want to add calculated similarity column, for each car, with the BMW 2002
data.forEach((element) => {
...
}
}
great! that worked perfectly. I would appreciate it if you could tell me how to do that for my scatter plot because sometimes I have the same problem there too.