10 → 5,000
Checking ten company filings manually may be manageable; checking 5,000 requires automation.
Intro to Computational Journalism
Computational journalism means using structured methods, data and code to support reporting.
Checking ten company filings manually may be manageable; checking 5,000 requires automation.
A script can download the same monthly table every time it is updated.
Apply the same cleaning rule to every row rather than relying on manual edits.
A colleague can rerun the notebook and see how the result was produced.
Expose outliers that become reporting leads.
Audit public claims, procurement data and company disclosures.
Code does not replace reporting.
It helps us decide where to report, what claim to test and what evidence to request. Computational work does not remove journalistic judgement.
One row
Depending on the dataset, that observation might be one company, one person, one district, one transaction or one financial year.
| company | year | profit | |
|---|---|---|---|
| 0 | Aruna Power | 2024 | ₹84m |
| 1 | Nila Energy | 2024 | ₹51m |
| 2 | Vaigai Solar | 2024 | ₹73m |
One column
A variable is one characteristic recorded about each observation. In tables, variables appear as columns.
| company | year | profit | |
|---|---|---|---|
| 0 | Aruna Power | 2024 | ₹84m |
| 1 | Nila Energy | 2024 | ₹51m |
| 2 | Vaigai Solar | 2024 | ₹73m |
84Numbers that we may calculate with.
"solar"Groups observations into labels.
2026-07-28Records time.
TN-0042Distinguishes one record from another.
A data dictionary explains what each variable means, how it was measured, what format it uses and what its possible values represent.
Without one, an obvious column name can still mislead.
profit mean?At minimum
The file extension is a clue: it tells us what a file can preserve, how it is structured and how we might open it.
companies.csvsurvey.xlsxdistricts.shpreport.pdfapi.jsontable.htmlarchive.zipREADME.mdPortable and easy to analyse. Does not preserve highlight colours, formulas or multiple sheets when exported.
May include several sheets, formulas, merged cells and formatting.
Tables may look structured but be difficult to extract reliably if they are not machine readable.
Useful when collecting tables or repeated page elements.
Structured data commonly returned by APIs.
A compressed container that may hold one or many data files.
Commonly used to store geographic boundaries. It is both data and geometry.
The same notebook can later become a transparent record of the analysis.
A function: a named instruction Python already knows.
The text inside quotation marks is a string.
Parentheses hold the information being passed to the function.
The output appears directly below the cell.
A library is reusable code written by other people. We import it rather than rebuilding its functions ourselves.
read_csv()
head()
shape
columns# tools we can reuse
url = ...Store the dataset address in a variable.
pd.read_csv(url)Read the CSV and turn it into a dataframe.
dfA conventional short name for the dataframe.
head() shows five rows. shape returns rows and columns. columns lists names exactly as Python sees them.
Journalistic inspection
Optional final command if the class is moving comfortably.