Types of vehicles for a fuel type
This visualization shows the distribution of 746 car models across vehicle classes, color-coded by fuel type. A bar chart counts the number of models per vehicle class, with each bar segmented by fuel category. Hovering over a bar segment reveals the make and model of the counted vehicles. Built with the Vega-Lite API and D3.js, the example loads data from a CSV file hosted on Gist, originally sourced from Kaggle. The visualization uses `vl.markBar()`, `vl.x()`, `vl.y()`, and `vl.color()` to encode the categorical and quantitative fields.
AI-generated descriptionA visualization constructed using the vega-lite-api.
The data shown here comes from the Kaggle, via Gist].
Having completed a few weeks in Data visualization, I am getting comfortable with the js setup. The data on the right is a representation of 746 car models based on their vehicle type and fuel color. Upon hovering over any point on the data, we can see the make and model that has been counted. There is a lot of information from just a bar graph and more can be done by providing a couple of parameters. I look forward to bringing out the creative side in me thorugh these visualizations.