03 基建分析

下列为本章已实现接口;未覆盖指标见文末「待补充」。

基础设施投资

接口: macro_china_infra_invest

目标地址: https://www.stats.gov.cn/sj/zxfb/

描述: 从国家统计局「全国固定资产投资基本情况」月度新闻稿正文抽取「基础设施投资」累计同比。近年稿件多为附注1口径(行业范围见各稿附注1,增速按可比口径);部分较早稿件为「不含电力、热力、燃气及水生产和供应业」的狭义表述。返回表含「口径」「来源链接」。国家数据月度库一般无此独立指标。覆盖范围取决于最新发布列表仍可访问的稿件。

限量: 扫描最新发布列表并解析命中的月度固投稿

输入参数

名称 类型 描述
max_pages int 扫描列表最大页数,默认 80

输出参数

名称 类型 描述
月份 object 累计期末月,如 2026-06 表示 1—6 月
基础设施投资累计同比 float64 单位: %;下降为负
口径 object 附注1口径 / 不含电力(狭义) / 其他表述
新闻标题 object -
来源链接 object 新闻稿 URL

接口示例

import meshare as ms

df = ms.macro_china_infra_invest()
print(df)

df = ms.macro_china_infra_invest(max_pages=40)
print(df[["月份", "基础设施投资累计同比", "口径", "来源链接"]])

建材指数

接口: macro_china_construction_index

目标地址: https://data.eastmoney.com/cjsj/hyzs_list_EMI00662541.html

描述: 建材指数数据, 数据区间从 20111205-至今

限量: 单次返回所有历史数据

输入参数

名称 类型 描述
- - -

输出参数

名称 类型 描述
日期 object -
最新值 int64 -
涨跌幅 float64 注意单位: %
近3月涨跌幅 float64 注意单位: %
近6月涨跌幅 float64 注意单位: %
近1年涨跌幅 float64 注意单位: %
近2年涨跌幅 float64 注意单位: %
近3年涨跌幅 float64 注意单位: %

接口示例

import meshare as ms

macro_china_construction_index_df = ms.macro_china_construction_index()
print(macro_china_construction_index_df)

数据示例

         日期   最新值       涨跌幅  ...    近1年涨跌幅     近2年涨跌幅     近3年涨跌幅
0     2011-12-05  1014       NaN  ...       NaN        NaN        NaN
1     2011-12-12  1013 -0.098619  ...       NaN        NaN        NaN
2     2011-12-19  1005 -0.789733  ...       NaN        NaN        NaN
3     2011-12-26   993 -1.194030  ...       NaN        NaN        NaN
4     2012-01-02   991 -0.201410  ...       NaN        NaN        NaN
          ...   ...       ...  ...       ...        ...        ...
3179  2024-03-31   962  0.000000  ... -8.901515 -25.077882 -23.285486
3180  2024-04-01   958 -0.415800  ... -9.280303 -25.505443 -23.726115
3181  2024-04-02   960  0.208768  ... -9.090909 -25.407925 -24.170616
3182  2024-04-03   960  0.000000  ... -9.176916 -25.407925 -24.170616
3183  2024-04-04   960  0.000000  ... -8.745247 -25.407925 -24.170616
[3184 rows x 8 columns]

建材价格指数

接口: macro_china_construction_price_index

目标地址: https://data.eastmoney.com/cjsj/hyzs_list_EMI00237146.html

描述: 建材价格指数数据, 数据区间从 20100615-至今

限量: 单次返回所有历史数据

输入参数

名称 类型 描述
- - -

输出参数

名称 类型 描述
日期 object -
最新值 int64 -
涨跌幅 float64 注意单位: %
近3月涨跌幅 float64 注意单位: %
近6月涨跌幅 float64 注意单位: %
近1年涨跌幅 float64 注意单位: %
近2年涨跌幅 float64 注意单位: %
近3年涨跌幅 float64 注意单位: %

接口示例

import meshare as ms

macro_china_construction_price_index_df = ms.macro_china_construction_price_index()
print(macro_china_construction_price_index_df)

数据示例

       日期        最新值    涨跌幅  ...    近1年涨跌幅   近2年涨跌幅  近3年涨跌幅
0     2010-06-15  1230.40       NaN  ...       NaN       NaN       NaN
1     2010-06-16  1245.10  1.194733  ...       NaN       NaN       NaN
2     2010-08-01  1281.60  2.931491  ...       NaN       NaN       NaN
3     2010-08-02  1214.90 -5.204432  ...       NaN       NaN       NaN
4     2010-08-03  1218.90  0.329245  ...       NaN       NaN       NaN
          ...      ...       ...  ...       ...       ...       ...
3841  2022-02-25  1099.01  1.567395  ...  1.467995  1.493295  2.177410
3842  2022-02-26  1088.05 -0.997261  ...  0.456094  0.481142  1.521824
3843  2022-02-27  1097.41  0.860255  ...  1.120479  1.345536  2.198733
3844  2022-02-28  1088.05 -0.852917  ...  0.977244  0.481142  1.549302
3845  2022-03-01  1097.41  0.860255  ...  1.419528  0.749139  2.051425

待补充

专项债进度、城投债净融资、水泥窑开工等尚待封装;基建官方增速见「基础设施投资」新闻稿抽取接口(覆盖受网站列表留存限制)。