When one of the largest California wildfires on record broke out in 2013, raging for more than two months and threatening San Francisco's water supply coming from Yosemite, firefighters used drones to get aerial shots of the blaze and determine the best points of entry. Now those drones have come down from the mountains and into the city.
In Los Angeles the city's firefighters and sewer managers are using drones to perform dangerous work.
No matter the problem, local governments are increasingly turning to technology for the solution.
LA traffic planners analyzed data on pedestrian and cyclist fatalities to pinpoint the most dangerous intersections and then added bike lanes and posted officers there during rush hour.
To combat gun violence, the city of Boston installed a sensor-based gunfire detection system that can alert officers to precise crime scenes within seconds.
Across the United States and the globe, a push to innovate and build smart, technologically advanced cities has transformed the way governments approach public service. It's also transforming their budget and hiring priorities.
"We want more people who are drone operators, interested in robotics and understand data analytics and visualization," said Jeanne Holm, who this past summer was appointed to the position of senior technology advisor to Los Angeles Mayor Eric Garcetti. "We are in a hiring mode and recruiting heavily," Holm told CNBC.
Cities around the world will invest a total of about $41 trillion over the next 20 years to upgrade their infrastructure and benefit from the network of connected devices known as the Internet of Things, experts at the Smart America Challenge forecast.
"This is really a new way of thinking about how we better utilize technology to support the quality-of-life issues that citizens both want and need," said Alan Shark, executive director of the Public Technology Institute.
As cities invest in air-quality sensors, solar-powered trash compactors, self-healing power grids and more, the opportunities for private industry are huge. Experts say there is just one problem: It's virtually impossible to measure the return on investment for many leading-edge technologies first being put to use by the public sector.
Many cities are hoping their investments pay off in other ways, especially as they focus on smart technology, which aims to provide environmental and social benefits as well as cost efficiency.
"Sometimes the efficiencies that are realized are not always in dollars and cents," Shark said. "Success is measured by how many citizens are proud of their city."
Smart technology uses the Internet of Things to gather data, connect components across the city and impact multiple departments or services in order to improve people's quality of life. Spending on smart technology has grown from 0.7 percent of city IT budgets in 2005 to 4.1 percent in 2015. That percentage is expected to grow to 7.5 by 2025, according to Deltek, a global provider of enterprise software and information solutions for government contractors and professional services firms.
Estimates of the size of the municipal technology market vary greatly because terms like "smart cities" and "innovative technology" have no universally accepted definitions. They can cover everything from bike-sharing programs to electric buses, from a city councilor's tweet to an app that lets citizens search through public records. But experts seem to agree on one point: The market will continue to expand for years.
Analysts estimates on the urban innovation trend are eye-popping — but right now it's as much for how greatly they vary as for how big the market may ultimately grow to be. Some analysts peg the smart-cities market to be worth about $27.5 billion annually by 2023, while others say the market could reach as much as $757 billion by 2020.
Innovative cities are thinking of themselves as test labs for new technologies.
For cities, efficiency is not only measured in dollars and cents but in improvements in quality of life for citizens and economic development opportunities for local businesses.
City investment officers report they feel much greater pressure to improve services than cut costs.
Transportation and energy technology attract the most municipal spending on innovation.
Technology companies need to have a smart-city strategy and refine it for each city's unique needs.
Population dynamics should support the continued adoption of technology by cities. In urban centers around the world, population numbers are skyrocketing and putting an unprecedented demand on city infrastructure and resources. Fifty-four percent of the world's population lives in urban areas, a proportion that is expected to increase to 66 percent by 2050, when another 2.5 billion people could be living in cities.
Urbanization has prompted national and local governments to realize the importance of leveraging technology to make cities as efficient as possible. The White House announced a smart cities initiative in 2015 that will invest more than $160 million in federal research to help local communities reduce traffic congestion, fight crime, manage the effects of climate change and improve city services.
But local governments, which will be hit hardest by the consequences of urbanization, are outpacing their federal counterpart. The Center for Digital Government estimates U.S. cities will spend about $52.4 billion on technology in 2016. That is a 2.5 percent increase over their spending in 2015. The federal government will spend about $89.8 billion on technology in 2016, just a 1.5 percent increase over its spending last year.
With little data to tout return on investment, many cities use citizen satisfaction to mark their progress.
"There really is a triple bottom line with smart cities," said Jesse Berst, chairman of the Smart Cities Council. "It's about social equity, the environment and profits."
Many things urban populations strive for can be achieved through smart technology, Berst said. Self-healing power grids can make cities more resilient to hurricanes and blizzards. Energy-efficient streetlights that are triggered by foot traffic can contribute to environmental sustainability. Providing Wi-Fi as a city utility can promote social equality. That can translate into economic benefits from the creation of new businesses or the ability of city governments to streamline administrative processes.
"Cities are racing to become smarter because it gives them an economic development advantage," Berst said.
Cities are microcosms of the world, with every type of market available and all of the world's challenges at play, making them the perfecting testing ground for technological innovation. And it is not just a handful of America's biggest cities leading the tech-spending charge.
"We've opened up our city as a test lab," said Joseph Curtatone, mayor of Somerville, Massachusetts, home to about 80,000 residents. "We're always asking how can private-sector innovation help us take on some of the legacy issues facing cities and towns around the world."
The city has partnered with Audi to develop self-driving and self-parking cars, as well as a network of traffic lights that will reduce congestion. It is also partnering with start-ups to bring free solar mobile device charging stations into the city. With the help of a $1 million innovation fund, Curtatone hopes to entice new technology companies to try out their ideas in Somerville.
New transportation and energy initiatives are being broadly embraced as innovation efforts at the city level because they present the most obvious benefits. Citizens can tell when there is less traffic in the city or when they save money by conserving water and electricity. These tangible benefits help justify the costs.
The Center for Digital Government estimates local and state governments combined will spend about $10 billion in 2016 on smart transportation technology. Indianapolis is implementing an all-electric car-share service called Blue Indy. The city of Columbus, Ohio, recently won a $40 million grant from the U.S. Department of Transportation for its plan to deploy electric self-driving shuttles to link a new bus rapid-transit center to a retail district, connecting more residents to jobs.
"It's all about transportation," said Shark of the Public Technology Institute. "As we continue to have a growing population, there's no way everyone will be able to own a car, at least in the city."
That opens the door for innovations in car-sharing, bike-sharing and cleaner public transportation. Revenue from global car-sharing services is expected to grow from $1.1 billion in 2015 to $6.5 billion in 2024, when more than 23 million people are projected to use these programs. Many of these programs, like ZipCar, Uber and Lyft, are funded by private entities, easing the burden on local governments.
The electric-bus market is also opening up, with analysts predicting the volume of sales to increase by 20.9 percent through 2025.
After transportation, cities are investing the next largest chunk of their IT budgets in energy technology, said Berst of the Smart Cities Council.
One of the most compelling areas in that sector is smart power grids. These grids use two-way communication between the utility and its customers to make more efficient use of energy. Some are even self-healing, meaning the grid uses real-time distribution data to detect and isolate faults, reconfiguring the distribution network to minimize the customers affected. The market for smart grid technology was valued at $37.7 billion in 2012 and is expected to reach 118.1 billion in 2019.
Even though energy-efficiency initiatives entail investing significant capital up front, they offer benefits including climate change mitigation and less spending in the long-term, said Lyndon Dacuan, a spokesperson for business-to-government intelligence company Onvia.
Local governments, known for their limited budgets, do not have the finances to fund the entire smart-city transformation. Nor do they have the technological expertise. That's where the private sector comes in.
"A lot of cities are strapped, and when you get into smaller brackets of government, they only have one IT person," said Dustin Haisler, chief innovation officer of e.Republic, the Center for Digital Government's parent company.
That opens up a wealth of opportunities for established industry giants and start-ups alike to tap into a $175 billion U.S. government technology industry. With big players like IBM, Cisco and Microsoft already in this area, vendors need to set themselves apart by providing a complete package, experts say.
"Cities say they're increasingly frustrated by suppliers taking off their department heads one at a time, trying to sell them a widget," Berst said, referring to his conversations with chief information officers.
Cities are looking for a more comprehensive approach from private partners. They want to install services and products that can be shared across departments. They also want help throughout the process, from installation to outcome.
"They typical government procurement person is buying anything from janitorial supplies to a fire truck to a cloud service," Dacuan said. "When it comes to these more complex, new and emerging purchases, they want assistance."
But part of the problem in quantifying return on investment at the municipal level is complicated by the fact that some of the innovations, drones as an example, fall under fire of police budgets rather than core IT.
Nearly 64 percent of city IT decision makers feel higher pressure to improve service rather than to reduce cost, according to consulting firm Computer Economics. The cloud computing boom is helping cities spend more on innovation by creating budget efficiencies, said David Wagner, vice president of research at Computer Economics.
"IT leaders are currently using the cloud to shift less-vital maintenance work to cloud providers, freeing up their staff for innovation," Wagner wrote in an email.
In 2014 and 2015, city and local governments in the Computer Economics sample reported 85 percent of their budgets going to ongoing support at the median and 15 percent to new projects. The number for ongoing projects is now down to 82 percent at the median for the current year. "It is a modest gain but one I expect to be continue," Wagner said.
Bridget Karlin, managing director of Internet of Things strategy at Intel, said one thing companies need to appreciate is the uniqueness of each city.
"This is very much a process where you want to make sure you understand individually what the city wants and what their priorities might be," she said.
By recognizing what city officials are looking for, companies can explain why their services are worth the upfront cost.
"You need to make sure cities have a sense of what the value proposition is," Karlin said.
When Intel helped develop intelligent parking solutions in Berlin, the company was able to provide quantifiable returns. Residents spent 43 percent less time looking for parking and reduced traffic volume by 8 percent, Karlin said.
While quantifying value is not always straightforward, there are many ways to look at it, Karlin said. Value can come from reducing costs through increased efficiency and productivity, enhancing the quality of life for citizens or enabling them a new convenience, or producing new revenue streams by creating opportunities for local business owners.
Some companies are hesitant to get into business with the government out of fear of its slow pace, bureaucracy and politics, but Shark at the Public Technology Institute said that is a missed opportunity.
"Smart cities is not a fad. It's not going away," he said. "I think anyone who says smart cities is not for me has their head in the sand. ... Business leaders should be asking themselves now, 'What is our smart-city strategy?'"
—By Aneri Pattani, special to CNBC.com