Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonw/russian-ira-facebook-ads-datasette
Explore 3,500 Facebook ads reported to have been bought by the Russian Internet Research Agency
https://github.com/simonw/russian-ira-facebook-ads-datasette
datasette
Last synced: 26 days ago
JSON representation
Explore 3,500 Facebook ads reported to have been bought by the Russian Internet Research Agency
- Host: GitHub
- URL: https://github.com/simonw/russian-ira-facebook-ads-datasette
- Owner: simonw
- Created: 2018-07-27T22:36:35.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2022-08-17T01:15:57.000Z (about 2 years ago)
- Last Synced: 2024-10-06T20:53:48.728Z (about 1 month ago)
- Topics: datasette
- Language: Python
- Homepage: https://russian-ira-facebook-ads.datasettes.com/
- Size: 1.38 MB
- Stars: 16
- Watchers: 6
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Converting irads JSON to Datasette
The House Intelligence Committee released 3,517 Facebook ads that were
reported to have been bought by the Russian Internet Research Agency as a set
of redacted PDF files.Companion blog post: [Analyzing US Election Russian Facebook Ads](https://simonwillison.net/2018/Aug/6/russian-facebook-ads/)
Ed Summers wrote a parser that converts those PDFs into a JSON file:
https://github.com/umd-mith/iradsThe script in this repository downloads that JSON file and converts it into a
SQLite database for use with Datasette. Use it like this:pip3 install sqlite-utils
python3 fetch_and_build_russian_ads.py \
https://raw.githubusercontent.com/umd-mith/irads/master/site/index.json \
russian-ads.dbThis will produce a SQLite database called `ads.db`. You can then explore it
locally with [Datasette](https://github.com/simonw/datasette) like so:pip3 install datasette
datasette ads.dbTo see the full customized interface you will need to install a custom branch of
Datasette plus a custom Datasette plugin. See the Dockerfile, or do this:pip3 install https://github.com/simonw/datasette/archive/filter-plugin-hook.zip
pip3 install datasette-json-html pyyaml
python3 build_metadata.py
datasette russian-ads.db \
-m russian-ads-metadata.json \
--config default_page_size:50 --config sql_time_limit_ms:3000 \
--config num_sql_threads:10 --config facet_time_limit_ms:3000 \
--config allow_sql:off --config force_https_urls:1 \
--plugins-dir=plugins --static static:static