A male tungara frog in Panama.

A male tungara frog in Panama. Credit: AP / Adam Dunn

In the competition for a mate, it’s all in the croak.

That’s life for a frog. Males sing, females respond, the boy who croaks best wins the girl.

A group of Dutch-led researchers recently drilled down on those mating calls and found something more interesting. The ladies like the love songs of urban frogs more than those of their country cousins.

City frogs, it turns out, have more complex mating calls thanks to vocal vibrations they add to make their calls more attractive to females. Now, urban males do have a frog-leg up here; unlike their woodsy counterparts, city croakers have no predators like frog-eating bats listening for conspicuous calls. And the competition for females is fiercer in the city.

In one test, researchers recorded male tungara frogs in urban and rural areas along the Panama Canal and played those calls to females in a lab setting. Far more ladies hopped over to the speaker broadcasting the urban call. It was sexier.

I mention this not because I’ve become obsessed with the mating rituals of frogs. But their urban vs. rural competition is nature’s mirror of what’s happening among humans in this country.

The cities are winning, in almost every measurable way. And that has consequences we’re only beginning to understand.

It’s not only that big tech companies like Amazon choose to plop down blocs of 25,000 workers in urban hot spots like New York and Washington. Or that Apple plans expansions in the likes of Austin, Seattle, San Diego, Los Angeles, New York, Boston and Boulder.

It’s that the number of rural Americans living in the most economically distressed ZIP codes, the lowest 20 percent as measured by the Economic Innovation Group think tank, increased by 1 million between 2007-11 and 2012-16 — despite a decline in the overall number of people in those ZIP codes.

It’s that these distressed ZIP codes have disproportionate numbers of adults without high school diplomas, while the most prosperous ZIP codes have disproportionate numbers of adults with bachelor’s degrees or higher.

It’s that technology, education and health care advances often hit cities first, causing rural areas to fall further behind.

It’s also a cultural divide. Nearly 70 percent of rural residents — and almost 50 percent of city dwellers — say their counterparts have different values, in a recent survey by The Washington Post and the Kaiser Family Foundation.

The schism has left majorities of both groups — 63 percent of city folk, 57 percent of rural residents — saying others view them negatively, in a Pew Research Center survey this year.

That can have political consequences. Such resentments can be exploited. Donald Trump, especially, and Hillary Clinton did that to varying degrees in the 2016 presidential campaign. Trump carried 2,584 counties, but the 472 more-populated Clinton counties contributed 64 percent of America’s economic output, per The Brookings Institution. The 2018 midterms solidified the reality of city Democrats and rural Republicans; most notably, California’s Orange County, one of the GOP’s last urban strongholds, went all-blue.

Changing the trend lines is difficult but necessary. These divisions are not healthy. Neither party has solved the riddle by, for example, building on rural-city commonalities Pew found — like virtually identical concerns in both groups about jobs, poverty and drug addiction in their own communities, and eerily similar feelings of economic insecurity.

If the parties continue to misfire, the frogs offer another clue. When researchers moved rural croakers to urban areas, they did not modify their simple mating calls. But the urban frogs, when moved to rural areas, literally changed their tune.

Adaptation, Darwin said, is key to survival of a species. The cities seem to be winning there, too.

Michael Dobie is a member of Newsday’s editorial board.