Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Crop_Yield Data

Public visualization

Fork of Crop_Yield Data

0 stars0🌍 Public
BBhanu Siva Kumar Kommana
Last edited Apr 28, 2024
Created on Apr 28, 2024
Forked from 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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.

Comments

Sign in to join the discussion.

MIT Licensed