The Big Apple has long been a juicy location for startups. Now a new report shows New York City is gaining ground on the West Coast. It ranks the city as the second best global hotbed for entrepreneurship, behind only Silicon Valley.

Research firm Compass partnered with CrunchBase to create the 2015 Global Startup Ecosystem Ranking, which assessed 20 metropolitan areas across the world. Factors included general performance, venture-capital investment, talent pool, market reach, and worker experience. 

New York was ranked at No. 5 back in 2012. How did it make such a huge leap--and in just three years? Here's a quick look at why.

1. Growing a Big Base

For starters, the city boasts a staggering total economic output of $1.5 trillion. That's good news for small businesses, because it means higher potential for job creation, wage growth, and tech economic output. 

Audicus, a New York-based startup that sells hearing aids, has benefited handsomely from its location. Founder and CEO Patrick Freuler has been able to take on about 15 employees in recent years, thanks to the city's massive and diverse talent pool.

New York has made big efforts to create more opportunities for startups with stepped-up efforts in job creation, VC funding and government support. For example, the city has undertaken tech upgrades to adapt to the Information Era.

New York Mayor Bill de Blasio has made it a top priority to carry on former Mayor Michael Bloomberg’s tech-focused agenda. The NYC Tech Talent Pipeline is a $10 million public-private partnership designed to support the growth of the city’s tech ecosystem and prepare people for 21st century jobs. 

Digital.NYC is the city's official online resource for startups, bringing together every company, investor, event, job, class, workspace, incubator, and organization in the five boroughs. The comprehensive web portal gives expanding businesses the opportunity to operate tax-free for 10 years on or near eligible university or college campuses in the state.

2. Diversity

Overall, New York has created more jobs during the past five years than during any five-year period in the past century, according to the New York Times. It should be noted that this is due in large part to the rebound from major job losses during the 2008 financial crisis. Currently, there are about 9,600 startups in the New York metropolitan area. 

"We're able to attract a lot of really good talent, because at the end of the day, New York is a bit of a melting pot," says Freuler.

With a young, tech-savvy populace, New York has a notably diverse client base and talent pool. This isn't just within the city proper. With its five boroughs, large transit system and metro footprint, there's plenty of room for a startup to grow beyond Manhattan and Brooklyn. A company can expand into the outer boroughs and across into New Jersey, where living costs are far lower.

The big drawback is the competition in hiring. Even smaller startups must compete with industry giants like Google and Facebook for top talent, so attracting new workers can become more costly. 

3. Access to Capital

Worries about costs can be offset by the promise of relatively easier access to funding. 

New York has the second-highest concentration of venture capitalists worldwide, behind only Silicon Valley. 

Audicus secured $1.6 million in seed funding from family offices and angel investors to operate what Freuler describes as an "online hearing clinic:" It allows customers with poor hearing to log onto the site and receive a diagnosis from a certified hearing specialist from the company. After the assessment, they receive a custom hearing aid via mail.

Freuler attributes the ease in raising first-round funding to the city's thriving venture-capital scene. "In New York, you might find more people who are willing to take a stab," he says.

Audicus hearing aids, it's worth noting, sell for a significantly lower price point (between $500 and $700) than traditional hearing aids (around $2,000). The startup cuts out the brick-and-mortar clinic, or "middle man," to sell products at a discounted price.

4. Market Size

As one of the best-connected urban centers in the world, New York has seen an emerging trend of entrepreneurs setting up second offices for sales and marketing, mostly due to the city's strong market reach.

Audicus operates as an e-commerce business, and Freuler says that he can reach "anyone with an internet connection and a mailbox." New York's broad market reach helps less with enticing more global customers, and more by connecting Freuler to fresh partners.

He adds that the medical community is more established in New York compared with other East Coast locations, which helps to lend Audicus the credibility it needs to convince customers that they can trust the product. The company recorded around $2 million in sales last year, and anticipates to double the amount in 2015.

"When I first moved to New York, maybe three or four years ago, the ecosystem was still extremely new. It wasn't easy," says Freuler. "But it's been really interesting to see how the city came up from behind, and is truly is establishing itself as a startup-friendly tech hub."