05 Consumption Analysis

Interfaces implemented in this chapter are listed below; uncovered indicators are noted under “To be added” at the end.

Total retail sales of consumer goods

Interface: macro_china_consumer_goods_retail

Source URL: http://data.eastmoney.com/cjsj/xfp.html

Description: East Money — economic data — total retail sales of consumer goods

Limits: Returns all historical data in a single call

Input

Name Type Description
- - -

Output

Name Type Description
Month object -
Current month float64 Unit: 100 million yuan
YoY growth float64 Unit: %
MoM growth float64 Unit: %
Cumulative float64 Unit: 100 million yuan
Cumulative-YoY float64 Unit: %

Example

import meshare as ms

macro_china_consumer_goods_retail_df = ms.macro_china_consumer_goods_retail()
print(macro_china_consumer_goods_retail_df)

Sample data

     Month       Current month  YoY growth       MoM growth        Cumulative  Cumulative-YoY
0    Oct 2022  40271.0  -0.5   6.692277  360575.0      0.6
1    Sep 2022  37745.0   2.5   4.101164  320305.0      0.7
2    Aug 2022  36258.0   5.4   1.081684  282560.0      0.5
3    Jul 2022  35870.0   2.7  -7.413143  246302.0     -0.2
4    Jun 2022  38742.0   3.1  15.485736  210432.0     -0.7
..         ...      ...   ...        ...       ...      ...
162  May 2008   8703.5  21.6   6.896340   42400.7     21.1
163  Apr 2008   8142.0  22.0   0.231436   33697.2     21.0
164  Mar 2008   8123.2  21.5  -2.770895   25555.2     20.6
165  Feb 2008   8354.7  19.1  -7.960517   17432.0     20.2
166  Jan 2008   9077.3  21.2   0.687720    9077.3     21.2

CPCA passenger-car wholesale / retail

Interface: car_market_total_cpca

Source URL: http://data.cpcadata.com/TotalMarket

Description: CPCA overall market monthly data. Supports production, wholesale, retail, and export for narrow- and broad-sense passenger cars; high-frequency consumption tracking commonly uses wholesale and retail of “narrow-sense passenger cars”. The returned table compares the current year with the prior year (10,000 units).

Limits: Returns current-year and prior-year monthly data for the specified symbol and indicator in a single call

Input

Name Type Description
symbol str Chinese API labels: 狭义乘用车 (narrow passenger cars, default) or 广义乘用车 (broad)
indicator str Chinese API labels: 产量 (production) / 批发 (wholesale) / 零售 (retail, default) / 出口 (export)

Output

Name Type Description
Month object e.g. 1月12月 (Jan–Dec; Chinese labels from API)
{prior year}年 float64 Prior-year column (Chinese year suffix); unit: 10,000 units
{current year}年 float64 Current-year column (Chinese year suffix); unit: 10,000 units; unpublished months may be empty

Example

import meshare as ms

retail = ms.car_market_total_cpca(symbol="狭义乘用车", indicator="零售")
wholesale = ms.car_market_total_cpca(symbol="狭义乘用车", indicator="批发")
print(retail)
print(wholesale)

CAAM auto production and sales

Interface: car_sale_caam

Source URL: http://www.caam.org.cn/ ;https://sou.chinanews.com.cn/

Description: China Association of Automobile Manufacturers (CAAM) monthly auto production and sales. Official “brief analysis of auto industry production and sales” pages are mostly image-based; this interface follows CAAM production/sales column months and extracts current-month / cumulative volumes and YoY (decline is negative) from China News Service reprints. Coverage depends on column lists and how long search hits remain available.

Limits: By default looks back about the most recent 36 months that can be parsed

Input

Name Type Description
max_months int Max months to look back; default 36
max_pages int Max pages to scan in the CAAM column list; default 15

Output

Name Type Description
Month object e.g. 2026-05
Production-Current month float64 Unit: 10,000 units
Sales-Current month float64 Unit: 10,000 units
Production-Current month YoY float64 Unit: %
Sales-Current month YoY float64 Unit: %
Production-Cumulative float64 Unit: 10,000 units
Sales-Cumulative float64 Unit: 10,000 units
Production-Cumulative YoY float64 Unit: %
Sales-Cumulative YoY float64 Unit: %
Source URL object Reprint or CAAM original URL

Example

import meshare as ms

df = ms.car_sale_caam()
print(df.tail())

