Bay Area crime statistics these days seem topsy turvy. Which is not necessarily a bad thing.

In Oakland, violent crime plunged 23 percent between 2012 and 2017, including homicides, robberies, rapes and assault. A city that once seemed out of control is becoming less dangerous.

In East Palo Alto, which was the per-capita murder capital of America in the 1990s, last year there was only one homicide — not a street crime but a domestic incident. Families now let their kids play outside or walk to the store without fear of random gunfire. It has been a magical transformation.

Start your day with the news you need from the Bay Area and beyond.

Sign up for our new Morning Report weekday newsletter.

In San Jose, however, crime was up last year — particularly juvenile crime, whose wild percentage increases might imply the city is overrun by rampaging teen-age Huns: As of November, police showed a 69 percent year-to-date increase in juvenile arrests for robbery, 65 percent increase for burglaries and 42 percent for overall violent crimes. Car thefts by juveniles more than doubled to 124.

The capital of Silicon Valley still is not the South Side of Chicago. The numbers of crimes remain low for a city of a million people. Oakland, with an estimated 426,000 residents, still averages 1 1/2 times the amount of violent crime as San Jose.

In addition, some of the community-policing strategies that have helped Oakland and East Palo Alto get crime under control in recent years are the ones that help keep San Jose a pretty safe city. Even if it can’t officially keep its “safest big city in America” bragging rights, it is one of the safest.

There are some unnerving trends, however. The main one is a new pattern of juvenile crime sprees in the city that are not gang-related but appear to be ad hoc groups of kids committing robberies, carjacking and other offenses.

One six-hour spree in November resulted in 11 arrests — one of them an 11-year-old boy driving a getaway car after a carjacking and a number of burglaries and robberies, some involving guns. A similar rampage happened in October with different teens arrested.

Why it’s happening is unclear. San Jose Police Chief Eddie Garcia has blamed Santa Clara County policies that discourage incarcerating juveniles unless they present a public danger.

Probation Chief Laura Garnette says the county policies, which we’ve supported, are based on evidence that juvenile incarceration is the single greatest predictor of adult crime. Kids with still-forming brains don’t get better in lockups. But of all juveniles brought in for booking, 88 percent are held because of public safety concerns. It’s not a revolving door.

Related Articles San Jose crime rate surpasses U.S. average, arrests plummet

San Jose carjacking spree: Teens had 11-year-old getaway driver, police say

Suspects in violent Oakland crime spree arrested in San Leandro After talks with Garcia, Garnette’s office is crunching data to test whether county leniency could be part of the problem. She doesn’t think so. Garcia still isn’t sure, but both feel good about working together.

Meanwhile, kudos to Oakland, East Palo Alto and other cities that are catching up on community policing to bring crime down. We’re confident that with more officers coming on board in San Jose, it will get back on track.

Correction: An earlier version of this editorial incorrectly stated the population of Oakland. The latest state estimate, for 2017, is 426,000 residents, not 240,000.