TWIN FALLS, Idaho — Lost jobs, empty storefronts and shrinking populations. It’s an image of rural America ingrained in many people’s minds, and one that was often reinforced in the election.

The reality is far more complex and can be seen — and smelled, in the still-fresh paint — inside a Clif Bar factory that opened here last summer in south-central Idaho. The largest yogurt plant in the world is here, too, opened in 2013 by Chobani, the Greek yogurt giant, in a vast space of whirring robots, steel tanks and 1,000 full-time employees.

New manufacturing jobs and population growth have bolstered southern Idaho, bucking the pattern, and the perception, of rural struggle. But the surge only underscores the deeply uneven world of what economists call non-metro America, where the recession never ended in some places and is barely remembered in others.

Of nearly 2,000 rural counties in the United States, about 60 percent added jobs last year, while 40 percent contracted, according to federal figures. In such a brutal calculus, economists and local politicians said, little things add up fast: like being close enough to a big city, but not so close as to be crushed by the competition; having good access by air and highway for passengers and freight; and then having enough trained workers if and when new companies knock on the door.