AWAY from the California of the popular imagination, from the beaches and glamour of Los Angeles and the technological innovations of Silicon Valley, sits the Central Valley, a 450-mile stretch of mainly agricultural flatlands encased by mountains to east and west. The valley’s geographical seclusion has bred other forms of disconnect; here you encounter habits, such as listening to country music and voting Republican, that are virtually extinct in the rest of the state.

But this isolation is anything but splendid. A 2011 California human-development report gave the San Joaquin Valley, the more populous part of the Central Valley, roughly the same score as West Virginia. Life expectancy is low, crime rates high, and the air dreadful (if improving). A 2010 report from the Milken Institute, a think-tank, found three San Joaquin Valley cities among the ten least-educated in the country. And joblessness, long the scourge of the valley (see chart), is keeping its grip. Locals hate being told by outsiders that they live in “the Appalachia of the West”, but in the same breath acknowledge it is true.

For decades the fertile soils of the valley, which provide about 40% of America’s fresh produce, have attracted workers from poorer lands, from the dust-bowl Okies of the 1930s to the Mexicans and Central Americans who dominate today’s agricultural labour force. (By one estimate, 90% of valley farm workers are in the United States illegally.) Over one-fifth of jobs in the Central Valley are linked to agriculture.

More recently Californians and other Americans have flocked to the region, sucked in by low house prices and living costs. That helped inflate a bubble that popped in 2007-08, but the state still forecasts that the population of the San Joaquin Valley will more than double to 8.2m by 2060. That will create fresh challenges for public services, employment and, particularly, infrastructure (hence the need, say officials, for a statewide high-speed rail link; see next story). A journey through the valley makes the difficulties clear.

At the southern tip of the San Joaquin Valley lies Kern County. This is oil land, and the spoils of the commodity boom have brought an optimism entirely absent from communities farther north. Pumpjacks nod tirelessly, as they have since the late 19th century, in the large oilfields outside Bakersfield, the county seat. Business leaders enthuse about the possibilities of fracking the Monterey shale, a vast oil formation, and of the solar and wind farms that dot nearby mountains and plains. Bakersfield is one of America’s fastest-growing cities, and few locals hesitate to contrast its fortunes with the rest of the valley. Yet, despite its energy riches, Kern County shares many of its neighbours’ troubles. A quarter of the population lives in poverty. At 11.5%, unemployment is close to the regional average. Far more people toil in low-paying farming jobs than in the energy sector. A common complaint, as elsewhere in the valley, is the failure of local schools and colleges to attend to the needs of local employers. Kern County has been a major agricultural centre for decades, but it took the local university until 2011 to begin offering relevant courses. Businesses throughout the valley find it hard to recruit locally. Ambitious types tend to leave. Among those who stay, a lack of basic skills and high levels of drug use mean that employers struggle to fill even menial positions. Poor schooling is a chronic problem in the valley, but an even worse one nowadays, when many manufacturing and agricultural jobs require more skills than before. Such concerns loom large in Fresno, the valley’s biggest city. The Census Bureau predicts that one in six graduates will leave the place. Unemployment in Fresno County stands at 12.3%. Crime and homelessness are rampant, and visitors are warned not to stay in the city centre. Mark Arax, a local author, recently asked readers of the Fresno Bee how anyone could “breathe its foul air, ignore its shared poverty, abide its corruptions”. Regretfully, readers tended to agree with him.

Still, there are signs of hope if you seek them. They include the energetic mayor, Ashley Swearingen, and the business leaders behind the Boomerang Project, an optimistic attempt to inspire Fresnan emigrants to return. Business groups and investors speak hopefully about the city’s strength in water-use technology, given the complexity of the surrounding irrigation channels. “It’s not going to be the next Silicon Valley,” says Fred Mendez at Rabobank, a community bank. “But there is real opportunity there.”

Sixty miles north-west of Fresno sits Merced, where the foreclosure crisis struck with particular ferocity: in 2009 the city had the third-highest rate in the country. House prices fell by two-thirds. The city is ringed by Irish-style half-built housing estates like the Bellevue Ranch, where handsome houses with green lawns and SUVs in the driveway share space with vacant brown lots baked hard by the valley sun.

Drive just two miles east and you reach the glittering University of California Merced campus, the most recent addition to one of America’s best public universities. When it opened in 2005 locals hoped it would provide the region with an economic jolt. The housing crash dashed those dreams, but the campus has begun to forge industry links in areas like solar energy and biotech, and spin-offs may follow.

Yet the story behind UC Merced also shows the valley at its worst. Rather than celebrating the arrival of a first-class seat of learning in the region, the backers of competing proposals in Fresno and Madera grumbled and sniped. A similar dynamic is alive today as cities scrap to be the place where the high-speed trains are inspected and repaired. “You often have competition rather than co-operation,” says Carol Whiteside, who as president of the Great Valley Centre, a research institute, has worked on regional infrastructure projects. The potential benefits of high-speed rail, she hopes, will foster a more collaborative spirit.

If the valley is to pick itself up, that is probably one necessary ingredient. A renewed focus on education, particularly among Latinos, is another. The valley is unlikely ever to enjoy the wealth of its coastal cousins. But by fastening on its advantages, especially in agricultural industries, and acknowledging its limits, it may be able to offer its children a brighter future than their parents had.