-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 0efa589 🚀
- Loading branch information
0 parents
commit dd7350e
Showing
9 changed files
with
11,361 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
defaults: | ||
- | ||
scope: | ||
path: "" | ||
values: | ||
layout: "default" | ||
|
||
baseurl: "/x-community-notes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gitkeep |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>{{ page.title }}</title> | ||
<link href="//cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="//cdn.datatables.net/v/bs5/jq-3.7.0/dt-2.0.5/datatables.min.css"> | ||
<style type="text/css"> | ||
time { | ||
cursor: help; | ||
text-decoration: underline; | ||
text-decoration-style: dotted; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/luxon/2.3.1/luxon.min.js"></script> | ||
<script src="//cdn.datatables.net/v/bs5/jq-3.7.0/dt-2.0.5/datatables.min.js"></script> | ||
|
||
<div class="container py-3"> | ||
<header class="d-flex flex-wrap justify-content-end py-3 mb-4 border-bottom"> | ||
<ul class="nav nav-pills"> | ||
<li class="nav-item"> | ||
<a class="nav-link{% if page.url == '/' %} active{% endif %}" href="{{ '/' | relative_url }}">Home</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link{% if page.url == '/about/' %} active{% endif %}" href="{{ '/about/' | relative_url }}">About</a> | ||
</li> | ||
</ul> | ||
</header> | ||
|
||
<main> | ||
<h1>{{ page.title }}</h1> | ||
|
||
{{ content }} | ||
</main> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: How it works | ||
--- | ||
|
||
Community note data is fetched regularly from [https://twitter.com/i/communitynotes/download-data](https://twitter.com/i/communitynotes/download-data). This data is always a couple of days old (last updated: <span class="timestamp">{{ site.data.notes | map: "created_at" | sort | last | date_to_rfc822 }}</span>). | ||
|
||
Notes are excluded if they meet any of the following criteria: | ||
|
||
* Created more than a week ago | ||
* Classifying the post as ‘not misleading’ (i.e. in support of the post) | ||
* Currently rated ‘unhelpful’ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: How it works | ||
--- | ||
|
||
{% assign scraped_at = 'now' %} | ||
{% assign updated_at = site.data.notes | map: "created_at" | sort | last %} | ||
|
||
Community note data is fetched regularly [from Twitter](https://twitter.com/i/communitynotes/download-data). | ||
|
||
This data is always a couple of days old (**most recent data is from <time class="dt" datetime="{{ updated_at }}" title="{{ updated_at | date_to_rfc822 }}">{{ updated_at }}</time>, scraped <time class="dt" datetime="{{ scraped_at }}" title="{{ scraped_at | date_to_rfc822 }}">{{ scraped_at | date_to_xmlschema }}</time>**). | ||
|
||
Notes are excluded if they meet any of the following criteria: | ||
|
||
* Created more than a week ago | ||
* Classifying the post as ‘not misleading’ (i.e. in support of the post) | ||
* Currently rated ‘unhelpful’ | ||
|
||
<script> | ||
const dts = document.getElementsByClassName('dt'); | ||
for (var i = 0; i < dts.length; i++) { | ||
var dt = dts[i]; | ||
dt.textContent = luxon.DateTime.fromISO(dt.textContent).toRelative(); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Twitter community notes | ||
--- | ||
|
||
<p class="lead">All proposed <a href="https://twitter.com/i/communitynotes/download-data">Twitter community notes</a> from the last week, updated daily.</p> | ||
|
||
<table class="table table-striped" data-order='[[ 0, "desc" ]]'> | ||
{% for row in site.data.notes %} | ||
{% if forloop.first %} | ||
<thead> | ||
<tr> | ||
<th>Note created</th> | ||
<th>Note shown</th> | ||
<th>Tweet</th> | ||
<th>Note</th> | ||
<th>Reasons</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% endif %} | ||
|
||
{% assign status = site.data.statuses[row['note_id']] %} | ||
{% if status.status == "unhelpful" %} | ||
{% continue %} | ||
{% endif %} | ||
<tr id="{{ row['note_id'] }}"> | ||
<td><a target="_blank" href="https://twitter.com/_/status/{{ row['tweet_id'] }}">{{ row['created_at'] | date:"%Y-%m-%d" }}</a></td> | ||
{% if status %} | ||
<td>{{ status.from | date:"%Y-%m-%d" }}{% if status.to %} (since removed){% endif %}</td> | ||
{% else %} | ||
<td></td> | ||
{% endif %} | ||
<td><blockquote class="twitter-tweet"><a href="https://twitter.com/_/status/{{ row['tweet_id'] }}"></a></blockquote></td> | ||
<td>{{ row['summary'] }}</td> | ||
<td>{{ row['reasons'] }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
--- | ||
title: Twitter community notes | ||
--- | ||
|
||
Proposed [Twitter community notes](https://twitter.com/i/communitynotes/download-data) from the last week, updated regularly. _[More…]({{ '/about/' | relative_url }})_ | ||
|
||
<div class="table-responsive"> | ||
<table class="table table-striped" data-order='[[ 1, "desc" ]]'> | ||
{% assign sorted_rows = site.data.notes | sort:'created_at' | reverse %} | ||
{% for row in sorted_rows %} | ||
|
||
{% if forloop.first %} | ||
<thead> | ||
<tr> | ||
<th class="d-none">Tweet ID</th> | ||
<th>Note created</th> | ||
<th>Note shown</th> | ||
<th class="d-none">Note removed</th> | ||
<th>Tweet</th> | ||
<th>Note</th> | ||
<th>Reasons</th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
{% endif %} | ||
|
||
{% assign status = site.data.statuses[row['note_id']] %} | ||
{% if status.status == "unhelpful" %} | ||
{% continue %} | ||
{% endif %} | ||
<tr id="{{ row['note_id'] }}"> | ||
<td class="d-none">{{ row['tweet_id'] }}</td> | ||
<td>{{ row['created_at'] }}</td> | ||
{% if status %} | ||
<td>{{ status.from }}</td> | ||
{% else %} | ||
<td></td> | ||
{% endif %} | ||
{% if status and status.to %} | ||
<td class="d-none">{{ status.to }}</td> | ||
{% else %} | ||
<td class="d-none"></td> | ||
{% endif %} | ||
<td><blockquote class="twitter-tweet"><a href="https://twitter.com/_/status/{{ row['tweet_id'] }}"></a></blockquote></td> | ||
<td>{{ row['summary'] }}</td> | ||
<td>{{ row['reasons'] }}</td> | ||
</tr> | ||
{% endfor %} | ||
|
||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<script> | ||
let table = new DataTable('table', { | ||
columnDefs: [ | ||
{ | ||
target: 1, | ||
render: function (data, type, row, meta) { | ||
if (type !== 'display') { | ||
return data; | ||
} | ||
return '<a href="https://twitter.com/i/birdwatch/t/' + row[0] + '" target="_blank">' + luxon.DateTime.fromISO(data).toFormat('d MMM yyyy') + '</a>'; | ||
} | ||
}, | ||
{ | ||
target: 2, | ||
render: function (data, type, row, meta) { | ||
if (type !== 'display') { | ||
return data; | ||
} | ||
if (data === '') { | ||
return data; | ||
} | ||
data = luxon.DateTime.fromISO(data).toFormat('d MMM yyyy'); | ||
if (row[3] !== '') { | ||
data = data + ' (since removed)'; | ||
} | ||
return data; | ||
} | ||
}, | ||
{ | ||
targets: [0, 3], | ||
visible: false | ||
} | ||
], | ||
drawCallback: function (settings) { | ||
twttr.widgets.load(); | ||
} | ||
}); | ||
</script> |