Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Tweet Sentiment Distribution

Public visualization

Viewing a saved revision (read-only)

354772a48e3b4ce1ada1c2573204fd6a

Tweet Sentiment Distribution

0 stars1🌍 Public
PPeter Gish
Last edited Jul 10, 2022
Created on Apr 9, 2022
Forked from Hello VizHub

This visualization shows the sentiment distribution of tweets about Ukraine, displaying the percentage of tweets categorized as negative, positive, or neutral in a pie chart. The chart uses D3.js v7 with an SVG rendering approach, pulling data from a GitHub-hosted CSV file. The code employs `d3.pie()` and `d3.arc()` to generate the pie slices, `d3.scaleOrdinal` with a custom color scale for sentiment categories, and the d3-legend library to display the color legend. Percentages are shown on each slice using `d3.format(".1%")`.

AI-generated description