What’s the cleanest big city in America? How about the dirtiest? And what about the place where you live — did it make the list?

Reader’s Digest compared data on our 50 most populous metropolitan areas to come up with a ranking of America’s cleanest cities. You might be able to guess some of the winners — and losers. But get ready for plenty of surprises.

First, though, what is a clean city? Ideally, it’s a place where the air quality is good, the water is safe to drink, and factories aren’t dumping harmful chemical waste into the environment. It’s also a place where you look up and down streets that are free of garbage, and stroll through parks without wading through litter. To gauge these things, we used several databases as yardsticks for measuring cleanliness. That data pertained not just to the cities themselves, but to their Metropolitan Statistical Areas (MSAs), which include the surrounding suburbs and counties.

We also wanted to dig beneath the data to find out just what our highest-scoring cities were doing right. So we talked with policymakers, economists, activists and government workers in the top five cities. As you’ll see, these places have earned their rankings — and their success holds some lessons for the rest of us.

#5 San Francisco

(Alameda, Contra Costa, Marin, San Francisco and San Mateo counties)

Background: Once a prominent shipping and manufacturing center, San Francisco now has booming financial and business sectors. Since 1980, the city’s population has increased by more than a third and its per capita income ranks among the nation’s highest. Few places have a citizenry that is more environmentally conscious.

Problems: Like nearly every traffic-clogged urban California area, San Francisco has struggled with high emissions of greenhouse gases and carbon monoxide. Its Hunter’s Point area is home to two polluting power plants and a highly contaminated Naval Shipyard, now defunct. In 2002, a national report found that while San Francisco’s source water was safe, its tap water contained high levels of a cancer-causing contaminant known as total trihalomethanes, or TTHM, a byproduct of chlorinating water.

Solutions: San Francisco has benefited from the state of California’s bold and controversial air-quality regulations. The city’s Environment Department — something many municipalities lack — is seeking to close the power plants at Hunter’s Point, and the federal EPA is overseeing a massive cleanup of the shipyard there. Meanwhile, San Francisco is in the forefront of efforts to promote the use of clean-air vehicles, with its public

transit leading the way. The city’s bus fleet includes over 700 electric-drive vehicles, with plans to convert all the buses to this clean-air technology by 2020. As for concerns about its drinking water, San Francisco responded by modifying its water treatment process, which brought the TTHM levels back down into the safe zone. Finally, the local government is finding ways to push energy savings, including a program that encourages residents to exchange their old strings of holiday lights for a free set of more efficient LED bulbs, courtesy of the city and Pacific Gas and Electric.

#4 Columbus, Ohio

(Delaware, Fairfield, Franklin, Licking, Madison, Morrow, Pickaway and Union counties)

Background: Ohio’s capital, according to the latest census, was the only major city in the state to grow in population. And Columbus’s geographical expansion continues. Its economy is light on industry — less than 12% of its job force works in the manufacturing sector. The big growth has been in financial and insurance businesses, as well as retail. Meanwhile, per capita income here is slightly below our 50-city average.

Problems: Columbus’s steady development has made it tough to keep the city’s watersheds clean. Also, an aging storm water and sewage system has caused overflows and backups in recent years. Litter has been a manageable problem, although Columbus has a recycling rate of just 4%, which Mayor Michael Coleman calls “pitiful.” And finally, the late 1990s were marked by a sudden increase in ugly graffiti on both public and private property.

Solutions: Mayor Coleman supports a moratorium on development of sensitive watershed land, but has also pushed for redevelopment of brownfields (contaminated land kept vacant until sites can be cleaned up). The mayor recently unveiled a new initiative, “Get Green Columbus,” which established an Office of Environmental Stewardship. Also underway is a program to update the sewage and storm water systems. To spruce up unsightly areas, Columbus has committed to removing graffiti within two days of its appearance. Through the city’s Neighborhood Pride program, a handful of communities each year get a solid week of concentrated cleanup, including tree trimming, hydrant painting, graffiti abatement, bulk trash pickup and litter removal.

#3 Buffalo, New York

(Erie and Niagara counties)

Background: Long known as a Rust Belt city where steel was king, Buffalo was hit hard when that industry went into steep decline more than two decades ago. As steel plants shut down, Buffalo was forced to rebuild its economy from the ground up. But by leveraging its assets, including a low cost of living and cheap, clean hydroelectric energy generated by nearby Niagara Falls, Buffalo has begun luring new, non-manufacturing businesses to the area.

