{"id":51198231,"url":"https://github.com/schiste/wiki-economics","last_synced_at":"2026-06-27T22:31:31.311Z","repository":{"id":355235839,"uuid":"1227185912","full_name":"schiste/wiki-economics","owner":"schiste","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-02T14:19:05.000Z","size":543,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-02T16:24:23.757Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schiste.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-02T10:29:00.000Z","updated_at":"2026-05-02T14:19:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/schiste/wiki-economics","commit_stats":null,"previous_names":["schiste/wiki-economics"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/schiste/wiki-economics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schiste%2Fwiki-economics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schiste%2Fwiki-economics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schiste%2Fwiki-economics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schiste%2Fwiki-economics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schiste","download_url":"https://codeload.github.com/schiste/wiki-economics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schiste%2Fwiki-economics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34870654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-27T22:31:29.828Z","updated_at":"2026-06-27T22:31:31.300Z","avatar_url":"https://github.com/schiste.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wiki-economics\n\n`wiki-economics` is a Wikipedia research pipeline and dashboard for analyzing editor labor, content production, inequality, funnel health, and patrol behavior across Wikipedia language editions.\n\nThe repository currently has three main parts:\n\n- A Rust CLI for fetch, ingest, compute, merge, and benchmarking workflows.\n- A Python sidecar pipeline for patrol logging data.\n- An Observable Framework site for publishing the resulting datasets and charts.\n\nThe repo now supports two runtime profiles from the same codebase:\n\n- `local`: interactive development, local data onboarding, and the dev/operator admin UI\n- `production`: static public dashboard serving, scheduled refresh orchestration for a VPS, and an optional authenticated admin surface\n\n## Repository Status\n\nThis repository is curated for a public open-source release. Source code, documentation, vendored patches, lockfiles, and quality gates are tracked here; generated data, local caches, build outputs, and installed dependencies are intentionally excluded from version control.\n\n## One-Command Setup\n\nFor a friendlier local bootstrap, run:\n\n```sh\n./scripts/setup.sh\n```\n\nor:\n\n```sh\nnpm run setup\n```\n\nThat script will:\n\n- check or install the main system dependencies when it can\n- ensure the Rust toolchain and optional contributor cargo tools are present\n- install the dashboard dependencies\n- create the local `data/` and `output/` directories\n- build the Rust CLI and Observable dashboard\n\nUseful flags:\n\n```sh\n./scripts/setup.sh --skip-quality-tools\n./scripts/setup.sh --skip-system-packages\n./scripts/setup.sh --yes\n```\n\n## Quick Start\n\nPrerequisites:\n\n- Rust stable with `rustfmt` and `clippy`\n- Python 3\n- Node.js and npm\n- DuckDB CLI for dashboard artifact generation\n\nThis repository does not bundle Wikimedia datasets or precomputed dashboard outputs. A clean clone starts with no `data/` or `output/` tree; fetch and compute those locally.\n\nThe current public release is intentionally Wikipedia-first. The admin picker covers every Wikipedia language edition published in the Wikimedia history dumps; the CLI still rejects monthly-partitioned giants such as `enwiki` until the dedicated fetch planner for those projects lands.\n\nBuild the Rust CLI:\n\n```sh\ncargo build --release\n```\n\nRun a small end-to-end refresh:\n\n```sh\n./scripts/refresh.sh frwiki\n```\n\nExpanded equivalent:\n\n```sh\ncargo run --release -- fetch frwiki\ncargo run --release -- ingest frwiki\ncargo run --release -- compute frwiki\ncargo run --release -- merge\n```\n\nPass `--version YYYY-MM` to `fetch` or `run` when you need a specific dump snapshot. If omitted, the CLI defaults to the previous UTC month.\n\nBuild the production site against the current local artifacts:\n\n```sh\n./scripts/build-site.sh\n```\n\nThe Observable site reads generated dashboard artifacts from `site/src/data -\u003e ../../output`. Build `output/` locally before expecting the dashboard pages to render real data.\n\nStart the local dashboard and admin server together:\n\n```sh\nscripts/dev.sh\n```\n\nIn local development, the admin API is a loopback-only operator tool. In VPS deployments, the supported hosted admin model is an authenticated OpenID Connect login flow with an env-driven email allowlist. No in-repo user database is used.\n\nFor hosted deployments, keep the allowlist and OIDC credentials in deployment\nsecrets and render them into `/etc/wiki-economics.env`; the recommended secret\nnames match the runtime env vars exactly (`WIKI_ECON_ADMIN_ALLOWED_EMAILS`,\n`WIKI_ECON_ADMIN_SESSION_SECRET`, and so on).\n\n## Local Verification\n\nPreferred full local verification command:\n\n```sh\n./scripts/ci-local.sh\n```\n\nEquivalent expanded commands:\n\n```sh\nbash -n scripts/*.sh scripts/lib/*.sh site/data-build/*.sh deploy/cloud-vps/*.sh\nnode --check site/admin-auth.cjs\nnode --check site/admin-server.cjs\nnode --check site/observablehq.config.js\nnode --test site/admin-auth.test.cjs\nnode --test site/admin-server.test.cjs\n./scripts/build-site.sh --help\n./scripts/refresh.sh --help\ncargo fmt --all -- --check\ncargo clippy --all-targets --all-features -- -D warnings\ncargo test --all-targets --all-features\ncargo doc --no-deps\ncargo llvm-cov --workspace --all-features --all-targets --lcov --output-path /tmp/wiki-economics-target/llvm-cov.info\npython3 scripts/check_lcov.py /tmp/wiki-economics-target/llvm-cov.info\ncargo deny check advisories bans licenses sources\ncargo audit -D warnings\nscripts/check_vendor_polars.sh\npython3 -m py_compile scripts/fetch_patrol.py scripts/compute_patrol.py scripts/check_lcov.py scripts/test_fetch_patrol.py scripts/test_check_lcov.py\npython3 -m unittest discover -s scripts -p 'test_*.py'\n```\n\n## Project Guides\n\n- [Architecture](docs/architecture.md)\n- [Admin Server](docs/admin-server.md)\n- [Cloud VPS Deployment](docs/cloud-vps-deploy.md)\n- [Development](docs/development.md)\n- [Benchmarking](docs/benchmarking.md)\n- [Dependencies and Licenses](docs/dependencies-and-licenses.md)\n- [Publishing](docs/release.md)\n- [Security Model](docs/security.md)\n- [Stack and Data Sources](docs/stack-and-data-sources.md)\n- [Troubleshooting](docs/troubleshooting.md)\n\n## Platform Notes\n\n- macOS and Linux are first-class platforms. CI runs on `ubuntu-latest`\n  and the developer-side flow is exercised on macOS.\n- Windows is supported on a best-effort basis. `site/src/data` is a\n  symlink to `../../output`, which requires Developer Mode or\n  `git config core.symlinks true` to clone correctly. See the\n  troubleshooting guide for details.\n\n## Data and Artifacts\n\n- `data/` is fetched or generated locally and is intentionally not committed.\n- `output/` is generated locally and feeds the dashboard via `site/src/data -\u003e ../../output`.\n- `site/data-build/` contains the checked-in generator scripts that materialize `manifest.json` and `defaults_*.json` into the active output directory.\n- `site/dist/` and `site/node_modules/` are build artifacts and local dependencies.\n\nIf you need small permanent fixtures for tests, add them deliberately rather than checking in ad hoc working data.\n\n## License\n\nLicensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or [MIT license](LICENSE-MIT), at your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschiste%2Fwiki-economics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschiste%2Fwiki-economics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschiste%2Fwiki-economics/lists"}