The city as a community-based force for sustainability in energy systems