Sitting in the middle of almost 270 billion tons of coal reserves, the city of Taiyuan in northern China is an unlikely place to look for a leader in the battle for a greener future. This after all was China’s pollution poster child, a grimy industrial city of 4.3-million people that owed its growth to the coalfields of surrounding Shanxi province, among the nation’s biggest. Once ranked as the only metropolis in the country with air that was fouler than in Beijing, China’s coal capital is trying to clean up its act. The local government has implemented rules designed to bring blue skies back to the city, requiring coal-fired plants to install scrubbers, clamping down on heavy-polluting vehicles, regulating barbecue stands and banning farmers from burning straw. But its biggest coup came last month, when it became the first city to replace its entire fleet of taxis with electric vehicles. Eight thousand cab drivers have traded in their Volkswagen Jettas and Santanas for new, subsidized BYD Co. all-electric E6s at a total cost to the government of 800 million yuan ($120 million). Another 129 million yuan or more has gone to funding a network of 1,800 charging stations to keep the cars running. It’s a welcome boost for state-owned factories that have struggled with an economic slowdown and a national shift away from coal. “This is a big cake and a lot of people want to have a taste,” said Gao Peng, head of the new energy unit at state-owned Shanxi Fenxi Heavy Industry Co., which turned its filing-cabinet factory into an indoor charging station in July. “There are so many idled but spacious factory buildings in the city.” With industrial provinces across China struggling to transform from the old debt-fueled, state-run model, Taiyuan’s taxis may offer a path to ease the pain. The total debt of China’s top coal producers rose to 3.66 trillion yuan at the end of July, according to state-run Xinhua News Agency. The country needs to fire 1.3 million coal workers to trim overcapacity, Human Resources and Social Security Minister Yin Weimin said in March. Unfinished Towers In downtown Taiyuan, an elevated highway to the new high-speed rail station is surrounded by unfinished office towers, an area that was meant to be the city’s answer to Shanghai’s Lujiazui business district. On a recent Thursday afternoon, most of the construction sites were idle. Further to the north-east is Heping Bei Lu, an avenue of large residential blocks built by state-owned companies for their workers. It’s known locally as “unemployment street.” Some residents have become taxi drivers, or work for ride-hailing service Didi, China’s answer to Uber. “It’s hard to do the business,” said Yan Wusheng, a taxi driver for 10 years, who used to work at the government coal transportation company. “Fewer people are taking cabs these days because their salaries are not good.” Yan got his new E6 in April and has clocked up 43,000 kilometers (27,000 miles) in the taxi, which he says feels heavier than his old Jetta. His earnings are down by about a fifth this year because of the slump and the need to spend two hours each day recharging the battery. Demolition Geng Taiyuan’s taxi replacement plan got a boost in January after Mayor Geng Yanbo signed an agreement with BYD to set up a manufacturing plant in the city. Geng, 57, gained a reputation for trying to wean the local economy off coal in his previous position as mayor of nearby Datong, where he became known as Demolition Geng for his plan to rebuild the urban center as a model Tang-dynasty city, relocating half a million people. Geng’s office didn’t respond to requests for an interview. The combination of economic slowdown and cleaner vehicles has helped Taiyuan drop down the pollution rankings. It fell to to 86th out of 366 Chinese cities monitored by Greenpeace last year. Air quality in the city improved 18 percent in the first half of this year as the new electric taxis were being rolled out. The success has put the provincial capital in the vanguard of President Xi Jinping’s plans to roll back the deadly pollution that built up in China’s cities during the boom years. The central government wants to see 12,000 charging stations across the nation to serve 5 million electric vehicles by 2020. Last week, the National Development and Reform Commission, China’s top policy body, issued directives designed to speed up the construction of chargers in residential areas. At least 14 cities including Beijing and Shanghai offer subsidies of up to 30 percent to encourage companies to build the stations, according to public filings. The lack of charging stations is one of the key roadblocks to getting the public to buy electric vehicles. In an exhibition hall below the imposing tower of blocks of the Coal Trading Center of Taiyuan, residents view the latest EV offerings and other green technologies at an energy expo. One says he’d like to see at least triple the number of charging stations before he’d buy an EV. Others complain of the high price or worry about the quality and weight of the vehicles. Taiyuan has cut the approval process for new charging stations to encourage operators. Shanxi Fenxi received the green light three days after it submitted an application in June. The maker of generators and equipment for ships and mines cleared machine tools out of its cabinet factory and installed 19 charging posts, offering drivers a car wash, WiFi, cheap beef noodles and deck chairs to relax in during charging, which typically takes 30 minutes to 2 hours. E6 cabs wait in lines during the peak recharging time around midnight, and the station cleared nearly 300,000 yuan in the first 40 days after opening, according to Gao. Fifteen former factory employees, who would otherwise have been fired, are now station managers, monitoring the posts via a smartphone app. Gao expects to recover the investment in a year, but competitor Yang Junlin is less optimistic. He rented a disused plant from state-run Shanxi Pharmaceutical Group Taiyuan Pharmaceutical Co. in the west of the city after agreeing to hire former workers. “The government doesn’t like unemployment,” Yang said in his newly opened station, which has beds for drivers to take a nap and 10-yuan lunch sets. “But those accustomed to the SOE culture always complain this work is too hard and soon quit.” Yang estimates it could take four years to get a return on his 2 million yuan investment. The test, he says, will be the winter. The average temperature in January is minus 6 degrees Celsius (10 degrees Fahrenheit) and that may affect battery performance. The lower the temperature, the shorter the range and the longer it takes to charge the taxi. A spokesman for BYD declined to comment on the issue of battery life in cold weather. “Only if the EVs can endure the cold weather this year will our business live on,” said Yang.