df = ms.car_sale_caam(max_months=12)
print(df[["月份", "产量-当月值", "销量-当月值", "销量-当月同比"]])

Consumer confidence index

Interface: macro_china_xfzxx

Source URL: https://data.eastmoney.com/cjsj/xfzxx.html

Description: East Money — consumer confidence index

Limits: Returns all historical data in a single call

Input

Name Type Description
- - -

Output

Name Type Description
Month object -
Consumer confidence index-Value float64 -
Consumer confidence index-YoY float64 Unit: %
Consumer confidence index-MoM float64 Unit: %
Consumer satisfaction index-Value float64 -
Consumer satisfaction index-YoY float64 Unit: %
Consumer satisfaction index-MoM float64 Unit: %
Consumer expectation index-Value float64 -
Consumer expectation index-YoY float64 Unit: %
Consumer expectation index-MoM float64 Unit: %

Example

import meshare as ms

macro_china_xfzxx_df = ms.macro_china_xfzxx()
print(macro_china_xfzxx_df)

Sample data

      Month  Consumer confidence index-Value  ...  Consumer expectation index-YoY  Consumer expectation index-MoM
0    Sep 2022         87.2  ...    -28.995984      0.568828
1    Aug 2022         87.0  ...    -26.134454     -1.897321
2    Jul 2022         87.9  ...    -25.581395     -1.538462
3    Jun 2022         88.9  ...    -27.949327      3.762828
4    May 2022         86.8  ...    -30.063796      1.036866
..         ...          ...  ...           ...           ...
184  May 2007        112.8  ...      2.975654      0.351494
185  Apr 2007        112.3  ...      2.430243      1.426025
186  Mar 2007        111.0  ...      0.718133     -1.232394
187  Feb 2007        111.8  ...      2.805430     -0.525394
188  Jan 2007        112.4  ...      3.442029     -0.609225

Urban surveyed unemployment rate

Interface: macro_china_urban_unemployment

Source URL: https://data.stats.gov.cn/dg/website/page.html#/pc/national/monthData

Description: NBS — monthly data — urban surveyed unemployment rate

Limits: Returns all historical data in a single call

Input

Name Type Description
- - -

Output

Name Type Description
date object Year-month
item object -
value float64 -

Example

import meshare as ms

macro_china_urban_unemployment_df = ms.macro_china_urban_unemployment()
print(macro_china_urban_unemployment_df)

Sample data

       date               item value
0    201801  National urban unemployment rate, labor force aged 25–59    4.4
1    201801         National urban surveyed unemployment rate    5.0
2    201802         National urban surveyed unemployment rate    5.0
3    201802  National urban unemployment rate, labor force aged 25–59    4.5
4    201803         National urban surveyed unemployment rate    5.1
..      ...                ...   ...
283  202601    National urban local-hukou labor force unemployment rate    5.3
284  202601         National urban surveyed unemployment rate    5.2
285  202602    National urban migrant-hukou labor force unemployment rate    5.0
286  202602    National urban local-hukou labor force unemployment rate    5.4
287  202602         National urban surveyed unemployment rate    5.3
[288 rows x 3 columns]

Civil aviation passenger load factor and cargo load factor

Interface: macro_china_passenger_load_factor

Source URL: http://finance.sina.com.cn/mac/#industry-20-0-31-1

Description: NBS — civil aviation passenger load factor and cargo load factor

Limits: Returns all historical data in a single call

Input

Name Type Description
- - -

Output

Name Type Description
Period object Year-month
Passenger load factor float64 Unit: %
Cargo load factor float64 Unit: %

Example

import meshare as ms

macro_china_passenger_load_factor_df = ms.macro_china_passenger_load_factor()
print(macro_china_passenger_load_factor_df)

Sample data

     Period    Passenger load factor    Cargo load factor
0    2023.7  81.20  68.50
1    2023.6  78.60  69.30
2    2023.5  74.30  65.90
3    2023.4  75.90  66.10
4    2023.3  74.70  66.20
..      ...    ...    ...
202  2006.6  72.00  64.60
203  2006.5  71.30  64.40
204  2006.4  76.30  69.00
205  2006.3  72.40  67.50
206  2006.2  72.70  64.60
[207 rows x 3 columns]

To be added

Movie box office, metro ridership / congestion, and other high-frequency services-consumption proxies are not yet wrapped; the CAAM interface depends on news reprints, so coverage is limited by search retention.