Donald Trump smiled as he crashed a wedding at his exclusive New Jersey golf club last weekend, shortly after a gunman posted an anti-immigrant screed online and killed 22 people at a Walmart in Texas.

The president appeared to be in good spirits while waving to the cheering guests and clapping for the bride and groom. It was unclear whether he had yet been briefed on the massacre, which happened just hours before another gunman opened fire on a busy street in Dayton, Ohio.

Still, Mr Trump’s absence from Washington, paired with viral photos of the president celebrating in his club during a weekend of gun violence that left at least 31 dead, sparked a swift backlash from Americans as they called on their politicians to “do something” about gun violence.

But this weekend’s trip to Bedminster, New Jersey, at the start of an extended break, is nothing new: the president has regularly flown from the White House to his private resorts and exclusive golf clubs. He is now beginning a 10-day retreat, where he is expected to golf throughout. All the while he has been visiting his own resorts, Mr Trump has contributed to a major scandal: an enormous, ever-growing price tag for taxpayers due to his golfing habits.

The US Secret Service has now spent over $1m (£829,600) to protect the president during golf outings at his private clubs in Florida, Washington and New Jersey, according to American Bridge 21st Century, a research group that has tracked government spending at Trump properties and shared its findings with The Independent.

Trump protests: President visits Texas and Ohio after mass shootings Show all 31 1 /31 Trump protests: President visits Texas and Ohio after mass shootings Trump protests: President visits Texas and Ohio after mass shootings Miami Valley Hospital, Dayton Demonstrators chant as they protest the arrival of President Donald Trump outside Miami Valley Hospital after a mass shooting that occurred in the Oregon District AP Trump protests: President visits Texas and Ohio after mass shootings El Paso Trump headed to El Paso, after visiting Dayton, Ohio to offer a message of healing and unity, but he was met by hostility in both places by people who fault his own incendiary words as a contributing cause to the mass shootings AP Trump protests: President visits Texas and Ohio after mass shootings El Paso, University Medical Centre US President Donald Trump greets first responders as he visits El Paso Regional Communications Centre AFP/Getty Trump protests: President visits Texas and Ohio after mass shootings El Paso, University Medical Centre An anti-Trump protestor holds a sign as police are lined up outside University Medical Centre Getty Trump protests: President visits Texas and Ohio after mass shootings El Paso Demonstrators hold a sign as the motorcade carrying President Donald Trump departs a joint operations center after meeting with first responders after the El Paso mass shooting, Wednesday, Aug. 7, 2019, in El Paso, Texas. (AP Photo/Evan Vucci) Evan Vucci AP Trump protests: President visits Texas and Ohio after mass shootings El Paso Anti-Trump protesters hold a banner outside the makeshift memorial to the victims of the WalMart shooting that left a total of 22 people dead, in El Paso, Texas, on August 7, 2019. - President Donald Trump consoled victims of a mass shooting in Ohio on Wednesday but protesters and opponents denounced what they say is his extremist rhetoric on race and immigration. The president's trip to Dayton, where nine people were gunned down over the weekend, was to be followed immediately after by a stop in the border city of El Paso, Texas, where 22 were murdered. (Photo by Mark RALSTON / AFP)MARK RALSTON/AFP/Getty Images MARK RALSTON AFP/Getty Trump protests: President visits Texas and Ohio after mass shootings Miami Valley Hospital, Dayton Demonstrators gather to protest the arrival of President Donald Trump outside Miami Valley Hospital after a mass shooting that occurred in the Oregon District early Sunday morning, Wednesday, Aug. 7, 2019, in Dayton. Twenty-four-year-old Connor Betts opened fire in Dayton early Sunday, killing several people including his sister, before officers fatally shot him. (AP Photo/John Minchillo) John Minchillo AP Trump protests: President visits Texas and Ohio after mass shootings El Paso Democratic presidential candidate Beto ORourke hugs a woman at a makeshift memorial outside Walmart honoring victims of the mass shooting there which left 22 people dead. Getty Trump protests: President visits Texas and Ohio after mass shootings El Paso Anti-Trump protesters hold signs outside the makeshift memorial to the victims of the WalMart shooting that left a total of 22 people dead, in El Paso, Texas, on August 7, 2019. - President Donald Trump consoled victims of a mass shooting in Ohio on Wednesday but protesters and opponents denounced what they say is his extremist rhetoric on race and immigration. The president's trip to Dayton, where nine people were gunned down over the weekend, was to be followed immediately after by a stop in the border city of El Paso, Texas, where 22 were murdered. (Photo by Mark RALSTON / AFP)MARK RALSTON/AFP/Getty Images MARK RALSTON AFP/Getty Trump protests: President visits Texas and Ohio after mass shootings El Paso Marisela Hernandez holds sign to protest the visit of President Donald Trump to the border city after the Aug. 3 mass shooting in El Paso, Texas, Wednesday, Aug. 7, 2019. Aiming to play the traditional role of healer during national tragedy, President Donald Trump paid visits Wednesday to cities reeling from the mass shootings. (AP Photo/Andres Leighton) Andres Leighton AP Trump protests: President visits Texas and Ohio after mass shootings El Paso, University Medical Centre An anti-Trump demonstrator holds up a placard outside the University Medical Center, where U.S. President Donald Trump holds a meeting with first responders in the wake of last weekend's mass shootings at a Walmart store, in El Paso, Texas, U.S., August 7, 2019. REUTERS/Jose Luis Gonzalez JOSE LUIS GONZALEZ Reuters Trump protests: President visits Texas and Ohio after mass shootings El Paso, University Medical Centre President Trump and First Lady Melania Trump greet PFC Glendon Oakley (second right), who saved several lives during the mass shooting in Texas AFP/Getty Trump protests: President visits Texas and Ohio after mass shootings Miami Valley Hospital, Dayton Demonstrators chant as they protest the arrival of President Donald Trump outside Miami Valley Hospital after a mass shooting that occurred in the Oregon District early Sunday morning, Wednesday, Aug. 7, 2019, in Dayton. (AP Photo/John Minchillo) John Minchillo AP Trump protests: President visits Texas and Ohio after mass shootings El Paso, University Medical Centre An anti-Trump demonstrator holds up a placard as police block the area outside the University Medical Center, where U.S. President Donald Trump holds a meeting with first responders in the wake of last weekend's mass shootings at a Walmart store, in El Paso, Texas, U.S., August 7, 2019. REUTERS/Jose Luis Gonzalez JOSE LUIS GONZALEZ Reuters/Amanda Voisard Trump protests: President visits Texas and Ohio after mass shootings El Paso Beto ORourke consoles a man at the makeshift memorial outside Walmart Getty Trump protests: President visits Texas and Ohio after mass shootings El Paso, University Medical Centre An anti-Trump demonstrator yells near police outside the University Medical Centre Reuters Trump protests: President visits Texas and Ohio after mass shootings El Paso TOPSHOT - El Paso residents protest against the visit of US President Donald Trump to the city after the Walmart shooting that left a total of 22 people dead, in El Paso, Texas, on August 7, 2019. - President Donald Trump consoled victims of a mass shooting in Ohio on Wednesday but protesters and opponents denounced what they say is his extremist rhetoric on race and immigration. The president's trip to Dayton, where nine people were gunned down over the weekend, was to be followed immediately after by a stop in the border city of El Paso, Texas, where 22 were murdered. (Photo by Mark RALSTON / AFP)MARK RALSTON/AFP/Getty Images MARK RALSTON AFP/Getty Images Trump protests: President visits Texas and Ohio after mass shootings Dayton President Donald Trump and First Lady Melania Trump arrive at Wright-Patterson Air Force Base AP Trump protests: President visits Texas and Ohio after mass shootings El Paso Makeshift memorial for victims of the shooting that left a total of 22 people dead at the Cielo Vista Mall Walmart AFP/Getty Images Trump protests: President visits Texas and Ohio after mass shootings Miami Valley Hospital, Dayton Demonstrators gather to protest the arrival of President Donald Trump outside Miami Valley Hospital after a mass shooting that occurred in the Oregon District early Sunday morning, Wednesday, Aug. 7, 2019, in Dayton. (AP Photo/John Minchillo) John Minchillo AP Trump protests: President visits Texas and Ohio after mass shootings President Trump greets Dayton Mayor Nan Whaley as he arrives at Wright-Patterson Air Force Base AFP/Getty Trump protests: President visits Texas and Ohio after mass shootings Miami Valley Hospital, Dayton Demonstrators gather to protest the arrival of President Donald Trump outside Miami Valley Hospital after a mass shooting that occurred in the Oregon District early Sunday morning, Wednesday, Aug. 7, 2019, in Dayton, Ohio. Twenty-four-year-old Connor Betts opened fire in Dayton early Sunday, killing several people including his sister, before officers fatally shot him. (AP Photo/John Minchillo) John Minchillo AP Trump protests: President visits Texas and Ohio after mass shootings Dayton Damon Smith presents a message to President Donald Trump beside a makeshift memorial in Dayton AP Trump protests: President visits Texas and Ohio after mass shootings Miami Valley Hospital, Dayton Demonstrators gather in front of an inflatable "Baby Trump" to protest the presidents arrival AP Trump protests: President visits Texas and Ohio after mass shootings Miami Valley Hospital, Dayton Demonstrators gather to protest the arrival of President Donald Trump outside Miami Valley Hospital after a mass shooting that occurred in the Oregon District early Sunday morning, Wednesday, Aug. 7, 2019, in Dayton. President Donald Trump is headed to Dayton and El Paso, Texas on Wednesday to offer a message of healing and unity, but he will be met by unusual hostility in both places by people who fault his own incendiary words as a contributing cause to the mass shootings . (AP Photo/John Minchillo) John Minchillo AP Trump protests: President visits Texas and Ohio after mass shootings El Paso A photo of victim Javier Amir Rodriguez, a 15-year-old sophomore Getty Trump protests: President visits Texas and Ohio after mass shootings Dayton Demonstrators protest the visit of US President Donald Trump to the site of the mass shooting in Dayton, Ohio, on August 7, 2019. - Nine people were killed on August 4 in the city's popular Oregon District. (Photo by Megan JELINGER / AFP)MEGAN JELINGER/AFP/Getty Images MEGAN JELINGER AFP/Getty Trump protests: President visits Texas and Ohio after mass shootings El Paso A message is left for Donald Trump AFP/Getty Trump protests: President visits Texas and Ohio after mass shootings El Paso Signs and flags adorn the makeshift memorial for victims of the shooting that left a total of 22 people dead at the Cielo Vista Mall Walmart, in El Paso, Texas, on August 7, 2019. (Photo by Mark RALSTON / AFP)MARK RALSTON/AFP/Getty Images MARK RALSTON AFP/Getty Trump protests: President visits Texas and Ohio after mass shootings El Paso People hug at the makeshift memorial AFP/Getty Trump protests: President visits Texas and Ohio after mass shootings El Paso People pray at the makeshift memorial AFP/Getty

