R & Python for Development
A South Asia 101 — learn to code from absolute zero, with real R and Python running live in your browser. No installation, no account, works on a modest laptop.
Your first line of code
Two languages run almost everything in development-sector data work: R (loved by statisticians and evaluators) and Python (loved by data scientists and engineers). You do not have to choose — this course teaches both, side by side, so you can read either one and pick what your team uses.
Everything here runs inside this page. Click Run and the code executes in your browser — nothing is installed and nothing is sent to a server.
1 · Make the computer say something
The most basic thing code does is print — show a value on screen. In both languages the command is print(...). Text goes inside quotes. Press Run, then switch the tab from R to Python and Run again.
Notice how similar they are. That similarity is the whole reason we can teach them together — the ideas are the same; only small details of spelling differ.
2 · A tiny piece of real analysis
Say you surveyed five people and recorded their ages. Let's store those numbers and compute the average (mean) — the workhorse of any baseline report.
In R a list of numbers is made with c(...) (for "combine") and the average is mean(...). In Python we use a list [...] and compute sum(...) / len(...). Run both.
ages), put five numbers in it, and ran a function over it. That is 80% of data analysis — data goes into a variable, a function does something to it, you read the result.
3 · Your turn
Change the numbers below to a small dataset of your own — maybe household sizes, or the number of children in five families — then Run. Try it in both R and Python.
Where this course goes
This is the pilot lesson. The full 101 continues with real South Asian datasets — NFHS, ASER, PLFS, Census, Union Budget — building from "hello" to running an actual impact evaluation.
Your first line of code You are here
print, variables, a first calculation — in R and Python.
Data in, data out Coming
Read a real NFHS / ASER / PLFS file; look at rows and columns.
Wrangling Coming
Filter, select, group — tidyverse in R, pandas in Python.
Summaries & disaggregation Coming
Means and rates split by gender, caste, geography (ties to the Data Feminism lab).
Visualisation Coming
Your first chart — ggplot in R, matplotlib in Python.
Regression & impact evaluation Coming
Difference-in-differences, matching, IV — using open impact-evaluation datasets.
Reproducibility & sharing Coming
Scripts, comments, and sharing your analysis so others can rerun it.