Repository navigation
Description
Overview
Measure language equity on sensitive topics by comparing how quickly key Wikipedia pages are created and updated across languages. Output a reproducible dataset and dashboard that quantify coverage (existence), “time-to-translation,” and update lag versus a reference language (e.g., English).
Action Items
If this is the beginning (research & design)
- Define scope: start with ~50 English Wikipedia pages in sensitive domains (public health, migration, elections, climate disasters, human rights).
- Choose language set: top 30 Wikipedias by article count + 10 low-resource languages for contrast (via
sitematrix), or all languages returned by each page’slanglinks. - Finalize metrics & windows: coverage status, time-to-first-presence (page exists Y/N and when), and update lag (delta between latest edit timestamps across languages).
- Methods plan: use MediaWiki Action API (
prop=langlinks,prop=revisions,list=sitematrix) and optionally Pageviews REST API for context; decide reference language(s) for lags. - Tooling pairs:
requestsorhttpx;pandasorpolars; storage induckdborsqlite; viz inAltairorPlotly.
If researched and ready (implementation steps)
-
Seed topics
- Create a
topics.csvof English page titles and (optional) Wikidata QIDs for disambiguation.
- Create a
-
Enumerate languages & interlanguage links
- For each English title:
prop=langlinksto get language codes and titles; merge withsitematrixto validate wiki domains.
- For each English title:
-
Fetch revision metadata
- For English and each linked language title:
prop=revisions&rvprop=timestamp|size|userid|comment&rvlimit=1&rvdir=older/neweras needed to get first and latest revision timestamps.
- For English and each linked language title:
-
Compute metrics
- Coverage: page present (1/0).
- Time-to-presence: first non-English creation time minus English creation time.
- Update lag: latest English edit time minus latest non-English edit time (days).
- Optional robustness: compare against median of top-N languages instead of only English.
-
Deliver
- Artifacts:
pages_raw.parquet,lang_presence.parquet,lags.parquet,metrics.csv. - Dashboard: heatmap (languages × topics) of update lags; coverage bar charts; language ranking tables.
- Methods README with exact queries, rate-limit/backoff notes, and caveats.
- Artifacts:
-
Quality & Ops
- Caching of responses; exponential backoff on
maxlag. - Unit tests for merge logic and timestamp math; schema checks.
- (Optional) Monthly GitHub Action to refresh a subset.
- Caching of responses; exponential backoff on
Instructions
API docs to pin in the repo
- MediaWiki Action API overview:
API:Action_API - Interlanguage links:
API:Langlinks - Revisions metadata:
API:Revisions - Site matrix (language list):
API:Sitematrix - Pageviews (REST; optional context):
Wikimedia REST API: Pageviews
Suggested libraries (pick pairs)
- HTTP:
requests|httpx - Frames:
pandas|polars - Storage:
duckdb|sqlite - Viz:
Altair|Plotly - Parsing (optional):
mwparserfromhell|wikitextparser
Sample queries to copy into notes
# Interlanguage links for an English page
action=query&prop=langlinks&titles=Migration_crisis&lllimit=max
# Latest revision timestamp for a given title on any wiki
action=query&prop=revisions&rvprop=timestamp|size&rvlimit=1&titles=<TITLE>
# First revision timestamp (creation): request oldest
action=query&prop=revisions&rvprop=timestamp&rvlimit=1&rvdir=newer&titles=<TITLE>
# Languages list (code ↔ wiki mapping)
action=sitematrix&formatversion=2
Ethics & reporting
-
Avoid punitive “league tables.” Emphasize resource constraints and volunteer capacity.
-
Aggregate results; no profiling of individual editors.
-
Document missingness (pages that never existed, renamed pages, disambiguation).
-
Be explicit that latest edit time ≠ content parity (it’s a proxy).
-
If this issue requires access to 311 data, please answer the following questions:
- Not applicable.
- N/A
- N/A
- N/A
Project Outline (detailed plan for this idea) in details below:
Details
Research question
Do sensitive-topic pages appear and stay up-to-date across languages at similar speeds, or do we observe systematic coverage gaps and update lags?
Data sources & modules
prop=langlinksto discover cross-language equivalents for each English seed page.list=sitematrixto enumerate languages and validate wiki domains.prop=revisionsto get first and latest timestamps per page/language.- (Optional) Pageviews REST API to contextualize demand vs. freshness.
Method
- Build a seed list of English pages in public health, migration, elections, climate disasters, and human rights (store in
topics.csv). - For each page, pull
langlinksto get target language titles; validate withsitematrix. - For English + each language title, fetch first and latest revision timestamps.
- Compute metrics per (topic, language): coverage, time-to-presence, update lag; summarize by language family/region.
- Visualize a lag heatmap (languages × topics), coverage distributions, and top-lagging topics.
Key metrics
- Coverage rate (% of topics that exist per language).
- Median time-to-presence (days).
- Median update lag (days) and % of topics with lag > thresholds (e.g., >30, >90 days).
- (Optional) Correlate lag with pageviews to see “high-demand but stale” cases.
Deliverables
- Clean tables (
lang_presence.parquet,first_latest_revisions.parquet,lags.parquet). - Reproducible notebook +
reports/language_equity.md. - Streamlit/Altair dashboard with filters (topic set, language subset, thresholds).
Caveats & limitations
- Timestamp proxies don’t guarantee semantic parity; translations may be partial.
- Some languages may title pages differently or merge topics; handle redirects carefully.
- API throttling and
maxlagrequire polite batching and retries.
Implementation notes
- Normalize timestamps to UTC; compute diffs in days (float).
- Use stable keys:
(wiki_db, pageid)when available; fall back to(lang_code, normalized_title). - Cache raw JSON responses and write a manifest of query params for reproducibility.
Resources
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNew Issue Approval
Activity
LixinTu commentedon Jan 26, 2026
Instructions
Progress:
Blockers:
None. All technical issues resolved.
Availability:
3-5 hours available for revisions and feedback as needed.
ETA:
Complete. Ready for review (January 26, 2026).
Pictures:
<img width="1676" height="1000" alt="newplot" src="
Warning
This asset could not be copied from your saved reply. Please try again later.
" />
14 remaining items
egcuriel commentedon Jul 7, 2026
Progress: I'm reading on Jupyter Notebook best practices so that I can make the notebook as reproducible as possible.
Blockers: None at the moment, but I've had intermittent issues with the Jupyter kernel not being recognized by VS Code
Availability: 10 hours
ETA: 07/13/2026
Pictures: N/A
egcuriel commentedon Jul 14, 2026
Progress: I've migrated the logic from my earlier iterations into a Jupyter notebook and created an accompaning utils file. My goal was to improve the modularity and maintainability of the codebase so that it is easier to debug and reproduce. The notebook now contains explanations of the code and data flow, and the utils file contains core operations for data processing and storage, API requests, and response caching. I've also incorporated the visualization logic from my earlier iterations, which now pulll from the dataframes built off the parquet. I wrote an expansive topics list so that I can decide which ones I want to keep after the run but averaging for 50 topics, the runtime is around 1 hour and 32 minutes.
Blockers: Time constraint - I didn't have as much time as I thought I would last week and the progress I made took longer than I expected.
Availability: ~5 hours
ETA: 08/03/2026
Next steps: I will cut down the topic list to 50 topics and organize them by domain, before I continue working on the visualizations. I plan to have everything ready for our next meeting and will report progress weekly.
egcuriel commentedon Jul 22, 2026
Progress: I've completed the data collection pipeline, computed the metrics, and created the visualizations for the project. The final dataset (50 core topics comprehensively mapped across 300+ Wikipedia language editions) has been successfully generated and cached. I've also optimized the API fetching logic, which previously took over 1.5 hours, and now executes concurrently in roughly 2 minutes without hitting any rate limits.
Blockers: None
Availability: ~5 hours
ETA: 08/03/2026
Next steps:
The core project requirements are complete! My remaining tasks are to apply the finishing touches to the visualizations, draft the final language_equity.md report, and clean up the Jupyter notebook for final delivery.
egcuriel commentedon Aug 14, 2026
Progress: I am still applying the finishing touches and drafting the report
Blockers: I had a couple of emergencies the last couple of weeks, so I didn't get a chance to work on the issue
Availability: Unsure this week
ETA: 08/20/2026
Pictures:
egcuriel commentedon Aug 18, 2026
Progress: I left off in the same place as last week
Blockers: I didn't have any time to work on it last week
Availability: Unsure but hopefully around 10 hours
ETA: 08/24/2026
Pictures:
chinaexpert1 commentedon Aug 25, 2026
Please provide update @egcuriel
Instructions
You can use this template
egcuriel commentedon Aug 25, 2026
Progress: I've left off on the same as last week since I didn't have much time to work on things last week
Blockers: Time
Availability: Unsure
ETA: Unsure
Pictures:
chinaexpert1 commentedon Sep 1, 2026
Please provide update @egcuriel
Instructions
You can use this template
egcuriel commentedon Sep 5, 2026
Progress: I am working on the report at the moment
Blockers: Time has been very limited on my end
Availability: Sat-Sun, 9pm-11pm
ETA: 09/07/2026
chinaexpert1 commentedon Sep 22, 2026
Please provide update @egcuriel
Instructions
You can use this template
egcuriel commentedon Sep 22, 2026
Progress: I've migrated everything over to be contained in a data and scripts folder. The scripts folder now contains scripts for their corresponding scope (models, network, api, pipeline, analytics, visualizations, utils). The data folder contains .cache, logs, visualizations folders and the csv and parquet files.
Blockers:
Availability: M-F (6pm -11pm)
ETA: 09/21/2026
Pictures: None
Next Steps: I'm going to finish off the report with the updated visualizations and an analysis of the findings
egcuriel commentedon Sep 29, 2026
Progress:
API calls
I realized that making individual API calls for translated title can be mitigated by:
Storage
Next steps
chinaexpert1 commentedon Oct 20, 2026
Please provide update @egcuriel
Instructions
You can use this template
egcuriel commentedon Oct 20, 2026
Progress: I've made a couple of changes since our last meeting regarding the structure and how the pipeline handles API requests, caching, and storage:
API
Cache
.json.gzfiles using an MD5 hash of the normalized URL and sorted parameters as the filename.Storage
read_jsonengine, which bypasses Python-level gzip decompression and JSON deserialization overhead entirely..json.gzfiles directly in memory and unnests them into normalized relational tables (pages,revisions,redirects,langlinks), while storing the source hash on each record so any row can be traced back to its raw API payload.Blockers: None, although researching each change has taken some time.
Availability: ~ 5 hours
ETA: 11/02/2026
Pictures (if necessary):
egcuriel commentedon Oct 27, 2026
Progress: I’m refactoring and comparing class-based and function-based implementations across the API, cache, database, and pipeline/notebook layers. The goal is to determine where classes improve state management and reuse, and where standalone functions provide a simpler design without unnecessary overhead.
Blockers: My laptop has been overheating, so I spent most of the week looking into what it could be.
Availability: 5 hours
ETA: 11/02/2026