← Blog

When the Data Doesn't Exist: Modelling China Gas Demand by Sector

In my previous post, I called dashboards one of the lowest-hanging fruits for analysts using AI. Once the data exists, an AI agent can turn it into something useful remarkably quickly.

But what happens when the data you want does not exist?

The missing dataset

I wanted to see China’s monthly gas demand split into four sectors:

  • Power
  • Industry and chemicals
  • Buildings and city gas
  • Transport

JODI publishes China’s monthly gas balance, but it does not provide demand by sector. The IEA publishes annual sector data, but not the monthly history I wanted. I also did not have access to paid data.

So I gave the AI agent this prompt:

Model monthly China gas demand by sector: power, industrial, residential and commercial heating, and transport. I have no paid subscriptions. Be creative and work with data you can find online, including Chinese sources.

Twenty-four minutes later, the first version of the dashboard was online.

The agent’s workaround

The agent could not find a public monthly sector-consumption dataset because there wasn’t one. Instead, it combined three different public sources:

  1. JODI provided the monthly total for China.
  2. The IEA China natural gas page provided the 2023 annual gas-consumption split.
  3. Carbon Monitor China provided daily provincial carbon emissions for power, industry, residential buildings and ground transport.

The clever part was how it used Carbon Monitor.

The model does not convert carbon emissions into gas consumption. That would be misleading because emissions can come from coal, oil and other fuels. Instead, it uses emissions as an activity indicator: was this sector more or less active than normal during that month?

The agent aggregated Carbon Monitor’s daily provincial data into national monthly totals. It then compared each sector with its trailing 12-month average.

An index of 1.00 means activity was close to normal. An index of 1.20 means it was about 20% above its recent average.

The calculation is:

sector weight
= 2023 annual anchor share
× Carbon Monitor monthly activity index

monthly sector share
= sector weight
÷ total of all four sector weights

modeled sector demand
= JODI monthly apparent demand
× monthly sector share

The four sectors are therefore always scaled back to the monthly JODI total.

A numerical example

For March 2026, JODI reported apparent demand of 33.554 bcm.

The starting 2023 sector shares were:

  • Power and residual: 24.2%
  • Industry and chemicals: 46.0%
  • Buildings and city gas: 21.2%
  • Transport: 8.6%

Carbon Monitor showed buildings activity at 1.39 times its recent average in March. After adjusting and normalising all four sectors, the buildings share increased from its 21.2% annual anchor to 26.9%.

The model therefore allocated around 9.0 bcm of March’s apparent demand to buildings and city gas.

This is not an observation of actual building-sector gas meters. It is an estimate constrained by a known monthly total.

Finding and processing the data

The research process was not completely smooth.

The Chinese National Bureau of Statistics API was blocked by its web firewall. The first Carbon Monitor download address returned a 404. The agent inspected the website’s code, found the underlying dataset endpoint and downloaded a roughly 19 MB file containing daily provincial observations.

It then wrote the transformation script, created the charts and table, checked that all 87 historical months reconciled with JODI, tested the page on desktop and mobile, and published it.

The largest reconciliation difference was 0.001 bcm, caused by rounding.

That entire first pass took 24 minutes.

The first model was too confident

The first working version was impressive, but it was not yet a model I would trust.

Initially, the agent used an IEA electricity and CHP split that it said came from the IEA data browser. When I asked for the exact public source, it could not produce a link showing those figures.

The agent admitted that this part was weakly sourced and removed it.

The power category was rebuilt as a residual:

Power / residual
= JODI 2023 apparent demand
− visible IEA industry, buildings and transport demand

This is much more honest, but it also changes how the result should be read. The residual contains power demand, but it may also contain energy-system use, statistical differences and unobserved storage movements. It is not a clean measure of gas-fired power generation.

Apparent demand is not end-use demand

I also challenged the use of JODI calculated demand as the control total.

China’s reported stock change in this JODI extract is always zero. That probably does not mean China never injects gas into or withdraws gas from storage. It means the model cannot separate those movements.

If China is building stocks, actual gas burned by the four sectors will be lower than JODI apparent demand. If China is withdrawing stocks, actual sector demand will be higher.

The dashboard was therefore renamed the China Gas Apparent Sector Demand Model. Its labels and methodology now state clearly that this is a historical allocation model, not official sector-consumption data.

The categories do not match perfectly

The final dashboard also shows exactly how the sources are mapped:

  • IEA Industry plus Non-energy use maps to Industrial and chemical demand.
  • IEA Residential plus Commercial and public services maps to Buildings and city gas.
  • IEA Transport maps to Transport.
  • The remaining JODI volume becomes Power and residual.

Carbon Monitor’s categories are then used only to shape those buckets month by month.

For example, Carbon Monitor has a Residential category but no separate commercial-services proxy. Residential emissions therefore shape the entire buildings bucket. Its Power category shapes the broader power-and-residual bucket.

These are imperfect mappings, but they are visible and open to challenge.

What the agent did—and what I did

The AI agent found the data, worked around broken endpoints, wrote the transformation logic, built the interface, tested it and published it.

My role was to challenge what the numbers meant.

I questioned the original IEA inputs, the treatment of storage, the power label, the category mapping and the normalisation calculation. Each challenge made the model less confident, but more useful.

That is the part of working with AI agents that interests me most. The speed is real: a working public dashboard appeared in 24 minutes. But speed does not remove the need for commodity knowledge. It makes that knowledge more important, because an agent can turn a weak assumption into a polished chart just as quickly as it can turn a good assumption into one.

The finished China Gas Apparent Sector Demand Model is available here.