Public
Edited
Mar 18
Insert cell
Insert cell
import {vl} from '@vega/vega-lite-api-v5'
Insert cell
Insert cell
df = FileAttachment("sampled_tweets100_translated-textblob.csv").csv()
Insert cell
data = df.filter(d => d.Event !== null && d.Event !== "")
Insert cell
Insert cell
Insert cell
vl.markCircle()
.data(data)
.encode(
vl.x().fieldQ("Sentiment_Polarity").scale({domain: [-1, 1]}).title("Sentiment Polarity"),
vl.y().fieldQ("Sentiment_Subjectivity").title("Sentiment Subjectivity"),
vl.color().fieldN("sentiment_textblob").title("sentiment_textblob"),
vl.tooltip(["tweet_translated","tweetURL"])
)
.width(600)
.height(400)
.render();
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more