The Dallas Police headquarters. (Tony Gutierrez/AP)

Police in the United States shot and killed 31 people during the first week of July, making it the deadliest such week of the year so far.

This stretch ended Tuesday with officers across the country shooting and killing eight people, the most police shootings that have occurred on any single day in 2015 — ending the deadliest week so far with the deadliest day.

These deaths push the total number of people fatally shot by police this year to 494 in a little over six months, according to a Washington Post analysis. That number easily exceeds the figures reported by the FBI for any single year since 1976, pointing to the incomplete nature of federal data, which relies on voluntary reporting and patchy information.

Due in part to this inadequate data, which has been highlighted repeatedly as a bizarre gap during the ongoing debate over how police officers use deadly force, The Washington Post is tracking every fatal shooting by a police officer in the line of duty in 2015. These stories are being collected in a database that includes details about each episode. (Read more about the methodology here.)

Tuesday’s fatal shootings occurred across six states — three of the deaths took place in Texas, while the remaining five stretched from California to New Jersey. The circumstances ranged from an armed carjacker who police said fired at an officer to a Texas man who police said had threatened to kill himself.

[A quarter of the people shot and killed by police were having a mental or emotional crisis]

There were some similarities in the cases on Tuesday. All eight of the people shot and killed were men, and all of them had deadly weapons, according to The Post’s analysis.

In some cases, the police were encountering people they had sought to arrest, while in others they were responding to calls from the public.

Officers in Dallas traveled to a block of North Bishop Avenue near the Methodist Dallas Medical Center on Tuesday afternoon to try to arrest a wanted and known sex offender, the police department said, but when they approached the man, he pulled out a gun and refused to drop it. As a result, police officials said, they were forced to open fire, killing the man, who was later identified as Joe Cody, 59.

A few hours later, police officers in Bakersfield, Calif., responded to calls of a man who was firing a gun in a park located between a middle school and an elementary school. Within a minute of arriving, the officers reported that they had shot this person and requested medical aid, the department said in a statement. The suspect died, and the officers were placed on paid administrative leave.

[Fewer police officers are killed each year, but they report increased tension amid protests]

There were 31 people shot by police during the first seven days of the month; before July, the deadliest single week was a period in mid-March with 26 such shootings.

Meanwhile, the single week with the fewest such shootings happened to be the last week of June, when nine people were shot and killed by officers. In other words, at the midpoint of the year, the weeks with the most fatal police shootings and the fewest occurred back-to-back.

Overall, though, the first week of July saw nearly half as many fatal shootings by police (31) as occurred in the entire month of June (64). So far this year, the deadliest single month has been March, when 90 people were shot by police officers.

Steven Rich and Jennifer Jenkins contributed to this report.

Related:

The Post’s database on police shootings

How The Post is tracking these shootings

Since 1976, the FBI hasn’t counted more than 460 fatal police shootings in a year. We’ve counted 463 already in 2015.

Current and former police officers describe tension in current environment