Problems: After the shuttering of its steel plants and oil refineries, the region was left with the residue of its industrial past: A heavily polluted Buffalo River and acres of brownfields and Superfund sites, including the notorious Love Canal. By the 1990s, Buffalo’s dwindling population, shrinking tax base and fiscal problems meant drastic cuts in city services — including sanitation. As a result, huge trash piles often accumulated in front of homes, sometimes going uncollected for days on end. At the same time, Buffalo was struggling with a sizable rat infestation.

Solutions: With the help of environmental quality bonds and Superfund dollars, Buffalo has made great strides in containing and cleaning up brownfields and contaminated sites. Meanwhile, plans are underway to turn part of the former Bethlehem Steel site — an 1,100-acre brownfield on the shores of Lake Erie — into a wind farm that will generate clean power for businesses and residents. The state is also overseeing a Buffalo River cleanup, already successful enough to draw boaters and fishermen back to the waterway. As for the trash problems, Buffalo undertook an award-winning restructuring of its garbage collection system. A fleet of 13 high-tech street sweepers, deployed 24 hours a day during non-winter months, now helps keep the streets clear of debris. And the city has dramatically curbed the rat problem by distributing large, securely covered garbage bins to every residence in the city.

#2 San Jose, California

(San Benito and Santa Clara counties)

Background: This area’s booming high-tech business during the 1980s and 1990s earned it the name Silicon Valley. Numerous semiconductor and computer chip manufacturers brought in huge numbers of highly educated workers, driving up house values and living costs. Then the dot-com bust hit, and San Jose suddenly lost 200,000 jobs. Now the city is seeking to reinvent itself as a center for innovation and research in such diverse fields as pharmaceuticals and automotives.

Problems: In the early 1980s, a leaking underground storage tank filled with trichloroethane, a solvent suspected of causing reproductive and developmental problems, was found to be contaminating the drinking water of 65,000 people near a semiconductor plant. Over the next few years Silicon Valley became dotted with Superfund sites; at one time, Santa Clara County had more such sites than any other county in the country. Besides the high-tech contamination, the Valley’s rapid growth resulted in extensive sprawl, which means traffic, and air pollution — trapped by surrounding mountains.

Solutions: The widespread pollution gave rise to a strong grass-roots environmental movement that pressured industry to clean up its mess. Industry responded by going the extra mile, setting higher standards for itself than required. The EPA, meanwhile, is overseeing the containment and cleanup of the Superfund sites. Because so much groundwater had been contaminated, the Santa Clara Valley Water District became a national leader in testing and protecting drinking water. As for its traffic woes, San Jose can thank the state of California for stricter regulations that have helped reduce the carbon monoxide and diesel particulates in the air. The bottom line for San Jose: It’s a city now known nationwide for its clean streets, fresh air, and healthy lifestyle.

#1 Portland, Oregon

(Clackamas, Columbia, Multnomah, Washington and Yamhill counties, Oregon; Clark and Skamania counties, Washington)

Background: Portland, long an important port and shipbuilding center, now also has a burgeoning high-tech sector, and a robust manufacturing base in paper, metal products and sportswear. Nonetheless, the per capita income is below the average for the 50 cities in our analysis.

Problems: A six-to-nine-mile stretch of the Willamette River’s Portland Harbor was declared a Superfund site in 2000. The sewer system is ancient and poorly designed, combining storm water runoff with sewage in the same piping system. Industries in Multnomah County, Portland’s home, continue to spew an estimated 1.85 million pounds of toxics into the air, water and land.

Solutions: Portland belongs to the country’s only elected regional government, which means the city coordinates its planning and growth decisions with its neighbors. This arrangement has allowed Portland to make far-ranging decisions, such as the establishment of a growth boundary around its urban center. Land inside this invisible circle is fair game for development; outside the circle there’s only open space and farmland. The result is not only a well-preserved agricultural region just outside the city, but also a vibrant, livable urban area where public transportation rules. To attract even more riders, the bus and light rail system has turned a section of downtown into a fare-free zone. The city did another smart thing when it was looking into a green building ordinance: It met with 200 developers to find out exactly what regulatory or financial hurdles were preventing them from using “sustainable” principles, and then laid out a plan. To resolve the sewage problem, Portland has invested over a billion dollars in the “Big Pipe Project,” which will lay massive pipes alongside the Willamette to carry waste to a treatment plant. In 1974, the city removed an entire freeway running alongside the Willamette’s banks and converted the space into parkland.