It's no secret that millennials are seen as essential for urban prosperity. In October, a Politico survey of American mayors found that 85 percent of them considered attracting this desirable demographic one of their top 10 priorities. Nearly half of those surveyed identified cultural amenities as their cities' most important selling point, but the vast majority said the biggest obstacle to attracting and retaining millennials was a lack of affordable housing and reliable public transit.

While major hubs like Los Angeles, New York and San Francisco struggle with both access and affordability, these characteristics are abundant in small to mid-sized cities. In the last five years, places like Buffalo, N.Y., Providence, R.I., and Riverside, Calif., have attracted millennials at much faster rates than New York or San Francisco, thanks in large part to local initiatives that cater to those cities' size and unique quality of place. By building on the following key strengths to attract millennial talent, small to mid-sized cities have become better models for their peers than the nation's largest economic hubs.

Ease of commuting: Smaller cities' transit systems have become increasingly reliable and expansive. In 2016, for example, Denver opened the University of Colorado A Line, a commuter-rail project that dramatically reduced travel times from downtown to the city's airport. And the variety of public transportation options in Jersey City, N.J. -- including ferry, light rail and bus lines -- has helped to spur massive population growth. Today, the city's transit systems have become so convenient that the median income of its transit users exceeds that of its car commuters.

Abundance of affordable housing: Smaller cities like Tulsa, Okla., outperform most major cities in terms of their affordable housing supply. In Tulsa, the median rent for a one-bedroom apartment is around $660 a month -- less than one-fifth of the cost of a comparable unit in Manhattan. Many smaller cities also have the advantage of being located just outside major economic hubs. A number of young Boston families, for instance, are choosing to save money by relocating to Providence and commuting back and forth to Boston each week.

Distinct quality of place: Increasingly, small to mid-sized cities have learned to cultivate the same dynamic and diverse quality of place that is synonymous with big-city living. In recent years, for example, Jersey City has transformed into a budding startup and innovation district with a vibrant restaurant and arts scene and a reputation for both safety and walkability. This growth has been accompanied by a surge of new development, including Journal Squared, a mixed-use project with views of the New York City skyline, and a $26 million STEM building at Hudson Community College.

Efforts to engage local talent: By encouraging millennials to become involved in the local economy, many small to mid-sized cities have been able to retain their graduates and young professionals. A number of successful examples can be found in Richmond, Va., a city that saw the second highest growth in millennial population (nearly 15 percent) from 2010 to 2015. A company started by Richmond natives, New Richmond Ventures, invests in local businesses that are often millennial-run. And Helping Young Professionals Engage, an organization backed by the local Chamber of Commerce, connects younger residents to the Richmond business community. In Tulsa, a group called Tulsa's Young Professionals funds programs that engage young professionals in economic development and "placemaking" initiatives, which reimagine public spaces to improve residents' health, happiness and well-being.

Involvement of local anchor institutions: In many small to mid-sized cities, individual companies or other anchor institutions -- large universities, medical centers, real-estate developers or high-tech firms that quite literally anchor urban centers -- have a profound effect on attracting and retaining millennial talent. Recently, for example, the world-famous Mayo Clinic, a popular career destination for millennials, teamed up with its home city of Rochester, Minn., to create a $5.6 billion economic development plan for attracting young workers with an interest in health care or STEM.

Initiatives like these draw from the unique resources of smaller cities, whose affordability and accessibility play a key role in appealing to younger residents. By turning to the efforts of their peers for inspiration, small to mid-sized cities can outpace their big-city competitors as the nation's premier destinations for millennial talent.