SuperAPI AI 工具集

owid-metadata-generation

数据与分析

查看项目

更新于 10-16 09:49

技能介绍

用途:为 OWID ETL 数据集编写或丰富 *.meta.yml 元数据文件,适用于新建 garden/grapher 数据集、补充稀疏元数据、数据集刷新时更新元数据。不适用于快照元数据或单字段快速修改。

主要能力:提供逐字段规范,包括 title、presentation.title_public、title_variant、display.name、unit、short_unit、description_short、description_key、description_from_producer、description_processing、processing_level、topic_tags、numDecimalPlaces 等,并给出 YAML 结构与复用模式(definitions.common、锚点/别名、<<: *anchor、{definitions.xxx} 插值、Jinja 模板)。

使用方式:用 metadata-export 生成骨架,如 .venv/bin/etl metadata-export data/garden/<ns>/<ver>/<ds> --output /tmp/<ds>.meta.yml,不能不加 --show 或 --output 运行以免覆盖;检查数据与来源后自上而下撰写;用 INSTANT=1 .venv/bin/etlr data://grapher/<ns>/<ver>/<ds> --grapher --only 预览;运行 check-metadata-typos 检查拼写;可用 .venv/bin/python -c 列出有效 topic_tags。

限制:快照元数据与单字段编辑不适用;dataset 块通常省略;正文为字段指南,具体数据来源、数值与平台效果暂未提供。