Skip to content
Fix rainbow colormaps before it's too late!
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
iiif-biorxiv @ 9942728
static
templates
test
.gitignore
.gitmodules
.travis.yml
LICENSE
Procfile
README.md
biorxiv_scraper.py
detect_cmap.py
models.py
oneoff.py
requirements.txt
requirements_worker.txt
runtime.txt
status.sql
twitter_listener.py
utils.py
webapp.py

README.md

README

Build Status codecov License: MIT

Scientists co-opt our visual system to convey numerical data in a format that's easily understandable using spatial and color variation to capture details of the underlying data. A “colormap” transforms the set of numbers into a pattern of plotted colors.

When done poorly, this transformation introduces well-established visual artifacts and obscures the underlying detail. Furthermore, certain colormaps create images that are inaccessible to readers with anomalous color vision (i.e. colorblindness).

Unfortunately, widely-used rainbow colormaps, like "jet", face these issues but are pervasive in the scientific literature. Jetfighter aims to prevent this by detecting problematic colormaps in publically available pre-print manuscripts and then contacting the authors, if necessary.

Explore recently screened manuscripts here, and check out a companion website that provides a solution for published figures, fixthejet.ecrlife.org, as well!

To-do

(a wishlist we may never get to...)

  • Monitor arxiv feed (make a list of other preprint servers)
  • Check detection code and data saved into database
  • Some heuristic for red/green used together? in addition to rainbow colormaps?
  • Write tests for cmap detection code
  • Current pending count

Other notes

  • pdf url resolver needs to be cloned into the repo for works (submodule)

  • a number of config vars need to be in .env and are handled on Heroku with heroku-config

  • some jobs can take a long time, so we adjust timeout to 30m. Also, make sure that wait_timeout on the mysql database is sufficiently large (e.g. 28800 seconds)

heroku config:push -o #  Writes the contents of a local file into heroku config (-o overwrites)
heroku config:pull # Writes the contents of heroku config into a local file
  • Workers should have all requirements installed
pip install -r requirements.txt
pip install -r requirements_worker.txt
  1. Start backend worker(s)
FLASK_APP=webapp.py flask rq worker
  1. Configure a cronjob to monitor feed (e.g. crontab -e, below for every 20 minutes)
*/20 * * * * FLASK_APP=~/github/jetfighter/webapp.py /home/saladi/anaconda3/bin/flask retrieve_timeline >> ~/logs/jetfighter_retrieve.cron.log
  1. Test/start frontend (in practice, runs on Heroku)
FLASK_APP=webapp.py flask run
You can’t perform that action at this time.