See the section, "Heat pumps, compared with combined heat and power": https://www.withouthotair.com/c21/page_147.shtml
See the section, "Heat pumps, compared with combined heat and power": https://www.withouthotair.com/c21/page_147.shtml
District heating/district cooling has three advantages: you can change the heat source centrally without having to refit every single dwelling, there are economies of scale in the heat generation, and you can take advantage of heat or cooling that's just in the wrong place and transport it to where it's needed.
Particularly if you use heat pumps instead of basic plumbing to achieve the transfer. Dump heat into a glycol line with a reservoir.
Also, if you rely on local heat pumps, you still need to take the energy from somewhere. Taking it from the air is fine in warmer climates, but in colder climates the efficiency of air-source heat pumps starts to become an issue when it gets colder. You can extract heat from deep underground, but that doesn't universally work in densely populated areas because the ground doesn't contain infinite amounts of energy and it's possible to extract more than it can sustain. So, in cold climates there's definitely a use case for distributing heat using water pipes, with or without local heat pumps in every building (see the sibling comment about 5th generation district heating systems).
In places where it’s really hot or cold, it would be an even lower percentage. The money that it would cost to trench and maintain the hot water distribution lines for a house would probably be better spent on heat pumps, architectural features or upgraded insulation (Even just $2000 of extra insulation does an amazing amount of good vs. bare minimum code insulation, and I doubt you can get district hot water installed for less than that.)