Skip to main content
100%

Crop_Yield Data

✓ Published3🌍 Public
PPothuguntla Pranitha
Last edited Apr 27, 2024
Created on Apr 26, 2024

This example visualizes year-wise crop production across Indian states using a scatter plot. Each circle represents a data point, with the x-axis showing the crop year, the y-axis showing production quantity, and color encoding the state using a category20 color scheme. Hovering reveals the crop name via a tooltip. The code leverages the Vega-Lite API, registering both Vega and Vega-Lite with a custom tooltip handler, and loads data from a remote CSV file using d3.csv. The visualization auto-fits its dimensions to the window size.

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.
MIT Licensed

Similar vizzes