The new CBS drama “Wisdom of the Crowd” follows Jeffrey Tanner, a Bay Area tech billionaire who has sunk everything he has into the creation of a cutting-edge crowdsourced app that helps to solve crimes.

In the pilot episode, Tanner (Jeremy Piven) invites police detective Tom Cavanaugh (Richard T. Jones) to check out the headquarters for his new endeavor. The cop is stunned to find himself in Oakland, of all places.

“Oakland?” he says, staring at Tanner. “I mean, that’s a little ghetto for you, isn’t it?”

Related Articles TV by the Bay: What’s the best-ever show set here? That line of dialogue surely provoked winces from the city’s chamber of commerce members, but even they had to be somewhat surprised. TV viewers, after all, are accustomed to seeing major network series set in Los Angeles or New York. And the few shows that do find their way to the Bay Area almost always leave their hearts in San Francisco. (See: “Full House,” “Party of Five,” “Monk,” “Nash Bridges,” etc.).

But this season, two shows are set in the Bay Area and beyond the land of cable cars. In addition to “Wisdom of the Crowd,” there’s ABC’s “The Good Doctor,” a medical drama starring Freddie Highmore that calls San Jose home.

Highmore plays Shaun Murphy, a brilliant young surgeon with autism and savant syndrome. He has left behind a quiet country life to join St. Bonaventure Hospital in the Bay Area’s biggest city. (The hospital is fictional, of course.) There he uses his extraordinary medical gifts to save lives and challenge the by-the book notions of his colleagues.

“The Good Doctor” was created by David Shore, the same man who gave us “House.” When developing his latest show, he quickly came to believe that San Jose was the perfect locale for his leading man.

“Shaun is a character who asks fundamental questions about our behavior,” Shore says. “He’s curious about why we act the way we do. He’s not challenging, he’s curious — which, of course, has the effect of being challenging.

“San Jose is basically where the future is happening. It’s a place where technology seems to be well on its way to solving all our problems, and people sometimes seem to believe they have the world figured out. What better place to drop a character who asks the most fundamental questions about our nature and our humanity?”

As for “Wisdom of the Crowd,” executive producer Ted Humphrey tapped into both, his character’s mindset and a very real Bay Area real estate trend, to bring Tanner’s offices — known as The Hive — to Oakland.

“The decision to put The Hive in Oakland was about thinking as Jeffrey Tanner would think — reinventing himself and his company,” Humphrey says. “His old company, AllSourcer, is in Palo Alto in a traditional tech campus. He’s done that. But many startups are relocating to Oakland for cheaper real estate and a hip ‘Brooklyn-on-the-West-Coast’ vibe. And that’s what Tanner is doing too.”

OK, so there’s a there there. But does Oakland bring anything in particular to the story that another city might not?

“There’s a grittiness there that speaks, again, to the upstart nature of what Tanner is doing,” Humphrey says. “The Hive is located in an old canning plant, and the industrial nature of the location is a big part of our production design and the look and feel of our show.”

However, viewers should be aware that a bit of Hollywood make-believe is at play. While they’re set in the Bay Area, both “The Good Doctor” and “Wisdom of the Crowd” are not actually filmed here. The former is shot in Vancouver and the latter on the CBS lot in Studio City.

That’s the way it typically works. Aside from the rare exception, like, say, “Streets of San Francisco” or “Looking,” most Bay Area-set TV shows aren’t based here. They usually spend a few days filming a handful of exterior establishing shots and then flee to finish the bulk of the work elsewhere. “Parenthood,” for example, was set in Berkeley, but the show’s Braverman clan mainly hung out at Universal Studios. And those nerdy bros from “Silicon Valley”? The Sony lot in Culver City.

But why not just set up shop in the Bay Area? Because filming here is ultra expensive, and also often a hassle for production crews. “Parenthood” star Peter Krause once recalled that, while shooting the show’s pilot, Berkeley residents were “not very receptive to having film trucks on their streets.” And when “Trauma,” a short-lived NBC medical series, shut down a stretch of freeway in San Francisco to shoot a big tanker-trailer explosion, a producer talked of angry motorists giving him “the one-fingered salute and yelling, ‘Go back to Hollywood!’”

Interestingly enough, the Netflix drama “13 Reasons Why” actually does film on-location all over the Bay Area, and uses sound stages on Mare Island. But for purposes of the show, the Bay Area doesn’t play itself, instead standing in for the story’s small fictional town.

Both Shore and Humphrey say they hope to shoot occasional scenes in the Bay Area, schedules and budget permitting. Meanwhile, they try to blend some local flavor into their scripts when the stories call for it. For example, a recent episode of “The Good Doctor” had two frantic characters transporting a liver from San Francisco to San Jose and fretting over the traffic gridlock on I-280. (We can relate!) And “Wisdom of the Crowd” features a brainy computer whiz who did her grad work at Stanford. (Cal students undoubtedly will demand equal time.)

Some of that flavor might even include our local teams, as both producers claim to be fervent sports devotees. Shore says he “definitely needs” to drop a shout-out to the Sharks into his show. Humphrey pointed out that he already has a reference to the NBA champion Warriors in at least one episode — even though it hurt to do so.

“I was born and raised in Northeast Ohio,” he says, “and I’m a diehard Cleveland Cavaliers fan.”

Contact Chuck Barney at cbarney@bayareanewsgroup.com. Follow him at Twitter.com/chuckbarney and Facebook.com/bayareanewsgroup.chuckbarney.

‘The Good Doctor’

When: 10 p.m. Mondays

Where: ABC

‘Wisdom of the Crowd’

When: 8 p.m. Sundays

Where: CBS