Why there are so many errors and my plot does not show ?

Here is the link:

Thank you very much

1 Like

You’ve published your “Observable Water Quality” notebook (which is great great for discussion like this) but I guess you’re trying to import functionality from an unpublished (or non-existen) notebook in this line:

import {ScatterplotMatrix} from "135522e2b5066d0e"

A published notebook can’t import from unpublished notebooks.

Thank you mcmcclur. Ok, I corrected the problem this time. But why are some plots still not show?

Can anyone help?

Well, as far as I can tell, no elements of your data have a basin key. Thus, I would not expect the following to work, for example:

Plot.rectY(data, Plot.binX({y: "count"}, {x: "pH", fill: "basin"})).plot()

If you simply remove the fill: "basin" to get

Plot.rectY(data, Plot.binX({y: "count"}, {x: "pH"})).plot()

then you do get a histogram. I’m not sure if that’s exactly what you’re looking for, though.

Generally, it’s easier to answer a question if it’s more focused. Thus, it would be great to share a smaller notebook with a minimal amount of code and a description of what output you expect.

Looks like you need Basin with an uppercase B instead of lowercase.

Plot.rectY(data, Plot.binX({y: "count"}, {x: "pH", fill: "Basin"})).plot()
1 Like

Thank you very much, Mike.

Hi, mcmcclur. Thank you very much for your reply. I have solved it.