把经济活动留下的痕迹,读成可追溯的分析
Vestigia 是一个个人研究平台,把全球贸易与能源的公开数据做成可交互的分析页面,并配一个只能用页面数据回答问题的 AI 助手。
这是什么
名字取拉丁语 vestigia(痕迹):贸易流、电力潮流、夜间灯光、海关提单,都是经济活动留下的痕迹。平台的工作是把这些痕迹读出来,并且让每一个读出来的结论都能被追溯、被交互验证、被复现。
它的位置介于三种东西之间,又不是其中任何一种:
| 它有 | 它没有 | |
|---|---|---|
| 数据门户Comtrade · OWID | 同样的原始数据 | 只给表格,不给分析 |
| 咨询报告 | 分析与结论 | 静态、国家级、不可追溯 |
| 学术论文 | 方法有文献支撑、可复现 | 一次性、不更新、无交互 |
原则:方法按文献,数据按原始来源,每张图可追溯到数据截止日,每个结论可交互验证。所有指标 —— 比较优势、复杂度、价值链位置、消费端碳强度 —— 都是从原始数据按公开公式在本地计算的,不是转载。
贸易与航运
一个国家卖什么、买什么、卖给谁、在全球生产网络里处于什么位置、货物实际怎么走。
能源
能源怎么定价、在国家间怎么流动、烧了多少碳、政策和事件如何改变这一切。
贸易与航运 bloc
六组数据源,六个视角,每个视角回答贸易的一个侧面。
UN Comtrade —— 谁卖什么给谁
| 页面 | 分析什么 | 能看出什么 |
|---|---|---|
| 国家档案Country profile | 出口、进口、差额;出口商品结构 treemap(可切 HS 2 位 / 4 位);前五大伙伴;页尾的结构演变:2015 年至今各行业出口的堆叠面积图 | 这个国家靠什么赚外汇,结构十年来往哪个方向移 |
| 贸易流向地图Trade map | 一国对每个伙伴的出口 / 进口 / 净额,地图着色 | 市场在哪、供应方在哪,地理上集中还是分散 |
| 专业化与集中度Specialisation & concentration | 全球国家 × 行业的显示性比较优势 RCA 热力图;出口集中度(HHI 与有效品类数) | 谁在哪些行业有真实优势;谁把鸡蛋放在一个篮子里 |
| 双边关系Bilateral | 任意两国间的进出口构成(桑基图)、双边差额、占各自贸易的比重 | 一对国家之间到底在交换什么 |
投入产出表 MRIO —— 在价值链的什么位置
| 页面 | 分析什么 | 能看出什么 |
|---|---|---|
| 全球价值链Global value chains | 每国每行业的上游度 / 下游度(Antràs 等 2012)、前向 / 后向关联、出口中的国内 / 国外增加值 DVA / FVA、双边增加值出口 VAX(Koopman-Wang-Wei 2014;Los & Timmer 2023) | 做原材料还是做最终组装;出口的价值里有多少是自己创造的;贸易额和增加值差多远 |
背后是 2000–4000 阶矩阵的 Leontief 逆,离线计算,每年只有 0.6 MB 结果。两套 MRIO 并列展示并标明使用哪一套 —— 行业分类不同、结论会有差异,平台不替读者挑。
经济复杂度 OEC —— 能力在哪、能往哪走
| 页面 | 分析什么 | 能看出什么 |
|---|---|---|
| 产品空间Product space | 1,231 个产品按共同出口概率连成的网络(Hidalgo 等 2007),一国已有优势的产品高亮 | 一国的能力在产品空间的哪个区域 |
| 升级机会Opportunities | 按接近度排序的、尚无优势但邻近的产品;ECI 与人均 GDP 的关系 | 从现有能力出发最可能的升级方向;复杂度与收入是否相称 |
美国海关提单 —— 货物实际怎么走
| 页面 | 分析什么 |
|---|---|
| 进口脉搏Import pulse | 逐月 TEU 与票数,按原产国分面 —— 美国从每个国家的进口在怎么变、转移去了哪 |
| 公司探查Company explorer | 单个进口商(IKEA、LG、Dole…)的月度量、原产国、港口、供应商 —— 一家公司的供应链长什么样 |
| 航运地图Flow map | 原产国 → 美国港口的流向弧线 |
| 港口监测Port monitor | 各港口的日级吞吐,季节与冲击 |
| 产品来源Product origins | 每个品类的进口来源构成矩阵 —— 某类商品依赖谁 |
| 出口脉搏 · 出口航线 · 谁在出口Export pulse · routes · who exports | 进口侧的镜像:出口去哪、走哪条航线、哪些州和公司在出口 |
夜光遥感 —— 经济活动的独立观测
| 页面 | 分析什么 |
|---|---|
| 夜光地图Night map | 2,588 个一级行政区的夜间灯光辐射。用作经济活动规模的独立观测,与贸易数据并列。平台明确不用夜光的变化推断经济变化。 |
能源 bloc
五个主题,九个页面。三个是「合页」:一个主题的多个区块按叙事顺序排列,有编号标题与跳转条。
主题 1 · 能源市场
| 页面 | 区块 | 分析什么 |
|---|---|---|
| 电力与燃料价格Power & fuel prices合页 · 5 节 | ① 日内形态 | 欧洲 12 个竞价区日前电价的 15 分钟级日内曲线 —— 正午光伏把价格压到零下,傍晚净负荷把它推回去 |
| ② 负电价 | 各区负价小时占比与最深负价 —— 过剩可再生能源在市场上的样子 | |
| ③ 价格波动 | 跨天的日均价与波动 | |
| ④ 市场耦合 | 各边界价差落在 ACER 三档(<1 / 1–10 / >10 EUR/MWh)的小时占比 —— 欧洲电力市场有多「一体」 | |
| ⑤ 商品与燃料 | 定价的燃料(WTI、布伦特、Henry Hub)。数据源 FRED 目前从本服务器被拒绝连接,页面如实标注而非留白 | |
| 能源股票Energy equities | 10 只标的分三组:化石(XLE / XOP / OIH / BTU)、清洁(TAN / FAN / ICLN / URA)、商品期货(USO / UNG)—— 金融市场如何给「化石 vs 转型」定价 |
主题 2 · 能源贸易
| 页面 | 分析什么 |
|---|---|
| 双边能源贸易Bilateral energy trade | HS 27 章(矿物燃料):一国的燃料进出口、按煤 / 原油 / 成品油 / 天然气含 LNG / 电力的品目构成、前 12 大来源与市场、2015 年至今月度走势 |
| 供应链集中度Supply concentration | 化石燃料、转型技术(光伏组件、电池、风机)、关键矿产三层的供应商集中度(HHI 与有效供应商数)—— 一个能源系统「靠的东西」有几个卖家 |
主题 3 · 能源与环境
| 页面 | 区块 | 分析什么 |
|---|---|---|
| 发电结构与清洁度Generation mix & cleanliness合页 · 3 节 | ① 各国主力能源 | 212 国现在靠什么发电(地图) |
| ② 结构演变 | 1900 年至今的发电结构变迁 | |
| ③ 清洁度排行 | 碳强度、可再生占比、人均用电排名 | |
| 全球光伏Global solar | 绝对发电量地图与占比地图并列(两者排序几乎不同),加「纬度 vs 光伏占比」散点 —— 太阳最好的地方不是装得最多的地方 | |
| 碳核算与碳市场Carbon accounts & markets合页 · 4 节 | ① 碳核算 | 215 国 CO₂ 账户 1950–2023:生产端 vs 消费端排放,差额 = 贸易内含碳;按燃料分解;六个指标的国家排名 |
| ② 电力碳强度 | 12 个欧洲区当日 15 分钟碳强度 | |
| ③ 碳市场 | 三个配额价格代理(CO2.L 实物 EUA、KCCA、KRBN),并解释配额与碳信用的区别 | |
| ④ 电网碳追踪 | 平台原创:用 Bialek 潮流追踪(Leontief 逆)在 27 个欧洲国家节点上按小时求解「你用的电是谁发的」,得到消费端碳强度与生产端的差额。奥地利 +71(夜间 +109)、斯洛伐克 +128、德国 −35。差额地图、24 小时 × 27 国热力图、任一国的供电来源分解。四道校验门、与 Electricity Maps 独立实现的对比(r = 0.967)以及瑞士 / 瑞典 / 挪威的数据局限,都写在页内 |
主题 4 · 能源政策
| 页面 | 区块 | 分析什么 |
|---|---|---|
| 政策与要闻Policy & news合页 · 2 节 | ① 官方发布 | 美国 EIA / DOE、英国 DESNZ、欧盟 ACER、IEA 的新闻稿,与行业媒体分栏,每 3 小时刷新 |
| ② 政策事件与电价 | 俄乌战争、伊比利亚例外机制、法国核电大修、德国核电退出四个事件前后的电价事件研究 |
主题 5 · 能源研究
| 页面 | 分析什么 |
|---|---|
| 研究项目Research projects | 登记进行中的论文(显示性韧性、夜光全球版、能源·环境·经济),可读设计文档,链接到平台上对应的数据页。改一个 JSON 即可加项目。 |
AI 助手
两个 bloc 各有一个助手(Kimi K2.6),只能通过平台自己的工具查数据回答,不能凭记忆给数字 —— 答案里的每个数字都能追溯到一次工具调用。贸易 bloc 18 个工具,能源 bloc 21 个。
- 经 23 题分层评测(纯查询 / 排序 / 多步派生 / 判断 / 能力边界):数值接地率 97.8%,多步题工具路由 100%,对数据覆盖不到的问题正确拒答
- 对话历史保存在浏览器本地;服务器不保存提问
- 面板可展开为右侧栏,长回答不被截断
可信度设计
可信不是「都对」,是「哪里不确定说清楚」。以下是平台层面的机制,不是逐张图手写的。
每张卡片底部小字:发布方、数据集、许可、数据截至。「数据截至」由各数据集当前的最新日期实时生成。点开可见全站来源清单,分「本地构建 / 实时抓取 / 暂不可用」。
MRIO 上线前过六类会计恒等式;Comtrade 下载后跑对账脚本;电网碳追踪有四道门并与独立实现交叉核对。任一不过就停,不进页面。
燃料价格页写着数据源被拒绝连接的原因,而不是留白;瑞士的碳强度局限写在页面上。
Comtrade 镜像不对称;提单只覆盖集装箱;出口舱单换过三次格式;夜光的极昼缺月;ADB 与 OECD 国家代码不同。
可以用来做什么
论文的数据面(显示性韧性直接用双边能源贸易页;碳研究用电网碳追踪引擎);方法验证流程可复用到新数据;几秒钟回答「越南在价值链的位置变了没有」这类问题。
每页既有图又有方法说明与文献出处:RCA 怎么算、上游度是什么、消费端碳核算为什么和生产端不同。中英双语。
同时展示数据工程(22 GB Comtrade 的下载、对账与防封)、经济学方法、遥感、可视化与 AI 工程 —— 每一处写明边界。
电价每天两次、碳账户每月、提单随源更新、新闻每 3 小时;页面自动反映最新日期。
电网碳追踪引擎与数据无关:换美国 83 个平衡区、澳大利亚 5 分钟数据、或全球月度矩阵是同一套代码。新页面只需一个 data-src,来源标注、表格视图、双语、助手工具都是现成机制。
技术架构
- 存储:Parquet 文件 + DuckDB 内存查询,没有传统数据库。价值链全部结果 11 MB;Comtrade 5.2 亿行在 0.5 秒内聚合。上线需带 7 GB,18 GB 原始数据留在计算端。
- 计算与服务分离:重算(Leontief 逆、潮流追踪)离线跑,只同步结果;缓存按文件修改时间失效,定时任务更新后页面无需重启。
- 前端:原生 ES module,无构建步骤;共享色板经色觉与对比度六项检查;每次改动用无头浏览器逐页验证。
- 抓取礼仪:同一主机最小间隔、429 退避、失败记忆、持久化缓存 —— 对免费公共数据源的基本尊重。
Reading the traces economic activity leaves behind
Vestigia is a personal research platform that turns open trade and energy data into traceable, interactive analysis pages, with an AI assistant that can only answer from the platform's own data.
What it is
The name is Latin for traces: trade flows, power flows, night-time lights and customs manifests are all traces of economic activity. The platform's job is to read them — and to make every reading traceable, interactively checkable and reproducible.
It sits between three familiar things without being any of them:
| Has | Lacks | |
|---|---|---|
| Data portalsComtrade · OWID | The same primary data | Tables only, no analysis |
| Consulting reports | Analysis and conclusions | Static, country-level, untraceable |
| Academic papers | Published methods, reproducible | One-off, unrefreshed, non-interactive |
Principle: methods from the literature, data from primary sources, every chart traceable to a data-through date, every conclusion checkable by interaction. Every indicator — comparative advantage, complexity, value-chain position, consumption-based carbon intensity — is computed locally from primary data with published formulas, never republished.
Trade & Shipping
What a country sells and buys, to whom, where it sits in global production networks, and how goods physically move.
Energy
How energy is priced, how it flows between countries, how much carbon it emits, and what policy and events do to all of that.
Trade & Shipping bloc
Six data sources, six lenses; each answers one facet of trade.
UN Comtrade — who sells what to whom
| Page | What it analyses | What it shows |
|---|---|---|
| Country profile | Exports, imports, balance; export structure treemap (HS 2- or 4-digit); top five partners; and, at the bottom, structure over time — a stacked area of exports by sector since 2015 | What the country earns its foreign exchange from, and which way its structure has drifted over a decade |
| Trade map | One reporter's exports / imports / net balance with every partner, on a map | Where its markets and suppliers are; concentrated or dispersed |
| Specialisation & concentration | Revealed comparative advantage (RCA) heatmap, countries × sectors; export concentration (HHI and effective number of products) | Who has real advantage in which sectors; who keeps all their eggs in one basket |
| Bilateral | Composition of trade between any two countries (Sankey), bilateral balance, share of each side's trade | What a pair of countries actually exchange |
Input-output tables (MRIO) — where in the value chain
| Page | What it analyses | What it shows |
|---|---|---|
| Global value chains | Upstreamness / downstreamness per country-industry (Antràs et al. 2012), forward / backward linkages, domestic vs foreign value added in exports (DVA / FVA), bilateral value-added exports VAX (Koopman-Wang-Wei 2014; Los & Timmer 2023) | Raw materials or final assembly; how much of export value is really home-made; how far gross trade and value added diverge |
Underneath is the Leontief inverse of a 2,000–4,000 × 2,000–4,000 matrix, computed offline into 0.6 MB per year. Two MRIO sources are shown side by side and labelled — their sector classifications differ and so do their conclusions; the platform does not choose for the reader.
Economic complexity (OEC) — what a country can do, and what is nearby
| Page | What it analyses | What it shows |
|---|---|---|
| Product space | A network of 1,231 products linked by co-export probability (Hidalgo et al. 2007), with a country's current advantages highlighted | Which region of the product space a country's capabilities occupy |
| Opportunities | Products the country lacks advantage in, ranked by proximity to what it has; ECI against GDP per capita | The most reachable upgrading paths; whether complexity matches income |
US customs manifests — how goods actually move
| Page | What it analyses |
|---|---|
| Import pulse | Monthly TEU and shipments, faceted by origin — how US imports from each country are shifting, and where they moved to |
| Company explorer | One importer (IKEA, LG, Dole…): monthly volume, origins, ports, suppliers — the shape of a company's supply chain |
| Flow map | Origin country → US port arcs |
| Port monitor | Daily throughput per port; seasonality and shocks |
| Product origins | Import-source matrix per product category — who a product class depends on |
| Export pulse · routes · who exports | The import side mirrored: where exports go, by which route, and which states and companies ship them |
Nightlights — an independent read on activity
| Page | What it analyses |
|---|---|
| Night map | Night-time light radiance across 2,588 first-level administrative regions, used as an independent read on the scale of economic activity alongside trade data. The platform deliberately does not infer economic change from nightlight change. |
Energy bloc
Five themes, nine pages. Three are composite views: several blocks in a deliberate reading order, with numbered headings and a jump bar.
Theme 1 · Energy markets
| Page | Block | What it analyses |
|---|---|---|
| Power & fuel pricescomposite · 5 blocks | ① Shape of a day | 15-minute intraday day-ahead prices for 12 European bidding zones — midday solar pushes prices below zero, evening net load pushes them back |
| ② Negative prices | Share of hours below zero per zone and the deepest price — what surplus renewables look like in a market | |
| ③ Volatility | Daily means and dispersion across days | |
| ④ Market coupling | Share of hours each border's price spread falls in ACER's three bands (<1 / 1–10 / >10 EUR/MWh) — how integrated the European market really is | |
| ⑤ Commodities | The fuels that set the price (WTI, Brent, Henry Hub). The FRED source currently refuses connections from this server; the page says so rather than showing nothing | |
| Energy equities | Ten instruments in three groups: fossil (XLE / XOP / OIH / BTU), clean (TAN / FAN / ICLN / URA), commodity futures (USO / UNG) — how financial markets price "fossil vs transition" |
Theme 2 · Energy trade
| Page | What it analyses |
|---|---|
| Bilateral energy trade | HS chapter 27 (mineral fuels): a country's fuel imports and exports, split by coal / crude / refined products / gas incl. LNG / electricity, top 12 sources and markets, monthly path since 2015 |
| Supply concentration | Supplier concentration (HHI and effective number of suppliers) across three layers — fossil fuels, transition technology (PV modules, batteries, turbines), critical minerals — how many sellers the things an energy system runs on actually have |
Theme 3 · Energy & environment
| Page | Block | What it analyses |
|---|---|---|
| Generation mix & cleanlinesscomposite · 3 blocks | ① Leading fuel | What 212 countries run on today (map) |
| ② How mixes changed | Generation structure since 1900 | |
| ③ Cleanest grids | Rankings by carbon intensity, renewable share, electricity per capita | |
| Global solar | Absolute solar output and solar share mapped side by side (their rankings barely overlap), plus a latitude-vs-share scatter — the sunniest places are not where the panels are | |
| Carbon accounts & marketscomposite · 4 blocks | ① Carbon accounting | National CO₂ accounts for 215 countries, 1950–2023: production- vs consumption-based emissions, the gap being carbon embodied in trade; split by fuel; rankings on six metrics |
| ② Grid carbon intensity | Today's 15-minute intensity for 12 European zones | |
| ③ Carbon markets | Three allowance-price proxies (CO2.L physical EUA, KCCA, KRBN), with the allowance-vs-credit distinction explained | |
| ④ Grid carbon tracing | The platform's original analysis: Bialek flow tracing (a Leontief inverse) solved hourly on 27 European country nodes to answer "who generated the electricity you use", giving consumption intensity against production. Austria +71 (+109 at night), Slovakia +128, Germany −35. A gap map, a 24-hour × 27-country heatmap, and any country's supply by origin. Four validation gates, an r = 0.967 match against Electricity Maps' independent implementation, and the Swiss / Swedish / Norwegian data limits are all stated on the page |
Theme 4 · Energy policy
| Page | Block | What it analyses |
|---|---|---|
| Policy & newscomposite · 2 blocks | ① Official releases | Press releases from US EIA / DOE, UK DESNZ, EU ACER and the IEA, kept apart from trade press; refreshed every 3 hours |
| ② Policy events & prices | Event studies of power prices around four events: the invasion of Ukraine, the Iberian exception, French nuclear outages, Germany's nuclear exit |
Theme 5 · Energy research
| Page | What it analyses |
|---|---|
| Research projects | A shelf of papers in progress (revealed resilience, global nightlights, energy · environment · economy) with readable design documents and links to the platform pages they draw on. Adding a project is a JSON edit. |
AI assistant
Each bloc has an assistant (Kimi K2.6) that can only answer through the platform's own data tools — never from memory — so every number in an answer traces to a tool call. 18 tools on the trade bloc, 21 on energy.
- Evaluated on 23 questions across five tiers (lookup / ranking / multi-step derivation / judgement / capability probes): 97.8% of numbers grounded, 100% tool routing on multi-step questions, correct refusal where the data does not reach
- Conversation history stays in the browser; the server stores no questions
- The panel expands into a side drawer so long answers are never truncated
Built for trust
Trust is not "everything is right"; it is "where it is uncertain, it says so." These are platform mechanisms, not captions written chart by chart.
Small print under every card: publisher, dataset, licence, data through. The date is generated live from what each dataset currently holds. One click opens the full source list, grouped as built locally / fetched live / unavailable.
MRIO tables pass six accounting identities before use; Comtrade downloads are reconciled by script; grid carbon tracing has four gates and an independent cross-check. Any failure stops the pipeline.
The fuels page says why its source refuses connections instead of showing a blank; the Swiss intensity limit is on the page.
Comtrade mirror asymmetry; manifests cover containers only; export files changed layout three times; nightlight polar gaps; ADB and OECD country codes differ.
What it is for
A data surface for papers (revealed resilience uses the bilateral energy page; carbon work uses the tracing engine); reusable validation pipelines; seconds to answer "has Vietnam's value-chain position moved?"
Every page pairs charts with method notes and citations: how RCA is computed, what upstreamness means, why consumption-based carbon differs from production. Bilingual.
End-to-end data work in one place — data engineering (22 GB of Comtrade downloaded, reconciled, rate-limited), economic methods, remote sensing, visualisation, AI engineering — with limits stated everywhere.
Prices twice daily, carbon accounts monthly, manifests as published, news every 3 hours; pages show the latest date automatically.
The tracing engine is data-agnostic: the US grid's 83 balancing authorities, Australia's 5-minute data, or a global monthly matrix run on the same code. A new page needs one data-src; attribution, table views, bilingual text and assistant tools are existing mechanisms.
Architecture
- Storage: Parquet files queried in place by DuckDB; no database server. The entire value-chain layer is 11 MB; 520 million Comtrade rows aggregate in half a second. 7 GB ships to a deployment; 18 GB of raw source stays on the compute side.
- Compute separated from serving: heavy work (Leontief inverses, flow tracing) runs offline and only results sync; caches key on file modification time, so cron refreshes reach pages without restarts.
- Frontend: native ES modules, no build step; a shared palette validated on six colour-vision and contrast checks; every change verified page by page in a headless browser.
- Fetch etiquette: per-host minimum gaps, 429 back-off, failure memory, persistent caching — basic respect for free public sources.