Public
Edited
Jun 24
Importers
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
json_data = FileAttachment("voting_similarity_data.json").json()
Insert cell
labeledCountries = [
"FINLAND",
"AUSTRIA",
"DEMOCRATIC PEOPLE'S REPUBLIC OF KOREA",
"SYRIA",
"NICARAGUA",
"CHINA",
"GERMANY",
"CANADA",
"UNITED STATES",
"ISRAEL",
"JAPAN",
"CUBA",
"TURKEY"
];
Insert cell
labeledCountries_neutral = [
"BRAZIL",
"COLOMBIA",
"PERU",
"MEXICO",
"COSTA RICA",
"CHILE",
"SINGAPORE",
"INDIA",
"ARGENTINA",
"SOUTH AFRICA",
"NIGERIA",
"KAZAKHSTAN",
"QATAR",
"SERBIA",
"THAILAND"
];
Insert cell
labeledData = json_data.filter(d => labeledCountries.includes(d.country));
Insert cell
labeledData_neutral = json_data.filter(d => labeledCountries_neutral.includes(d.country));
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