The figure amounts to $1,123,305, and includes everything from $529,265 that the agency spent on golf carts, to $579,440 for portable restrooms, mobile offices, scaffolding and ballistic glass.

It might be surprising that the 45th president has proved such a dedicated linksman since taking office. While Barack Obama was still in the White House, Mr Trump continually criticised him for playing golf, suggesting that he should be devoting his time to weighty matters of state instead.

In October 2014 he tweeted: “Can you believe that, with all of the problems and difficulties facing the US, President Obama spent the day playing golf. Worse than Carter.”

The next day he followed up with: “We pay for Obama’s travel so he can fundraise millions so Democrats can run on lies. Then we pay for his golf.”

In 2016 he told an election rally: “I love golf, but if I were in the White House, I don’t think I’d ever see Turnberry again. I don’t think I’d ever see Doral again. I don’t ever think I’d see anything. I just want to stay in the White House and work my ass off.”

But since being elected, his scruples about taking to the course seem to have disappeared.

“Donald Trump promising that he would never golf and work so hard is probably the ultimate broken Donald Trump promise in a long list of promises,” Jeb Fain, a communications director for American Bridge 21st Century, told The Independent. “Taxpayers have a right to know how they’re funding his lazing around a golf course … and it’s absolutely astounding when you break it down.”

The latest estimates showed Mr Trump spent at least 202 days of his presidency playing golf before departing on his latest holiday.

The total cost to taxpayers for Mr Trump’s golf trips has reportedly amounted to nearly $107m, and a HuffPost analysis revealed each Bedminster trip costed $1.1m.

When compared to past presidents like Obama, who played golf a reported total of 306 times throughout the eight years of his presidency, Mr Trump’s frequent vacations from the White House are notable.

The president largely visits his own properties despite critics noting he was effectively profiting from his position as commander-in-chief.

Support free-thinking journalism and attend Independent events

The White House has previously sought to defend Mr Trump’s golf expenditure in New Jersey by saying the president was visiting his Bedminster property to avoid higher fees that would allegedly come with him staying at the Trump Tower in New York, his former residence.