🌍 Public
Fork of Crop_Yield Data
This example visualizes annual crop production across Indian states from a CSV dataset, using a line chart to show yield trends over time. The viz.js file employs the Vega-Lite API to map Crop_Year to the x-axis, Production to the y-axis, and State to color, with a tooltip displaying the crop name. The chart is rendered by the Vega-Lite API, which is registered with VEGA and a tooltip handler. The data is loaded via D3’s `csv` function from a GitHub repository, and the appearance is customized through the `config.js` file, adjusting axis colors and fonts.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed
Comments
Sign in to join the discussion.