But what has the erstwhile mayor wrought? Supporters praise his works but critics say the less affluent have missed out

Over the course of three elections and 12 years, Michael Bloomberg spent more than $260m (£160m) of his own money on first winning, and then holding tightly on to, New York city's mayoralty.

On New Year's Day though, his three terms in office end – and he is handing power over without a fight.

Bloomberg leaves office having in many ways defined the New York city of the early 21st century, and having ensured that for the near future at least the city will be shaped in his own image.

Once a Republican, eventually accused in some quarters of attempting to create a nanny state, Bloomberg left his fingerprints on New York's public health, policing, education system and skyline.

Whole neighbourhoods, entire sections of the city, changed in fundamental ways over the 12 years – disused Brooklyn waterfronts became sparkling high-rise apartments and districts once dominated by warehouses and blue-collar jobs were reimagined as parks for families and tourists to enjoy.

Bloomberg's administration poured money into redeveloping Manhattan's far west side, backing a $2.4bn extension of a subway line to carry passengers to projects such as Hudson Yards and Manhattan West, which will take years to complete but will eventually see once-neglected areas turned into developments for businesses and luxury apartments.

The change has been striking, and many areas have undoubtedly been cleaned up and made more desirable. But that has not always been good news for people living in the city.

The reality of New York in 2013 is that 31% of its residents are classified as "severely burdened" by rent – that is, they spend more than 50% of their income simply on having somewhere to live.

The number of people with a severe rent burden has increased under Bloomberg's reign, with NYU's Furman Center reporting that, as the median gross rent in the city increased 10% between 2005 and 2011, the median household income fell.

While this is not just a New York problem – the 2008 financial crisis and ensuing recession caused incomes to stagnate nationwide – the struggle to afford housing in the city is likely to be remembered as part of Bloomberg's legacy, regardless of the actual degree of his responsibility for it.

Bill de Blasio, Bloomberg's successor, seized on this affordability problem in his own mayoral campaign. He told voters that, over the past 12 years, New York became a Tale of Two Cities, a place where the wealthy prospered and the poor suffered.

"Nearly 400,000 millionaires call New York home, while nearly half of our neighbours live at or near the poverty line," Democrat De Blasio said in his campaign material. "Our middle class isn't just shrinking; it's in danger of vanishing altogether."

On the other hand, Bloomberg claims to have built or preserved 165,000 affordable housing units while in office – the largest programme "in the city's long history", his website says.

"We've been astoundedly impressed by the commitment and energy that's gone into the affordable housing production," said Benjamin Dulchin, executive director at the New York-based Association for Neighborhood and Housing Development (ANHD). "But also disturbed by the problems with it. Much of the housing that was built isn't actually affordable to the local community."

According to ANHD, (pdf) only a third of those 165,000 units were affordable to a family earning less than half the median income in the neighbourhood where the housing was built.

While in office, Bloomberg enthusiastically oversaw the rezoning of almost 40% of New York, a process that changed once-industrial areas into plush residential zones or parks, and created public spaces.

Ambitious efforts such as these led to the creation of the celebrated East River Park in Manhattan and Brooklyn Bridge Park in Brooklyn, and have transformed the waterfronts of Williamsburg, Brooklyn and Long Island city in Queens, ridding them of grimy warehouses and putting up sparkling, towering apartment blocks in their place.

But this has not helped those on lower incomes – "not a lot of affordable housing was created out of that rezoning", Dulchin noted.

The waterfront development of Brooklyn was part of the "creative class theory" that drove much of Bloomberg's approach to infrastructure, Dulchin said.

The idea is that in retaining young, vibrant, affluent people by giving them swish housing and beautiful public spaces in which to push fancy prams, you retain the people who create a viable tax base and drive the city forward economically.

The city as a whole did well financially under Bloomberg's guidance, and some of that success did indeed come from those high earners he sought to retain.

A year after he was first elected, he pushed through a property tax hike of 18.5%, the sharpest increase in decades, bringing in an extra $6bn in revenue – much of it from those higher-priced homes and businesses.

In 2008, he again fought to hike property taxes, this time by 7%, as he sought to combat falling revenues.

In November 2013, Bloomberg announced he had fixed a $2bn gap in the city's projected 2015 budget and would be "handing over a balanced budget for the first time in the city's modern history".

But there is a downside to rezoning areas like warehouse districts and turning them into parks or residential areas.

"The problem is that land had been set aside for jobs," Dulchin said. "A fundamental problem with the city is that Bloomberg's been great at growing the upper income economy, and that's an important thing to do.

"But the rest of the city has slipped back to low-end service sector wages. And that middle class – represented by light manufacturing, light industrial jobs that working class people with a moderate education were able to get and have decent wages – much of the land, about 200m sq ft of that land, was rezoned for high end residential."

Critics say the less affluent have also been shortchanged by Bloomberg's education policies.

Diane Ravitch is an education historian and former US assistant secretary of education who has become a critic of the kind of testing and charter schools policies she once favoured.

She noted that under Bloomberg, New York city had increased the amount of standardised testing conducted, and had closed poorly performing schools while opening others, giving parents more choices about where to educate their children. But she said there was little real increase in the quality of education provided.

