{"id":50708503,"url":"https://github.com/fraware/ai_diffusion_state","last_synced_at":"2026-06-09T13:31:57.140Z","repository":{"id":358914395,"uuid":"1243671310","full_name":"fraware/ai_diffusion_state","owner":"fraware","description":"China's AI Industrialization Model and the Next Productivity Shock","archived":false,"fork":false,"pushed_at":"2026-05-28T18:48:24.000Z","size":12994,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T20:24:10.781Z","etag":null,"topics":["ai-diffusion","china","econometrics","economics-of-ai","empirical-economics","industrial-policy","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fraware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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-19T14:54:41.000Z","updated_at":"2026-05-28T19:42:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fraware/ai_diffusion_state","commit_stats":null,"previous_names":["fraware/ai_diffusion_state"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fraware/ai_diffusion_state","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraware%2Fai_diffusion_state","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraware%2Fai_diffusion_state/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraware%2Fai_diffusion_state/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraware%2Fai_diffusion_state/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fraware","download_url":"https://codeload.github.com/fraware/ai_diffusion_state/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraware%2Fai_diffusion_state/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34110011,"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-09T02:00:06.510Z","response_time":63,"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":["ai-diffusion","china","econometrics","economics-of-ai","empirical-economics","industrial-policy","python"],"created_at":"2026-06-09T13:31:56.421Z","updated_at":"2026-06-09T13:31:57.135Z","avatar_url":"https://github.com/fraware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cpre\u003e\n###############################################################################################\n#                                                                                             #\n#          _    ___   ____  _  __  __           _               ____  _        _              #\n#         / \\  |_ _| |  _ \\(_)/ _|/ _|_   _ ___(_) ___  _ __   / ___|| |_ __ _| |_ ___        #\n#        / _ \\  | |  | | | | | |_| |_| | | / __| |/ _ \\| '_ \\  \\___ \\| __/ _` | __/ _ \\       #\n#       / ___ \\ | |  | |_| | |  _|  _| |_| \\__ \\ | (_) | | | |  ___) | || (_| | ||  __/       #\n#      /_/   \\_\\___| |____/|_|_| |_|  \\__,_|___/_|\\___/|_| |_| |____/ \\__\\__,_|\\__\\___|       #\n#                                                                                             #\n#                                                                                             #\n###############################################################################################\n\u003c/pre\u003e\n\n**China's AI Diffusion State: Pilot Zones, Smart Factories, and Industrial Adoption**\n\nEmpirical pipeline for an NBER Economics of AI (China) brief measuring whether China's AI diffusion system—pilot zones, listed smart-factory recognition, hub-centered industrial adoption, and export-relevant manufacturing sectors—forms a coherent institutional chain.\n\n\u003c/div\u003e\n\n## Core empirical chain\n\n```text\nAI pilot zones → listed smart-factory recognition → hub-centered industrial AI diffusion → export-relevant manufacturing sectors\n```\n\n## Repository layout\n\n```text\nconfigs/           source registry, keywords, city aliases\ndata/\n  seed/            manually verified small tables (committed)\n  raw/             downloaded sources (gitignored)\n  interim/         parsed tables (gitignored)\n  processed/       analysis-ready tables (gitignored, built by scripts)\ndocs/\n  DATA_CONTRACTS.md\n  source_notes/\nscripts/           numbered pipeline entry points\nsrc/diffusion_state/\ntests/\noutputs/\n  tables/\n  figures/\n```\n\n## Quickstart\n\n```bash\ngit clone https://github.com/fraware/ai_diffusion_state.git\ncd ai_diffusion_state\npython -m venv .venv\n\n# Windows PowerShell\n.\\.venv\\Scripts\\Activate.ps1\n\n# macOS/Linux\nsource .venv/bin/activate\n\nmake setup\nmake seed\nmake test\n```\n\n`make setup` installs the package and dependencies (including `beautifulsoup4` for HTML parsing). Run it once per environment before `make build` or `make test`.\n\nOn Windows without GNU Make: `pip install -e .[dev]` then `python scripts/00_build_seed_tables.py` and `pytest -q`.\n\nGit Bash path note: use `cd ~/ai_diffusion_state` or `cd /c/Users/mateo/ai_diffusion_state`, not `cd c:\\Users\\...` (backslashes are stripped).\n\n## Pipeline commands\n\n| Command | Purpose |\n|---|---|\n| `make setup` | Editable install with dev dependencies |\n| `make seed` | Build verified tables (pilot zones) from `data/seed/` |\n| `make fetch` | Snapshot public HTML sources (network) |\n| `make build` | All analysis-ready tables available without raw downloads |\n| `make parse` | Parse smart-factory HTML when `data/raw/` is populated |\n| `make baci` | Download CEPII BACI HS17 (if needed) and build export outcomes |\n| `make panel` | Merge city-year analysis panel |\n| `make analysis` | Baseline regressions and event study |\n| `make test` | Schema and validation tests |\n\nTarget end state:\n\n```bash\n    make fetch \u0026\u0026 make build \u0026\u0026 make test \u0026\u0026 make analysis \u0026\u0026 make paper\n```\n\n## Data governance\n\n1. Never edit files under `data/raw/`.\n2. Do not commit large proprietary downloads.\n3. Every processed row must trace to a `source_url` or raw file.\n4. Inferred fields require confidence flags (smart-factory pipeline).\n5. Manual fixes go in seed or correction tables, not generated CSVs.\n6. Scripts must be idempotent; paper tables come from scripts, not notebooks.\n\n## Current status\n\n| Phase | Status |\n|---|---|\n| 0 — Repo activation | CI, tests, gitignore, Makefile |\n| 1 — Pilot zones | 17-zone seed → `pilot_zones.csv` with canonical schema |\n| 2 — Smart factories | 2024/2025 parsed (235+274); clean + city panels; city geo memo |\n| 3 — BACI exports | HS17 2017–2024 built from CEPII 202601 (`make baci`) |\n| 4 — City controls | Ingestion module ready; requires EPS/NBS export in `data/raw/city_controls/` |\n| 5 — Baseline analysis | Overlap tables, adoption models, event-study figure, memo v1 |\n| 6 — Paper integration | Outline, appendices, red-team memo, `make paper` manifest |\n\n## Priority order (if time is scarce)\n\n1. Pilot zones\n2. 2024 smart-factory list\n3. City-year adoption table\n4. Descriptive pilot-zone overlap\n5. BACI export outcomes\n6. City controls\n7. Event study\n\n## Documentation\n\n- [Research design](docs/research_design.md)\n- [Data dictionary](docs/data_dictionary.md) (legacy columns; see [DATA_CONTRACTS](docs/DATA_CONTRACTS.md))\n- [Pilot zone source notes](docs/source_notes/pilot_zones.md)\n- [Engineering brief](docs/engineering_brief.md)\n- [Reproducibility](docs/REPRODUCIBILITY.md)\n- [Paper outline](paper/outline.md)\n- [Paper results memo](paper/results_memo.md)\n- [Red-team memo](paper/red_team_memo.md)\n\n## License and data\n\nRaw BACI and EPS/NBS city statistics require separate download or license. See `configs/sources.yml` and `.env.example`.\n\n## Atlas IIDS patent evidence (appendix robustness; post-submission workstream)\n\nThe PCS measurement paper is **submission-ready**. The IIDS patent layer is real but **appendix-only**. The tiered patent geography layer is frozen at approximately **65.4%** city fill. Exact publication-number applicant-address geocoding remains unavailable. Publication-ready patent F1 and causal patent claims remain blocked. Atlas true-vision work is a **separate post-submission workstream**—not required for the NBER upload.\n\n| Command | Where |\n|---------|--------|\n| `make atlas-iids-workflow` | Control laptop — phase dashboard |\n| `make atlas-iids-preflight` | Control laptop — disk/credential checks |\n| `bash scripts/cloud_vm_bootstrap.sh` | Fresh Ubuntu VM — one-shot setup |\n| `make atlas-iids-cloud STEP=...` | Cloud VM — download + convert |\n| `make atlas-iids-import-copyback ARCHIVE=...` | Control laptop — after `scp` |\n| `make atlas-iids-control-evidence-chain` | Control laptop — after geography file |\n\nPlaybooks (post-submission):\n\n- [IIDS clean-restart runbook](docs/ATLAS_IIDS_CLEAN_RESTART_RUNBOOK.md)\n- [IIDS execution checklist](docs/ATLAS_IIDS_EXECUTION_CHECKLIST.md)\n- [Patent raw data README](data/raw/patents/README.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraware%2Fai_diffusion_state","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffraware%2Fai_diffusion_state","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraware%2Fai_diffusion_state/lists"}