Water potability Vega-Lite API Template
This interactive scatterplot visualizes water potability by plotting turbidity against hardness, with point color encoding pH and point size encoding total dissolved solids. Hovering reveals whether each sample is potable (1) or non-potable (0). The visualization is built using the Vega-Lite API template with d3.csv loading data from a Kaggle-derived water quality dataset. Vega-Lite’s declarative API, registered with vega and vega-lite, handles rendering, while vega-tooltip provides interactive hover details. The custom config.js adjusts axis styling for readability.
AI-generated descriptionA visualization constructed using the vega-lite-api.
The data shown here comes from the Water Quality dataset found on Kaggle : https://www.kaggle.com/adityakadiwal/water-potability I can't find the original source for this dataset so there is a good probability it is fake. Anyways, this is just for me to understand how the Vega-Lite API works. With the mouse you can hover and see if the water is potable for each data point. One means it's potable, and 0 means it's not.
Gist : https://gist.github.com/GuillaumeLoslier/bceac23341313c2886304cb88e89b504