"If the goal is to educate every child, it certainly isn't working," Ravitch said. "I'm sure he acted in good faith, thinking this would benefit all kids, but it doesn't."

She said the free market approach – giving parents more choice over where their children are educated – means that "you see the affluent families taking advantage of choice and knowing how to work the system and get the best choices for their children … it increases social stratification and reinforces inequity".

While Bloomberg has defended his record, pointing out that New York city has 22 of the state's best 25 public schools, others have said those schools are predominantly in wealthy neighbourhoods or are difficult for students to get into.

Bloomberg's policing strategies also proved controversial, especially over the last few years, as the NYPD's stop-and-frisk programme came under increased scrutiny.

Under Bloomberg and his NYPD commissioner, Ray Kelly, there was a vast increase in the number of stop-and-frisks in New York, even though only about 10% of stops result in arrests.

When Bloomberg took office in 2002, there were just under 100,000 stops. In 2011 that number had soared to almost 700,000, according to NYPD figures.

Opponents of stop-and-frisk say the city's policing has unfairly targeted ethnic minorities.

In 2011, there were more stop-and-frisks of young African-American men in New York city than there are young African-American men in New York city – police conducted 168,000 stops of black men between the ages of 14 and 24 that year, compared with the 158,000 men in that demographic living in the city.

"The legacy of the Bloomberg-Kelly administration on policing is: 'Yes, we have a relatively safe city, but police-community relationships have suffered greatly, particularly relationships between the police department and communities of colour'," said Donna Lieberman, executive director of the New York Civil Liberties Union.

Lieberman believes the use of stop-and-frisk under Bloomberg and Kelly "will have a devastating impact for decades on the lives of an untold number of people of colour in New York".

Those arrested and convicted as a result of the aggressive policing policy face not just jail time but criminal records that mean "marginalisation from the opportunities that are supposed to exist for everybody", Lieberman said.

"Its almost exclusively people of colour who face criminal consequences for smoking marijuana, and it's almost exclusively people of colour who suffer the unemployment barriers, the housing barriers, the future educational barriers of those policies."

Bloomberg's counter-argument to accusations that the NYPD is unfairly targeting minorities has been that minorities disproportionately commit more crime.

The mayor and his supporters have pointed to the city's falling crime rate – the murder rate dropped to the lowest level since the 50s in the first part of 2013 – as evidence of stop-and-frisk's success, although crime has fallen in most big cities in the US over the past two decades.

But in August, federal district court judge Shira Scheindlin ruled stop-and-frisk searches unconstitutional, and ordered a series of policing reforms. (The city appealed the ruling, and a federal appeals court stayed Scheindlin's decision pending the outcome of that appeal, and removed her from the case.

Bloomberg's unprecedented public health reforms also proved controversial, though in the end they have largely been viewed as successful, and offer a sunnier perspective on his three terms.

The mayor's tenure saw the institution of one of the most comprehensive public smoking bans in the US, a ban on trans fats, compulsory calorie listings in chain restaurants and a failed attempt to prohibit large sugary drinks.

"Mayor Bloomberg has transformed in a very visionary way the approaches that a city should take to secure the health of its population," said Linda Fried, dean of Columbia University's Mailman school of public health.

Bloomberg did not decide to aggressively pursue public health policies on a whim, Fried said. His background in business helped influence his decisions.

"The principles he has employed are science- and evidence-based. He understands that about 70% of health is created outside of the medical care system," she said. "And these are the approaches that have the highest return on investment."

Bloomberg's first major public health initiative was the smoking ban, which passed on 30 March 2003. The new mayor got the city council to prohibit smoking in bars and restaurants at a time when such bans were in their infancy.

Looking through old news clippings, it is easier to read comments from dissenters than supporters, but 10 years later it is seen as one of Bloomberg's most important measures.

"They basically have really set the global stage in terms of banning cigarette smoking from restaurants and public places," Fried said. "New York since 2002 has accomplished a 30% decline in adult smoking. That is extraordinary in 12 years."

Brian Elbel is an assistant professor of population health and health policy at the NYU school of medicine.

He pointed to Bloomberg's getting trans fats banned from restaurant foods in 2006, and advocacy for compulsory calorie labelling for chain restaurants, in 2008, as evidence of his success in tackling obesity – among the leading cause of deaths in the US.

"It's increasingly clear that people are looking to what New York city has done as sort of 'what to do next' in terms of public health policies," Elbel said. "A lot of cities in the states and even the federal government is looking at them."

So Bloomberg leaves behind a city healthier than the one he inherited, and safer too – with murder rates at record lows.

As mayor, he has built and preserved a huge amount of affordable housing. He helped turn New York into a more attractive place to live – and a more expensive one – but fell short in helping to create the jobs the middle and working classes need in order to be able to afford to live there.

Looking back at Bloomberg's 12 years in office, it is easy to see how De Blasio's Tale of Two Cities rhetoric proved to be such a good fit for so many voters, and how the mayoral campaign turned into a race to become the anti-Bloomberg candidate, even as about half the city approved of the job he was doing.

Michael Bloomberg will be remembered as a mayor almost unique in New York city's history, one who had a profound impact on the way it operates and looks and feels, but he presided over a period in which New York became a better place to live for those with money, and, in many ways, a worse one for those without.