π Public
Crop_Yield Data Viz
This example displays annual rainfall for each crop year across all Indian states, plotting each crop as a data point with its year on the x-axis and rainfall on the y-axis. The visualization uses the Vega-Lite API (via `vl.markCircle`) to create a scatter plot, with states differentiated by color and crop names available through tooltips. Data is loaded asynchronously from a remote CSV file using D3's `csv` function, while the chart is rendered through the Vega-Lite library registered with Vega, and appearance is customized via a config file that adjusts axis ticks and label styling.
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.