Visualize how a website's colors changed over time.
Use screenshots from the Internet Archive and plot the data with Datawrapper.
https://blog.datawrapper.de/weekly-chart-website-colors/
$ brew install python geckodriver
$ pip install pipenv
$ make setup
# pacman -S pipenv geckodriver
$ make setup
Install these dependencies manually:
- Python >= 3.7
- pipenv
- geckodriver
Then run:
$ make setup
-
Create a new directory for the website color analysis. Example:
$ mkdir -p data/BBC
-
Create a CSV file with the website URL and snapshot dates you wish to analyze. Example:
# data/BBC/input.csv date,url 2010-02-01,http://news.bbc.co.uk/ 2011-02-01,http://www.bbc.com/news
Notice that each date can have a different URL.
-
Run the processing pipeline with arguments specifying the data directory and your Datawrapper API Access Token. Example
$ ./website-colors \ --verbose \ --data-dir="./data" \ --auth-token="$(secret-tool lookup datawrapper auth-token)"
This will take a screenshot of each of the historic snapshots defined in
input.csv
, analyze its colors, and create a chart in the Datawrapper App.All intermediate data will be stored in the data directory.
If the pipeline execution fails anywhere in the process, you can safely rerun it and it will continue where it left of.
$ make setup-dev
$ make test
$ make lint
$ make help
Feel free to remix this project under the terms of the Apache License, Version 2.0.