Ninety-six percent of D.C. residents live within a 10-minute walk of a park, according to a national survey of the 40 largest cities in the United States released Wednesday by the Trust for Public Land.

Among those cities, the District ranked fifth and earned four of a possible five “park benches” in the inaugural ParkScore rating system, which ranks cities based on park access, park size, and a city’s investment in parkland and infrastructure.

Other cities in the top five: San Francisco, at No. 1, followed by Sacramento, Boston and New York. Among those finishing near the bottom were Fresno, Calif., Charlotte and Louisville.

But even though the vast majority of D.C. residents live within a half-mile of a park, the report says that access should be improved for people who live in Ward 1 in Northwest and Ward 5, which is mostly in Northeast.

“We had good planning and vision from way back, and we’re maintaining it,” said Peter Harnik, director of the Center for City Park Excellence at the Trust for Public Land, crediting the city’s forebears with incorporating park spaces into the design of the city.

Even in recent years, he noted, the city has created parks, including Yards Park in Southeast and the Georgetown Waterfront Park.

The District’s scores no doubt received a boost from the large federal presence, Harnik noted. About 19 percent of the land in the city is parkland, and of that, about 90 percent is National Park Service land, he said.

There are areas in which the District can improve, the survey found.

The District received 1 point of a possible 20 for median park size: 0.7 acres. And many of the green spaces are small triangles or slivers, Harnik said.

The District also received low marks for its number of playgrounds: 1.68 per 10,000 people.

By contrast, Sacramento, which got top marks for its number of playgrounds, has 3.88 per 10,000 people. Harnik said city officials would have to think creatively about how to better utilize even small lots.

Improving access to parks and playgrounds has become an important issue for many cities as policymakers try to make their communities more livable and walkable.

Officials hope that improving access to parks and playgrounds can help reduce residents’ obesity rates and perhaps ease traffic congestion. But they note that access to parks is only one part of the equation.

The Trust for Public Land is a national nonprofit organization that focuses on improving public access to parks and playgrounds in urban areas.