Flu science projects need coders!

R, Python, and JavaScript for epidemiologists

Nick Doiron
5 min readMar 13, 2020

There are new efforts to organize coders for virtual hackathons and open data for health and preparedness. As a longtime ‘civic hacker’, I have seen hackathons energize coders and get clicks... but a lot of us are searching for a way to HELP, to know our code assists scientists or first responders.
We want code to be used for coronavirus today, and also for longtime global public health.

Zika mapped on NextStrain.org

A journey into open source epidemiology

If you’ve been following science/tech news, you may have seen NextStrain. They help scientists publish DNA samples and compose a ‘family tree’ of sorts. A tree helps verify the origin of the virus, and determine if cases are a community outbreak or from separate travelers.

About a month ago, I found their GitHub, saw they have a history working on Zika and other viruses, and read their recent issues to see how I could help. After connecting (tips on this later) I saw frontend tasks which I knew I could help on! Now I have some code in their project!
Recently I’ve been seeing more volunteers joining and getting organized through their frontend tasks page on GitHub Projects. There’s also a video interview and walkthrough from Shirley Wu.

What if I know R or Python..?

Hey number crunchers: there are GitHub orgs for epidemiologists using R!
R4EPI and reconhub
EpiModel is a popular R package.

Pythonistas can check out this library: pzivich/zEpid

There are also some fledgling eBooks to teach Python and R to epidemiologists — possible to collaborate?
pzivich/Python-for-Epidemiologists and episkills.teachable.com
brad-cannell/r4epi

Check your local civic tech group (such as Code for Boston) for projects in your community — these will usually have a Slack community for volunteers!

New: coronavirustechhandbook.com

→ Please let me know ASAP if you have other GitHub orgs!

5 Tips for awesome pull requests everyone loves

1. Find active and beloved projects

Check when the most recent commits and issues were! If the project owner hasn’t been involved for a year, move along. If there are zero stars and only one contributor, it might be them dumping code after a one-off project.

2. Read issues, carefully

The best way to get code merged is to fix a problem which the maintainers decided to fix!
Click on Issues and read any posts that seem relevant to you.

Check if someone is already assigned.

See if there are labels (if they are organized, labels like good first issue are a great sign).

Do the comments link to other issues and pull requests? Click and read.
If someone’s already tried and failed to fix this issue, if someone already opened a pull request… read as much as you can.

3. Build the project on your computer

This is often the most difficult step!
If install doesn’t work, check their guides and docs for help.
If you typically build projects in this language, and it’s still difficult to figure out their build, maybe make your first pull request be developer docs or a Dockerfile.

4. First contact

If someone was assigned to an issue a few months ago, it’s your first time connecting with the project, or you have some design questions… you can reach out. This isn’t required and is a little unorthodox. In my opinion, you will have a dialogue with the organizers eventually, so it’s up to you if that’s code or prose.

I prefer to use Slack, Twitter (public, not DM!), or (worst case) e-mail.
Write a short message that clearly explains: I saw Issue #100, I already built the code and started changing stuff; Can I be assigned to fix this?

Don’t ask for a mentor or special access. Don’t send follow-ups.
This message is not selling anything. It’s to figure out: Am I working on the right thing? Is this a good place to talk?

5. Less code, more description

On your first issue, solve a small problem with a small amount of code.
Use the pull request itself to explain what you did, drag in screenshots.
Imagine that you’re including a link to this post on your CV.

Always tag the issue. If you’re fixing a bug, include a sentence with the ID of the issue in the PR text, typically “Fixes #100”. This leaves a record in that issue for anyone following or reading, and will close the issue if you get merged in.

If a pull request doesn’t get merged

First, be patient! In tech I usually wait a week before assuming no response is coming, but in academia you can reply to a convo a month later. People have a lot of shit going on.

Second, take a look at your own PR. Did your build fail? Is it out of sync with the main or develop branch? Look for stuff like this:

Click on “Details”, find the build log, and make sure your code passes
the main branch changed on you! git pull — rebase

Did you explain what you were doing, with screenshots?
Is the team waiting for you to add tests?
Did you break code hygiene by leaving in console.log or weird whitespace?

I’ve had embarrassing code simply get ignored until I had it fixed.
If you got responses earlier from someone on the project, ask them for feedback.

Finally, if there’s no progress it’s OK to walk away. You can still learn something. If you added a feature that’s not needed right now, or your cool graph glitches in Firefox, document all of that for future developers.

That’s all

This was a long write-up. I hope that you find a good project and make them better with awesome code! Please do the reading, wash your hands, and make time for yours and others’ health!

--

--

Nick Doiron
Nick Doiron

Written by Nick Doiron

Web->ML developer and mapmaker.

No responses yet