Data can help solve crimes. Increasingly, police also are using statistics to prevent them.

In Portland, police data show that your odds of getting assaulted are highest between 1 and 2 a.m., especially if you’re in the Old Port area.

And your car or your business is most likely to get broken into during July.

While Portland has a relatively low crime rate overall, a Portland Press Herald analysis of calls for service involving crimes ranging from assaults to burglaries found that patterns emerge for different times of the day, days of the week and months of the year when some crimes occur more often, and when police are most likely to be called.

In 2013, most aggravated assaults – those in which a serious injury resulted or a weapon was used – were recorded in Portland between 1 and 2 a.m., with eight of the 52 aggravated assaults reported between those hours. There were 46 simple assaults during that time period, out of a total of 503.

Knowing when and where different crimes occur helps police figure out where and when to deploy resources. It also can help residents and visitors take steps to enhance their safety and security.

“Offenders criminalize familiar areas. There are detectable patterns associated with the times and locations of their crimes,” Zach Friend, crime analyst for police in Santa Cruz, California, wrote in the April edition of FBI Law Enforcement Bulletin. With a population of 60,000 – roughly the same size as Portland – Santa Cruz is using historical crime data to forecast where and when crimes will happen to maximize police effectiveness.

It’s no surprise that the hour after 1 a.m., especially on weekends, is one of the most problematic for Portland law enforcement. That’s when the city’s bars close down and patrons – some of them drunk or belligerent – spill onto the sidewalks of the Old Port and other busy commercial areas downtown, where the majority of assaults took place in 2013.

When gunfire erupted outside Sangillo’s Tavern on Hampshire Street on Jan. 28 this year, sending one man to the hospital with serious injuries, the confrontation occurred between 1 and 2 a.m., just as many bar patrons were leaving. Police, many of whom were patrolling in the area, quickly swarmed the blocks around the bar to interview a large number of people. The case remains unsolved.

The next busiest time for assaults is early evening. There were 36 simple assaults reported in Portland between 7 and 8 p.m. last year, with 35 assaults reported in the following hour, between 8 and 9 p.m. The second busiest time for aggravated assaults was at 8 p.m., with six reported.

Police, however, caution against assigning all the blame for late-night assaults to the timing of bar closings, saying that’s oversimplifying the problem.

“You need to drill down into each incident. If you look at a specific area like the Old Port, there probably is a nexus to (bars closing). It could also be a boyfriend and girlfriend getting home after a night of drinking, and they get into a domestic assault,” said Portland Assistant Chief Vern Malloch.

“The Old Port has actually become much safer in recent years than it was in the past. We have fewer arrests and fewer reports of disturbances,” Malloch said. Regardless, police continue to study trends, and when necessary, put additional officers there.

Warmer weather also brings its share of crime.

Last year, July was the busiest month for overall crime in Portland, when there were 60 assaults, ranging from fistfights to attacks involving weapons, 41 burglaries of a commercial building and 109 burglaries of vehicles. August saw the highest number of residential burglaries, with 50.

Many property crimes are crimes of opportunity, common when the weather is nice and people – perpetrators and victims – are outdoors, particularly at night, said Cmdr. Gary Rogers, head of patrol for Portland police. School is out of session, leaving youthful offenders with extra time. People are more likely to leave homes and cars unsecured in the summertime, relying on screen doors and leaving windows open.

“One of the things we do benefit from is long, cold winters that definitely help suppress crime,” Malloch said.

Certain crimes also tend to take place in specific areas of Portland. Commercial burglaries are concentrated downtown, mainly in the Old Port and waterfront areas, where more businesses are concentrated. Residential crimes occur most often off the peninsula, where businesses are fewer and houses more plentiful.

Few cities in Maine track crime by the time of day, day of week and month, as Portland does. Those that do have seen a different crime dynamic, since they have smaller populations and fewer businesses or bars concentrated in one or two areas.

The times of the day and year when crimes occur vary, but using that data to assign resources is becoming an increasingly important law enforcement tool nationally as police try to be more proactive about preventing crime, rather than just reacting to it.

“There’s a big trend in predictive policing, to try to predict when the problems are going to occur before they occur,” Malloch said. “There are software programs out there now that help us to identify these things on a level we may not have recognized before. If you identify it sooner, you can actually take action sooner in a preventative way.”

Santa Cruz has employed predictive policing since 2011, using mathematical analysis to forecast criminal events and seeing a 19 percent reduction in burglaries in the first six months, according to Friend, the police crime analyst. The program has since spread to departments around the country.

Predictive policing doesn’t seek to identify what crime will happen at a specific address, but tries to identify whether some criminal activity will occur in a fairly narrow geographic area – in Santa Cruz, it’s 500 square feet – to help police assign officers and prevent those crimes, Malloch said.

Some of that is already at work in Portland.

“From 10 p.m. to 2 a.m. we are staffed the heaviest, and that applies to Friday and Saturday nights in particular,” Malloch said. Many of those officers are in the Old Port for closing time, especially on weekend nights when crowds are biggest.

A visible show of force can help to tamp down unruly behavior, so teams of officers, often four in a group, are stationed at key corners.

“I think things have improved dramatically over the years,” said Doug Fuss, owner of Bull Feeney’s bar downtown and chairman of the Portland Downtown District’s Nightlife Oversight Committee. Fuss said assaults at that time of night are endemic if bars all shut down at the same time.

He credited a visible police presence with helping cut down the number of incidents, as well as better practices by bars, such as posting security outside at closing time to get people to disperse.

“It’s the concentrations that cause conflicts,” Fuss said.

For crimes such as burglaries, thefts and robberies, which can come in waves, Portland uses a crime analysis tool called Compstat, which draws from business analytics.

“Compstat is really a look back at what happens and looking forward, what are we going to do to address it and prevent it from happening, identifying specific perpetrators and apprehending them sooner so they are in custody before they commit new crimes,” Malloch said.

Criminals are creatures of habit, and an analysis of the time, location and nature of crime can help lead detectives to a suspect.

“The chances are the person who burglarized your business – they are going to continue to do burglaries until they’re apprehended,” Malloch said.

Police would not provide specific numbers on how many officers patrol a given part of the city at any particular time, saying it was sensitive operational information.

They also cautioned against using reporting data to extrapolate when property crimes occurred. Car burglaries seem to be reported most often in the early evening, but some of those reports indicate that’s when people return from a dinner out to discover their car has been broken into. Geographically, more car burglaries are reported in the West End and downtown areas of Portland, where restaurants, clubs and bars are plentiful.

More often, police say, cars are burglarized overnight. Also, police reports often list the time of a car break-in as whenever the owner last used the car, so a vehicle parked for the night at 8 p.m. and discovered broken into the following morning might be reported as a car burglary at 8 p.m., Malloch said.

Many car burglaries take place at parking garages, park-and-ride lots and supermarket parking lots, Malloch said, where criminals can watch someone leave their car and then break in without drawing attention.

At 5 p.m., Portland police typically receive a flurry of reports of car burglaries that have happened during the day.

Most hours of the day reflect little police activity. By 3 a.m., most people are sleeping. And while crime reports pick up after 7 a.m., there are still relatively few crimes reported while most people are at work.

Residential burglaries usually take place during the work day but are reported in the evening when homeowners discover them, police say.