The brick warehouses that line Winnipeg’s Exchange District, the business district for this city in the middle of Canada, look the same as they did in the mid-nineteenth century, but commodity traders and grain transporters have moved out and tech companies have moved in. While agriculture and manufacturing, the industries on which Winnipeg historically relied, faced increasing pressure over the past few decades, the city has developed a tech sector that enabled Winnipeg to reinvent itself and grow in a way mid-sized cities with troubled industrial legacies can follow.

The foundation of Winnipeg’s tech scene is not unusual; most cities with a few hundred thousand people have the same essential features as Winnipeg’s tech community. Winnipeg’s commitment to cultivating tech companies is unique, though. That focus has enabled Winnipeg to turn itself from just another city with a strong university with a good engineering school (the University of Manitoba), a low cost of living and a few areas that have been historic strengths (agriculture, electricity transmission and microbiology) into an attractive place to build a tech company — if you don’t mind the cold.

When speaking with Winnipeg entrepreneurs about how they built their companies, one phrase continually turns up, “Well, I knew a guy in high school.” Winnipeg, while home to 600,000 people, still manages to retain a small-town feel. Founders can easily speak with experts in any number of fields just by seeing who they went to high school with and who those people know.

Winnipeg has capitalized on that combination of small-town feel and big-city resources to become a hub for machine learning companies working on solutions for industries like agriculture and construction that others have been reluctant to touch, in large part since doing so requires knowledge of those industries in addition to ML expertise.

Farmers Edge, a precision agriculture company, helped kick-start Winnipeg’s tech scene by showing how the combination of machine learning and deep industry knowledge can result in a high-flying company. Farmers Edge was started by Wade Barnes and Curtis MacKinnon after growing up on local farms and working together as agronomists. Over the past decade, Farmers Edge has grown from Wade’s basement to an international company with well over $100 million in funding from VCs, including Kleiner Perkins.

Farmers Edge offers a farm management platform, FarmCommand, that enables farmers to use data collected from Farmers Edge-installed on-site weather stations and equipment sensors to make decisions on everything from what to plant and where, to the best way to nurture crops based on real-time data and how to optimize harvests.

While Monsanto and DuPont, Farmers Edge’s main competitors, have excelled in the U.S.’s public data-rich agriculture sector, Farmers Edge has an advantage in data-sparse environments because of the company’s unique private weather network. That has enabled Farmers Edge to sign up millions of acres across Canada, Brazil, Australia, Eastern Europe and other areas with limited public weather stations while the company’s main competitors are still trying to adapt to the demands of data-sparse agriculture, the dominant way agriculture is conducted around the world.

Winnipeg has turned itself into an attractive place to build a tech company — if you don’t mind the cold.

As Farmers Edge achieved global recognition, it also helped Winnipeg develop into an agtech hub that combines the region’s rich farming history with local engineering and ML expertise. Companies like BL Photonics, which introduced low-cost spectrophotometry as a way to test wine as it develops, and Wolf Trax, a company working to optimize fertilizer’s distribution of nutrients and ability to be used by plants, have sprouted up in recent years as farmers increasingly partner with professors from the local University of Manitoba, engineers and entrepreneurs to start companies.

While Canada’s tech scene has been historically concentrated on the coasts, companies are rapidly recognizing the appeal of moving to cities like Winnipeg, especially due to the much lower cost. Wally Trenholm, the CEO of Sightline Innovation, a machine learning company focused on real-time quality inspection for the construction sector, started and grew Sightline in Toronto for several years before deciding to relocate to Winnipeg. He noticed in Toronto that his best engineer graduated from the University of Manitoba and Wally had become fed-up with engineers constantly moving between companies.

For a company like Sightline that is tackling a highly technical challenge, that constant movement was especially troubling, as it prevented engineers from developing deep expertise in a narrow field. Wally relocated Sightline to Winnipeg and never looked back, characterizing operating in Winnipeg as “300 percent productivity, 80 percent cost, and 10 percent of the hassle” of being based in Toronto.

Winnipeg’s government has made encouraging entrepreneurship a top priority as it recognizes that agriculture and manufacturing cannot offer the same opportunities as years past. Winnipeg’s government offers generous tax credits for tech investing and R&D spending, and has encouraged partnerships between startups and government institutions, including labs and hospitals, to aid research.

Winnipeg’s mayor, along with companies including Sightline and Invenia, a machine learning company focused on optimizing electrical grids, started EMILI (Enterprise Machine Intelligence & Learning Initiative) to educate and encourage entrepreneurship in Winnipeg. EMILI and other local resources, like the Manitoba Technology Accelerator (which spawned SkipTheDishes, a Winnipegger food delivery startup sold in December 2016 to Just Eat for ~$100 million, and supported Bold Commerce, Shopify’s largest app developer), have raised the profile of tech entrepreneurship in Winnipeg and played a critical role in fostering Winnipeg’s tech community.

Winnipeg has managed to reinvent itself into a tech hub for central Canada, a region larger than Iran, as the industries Winnipeg historically relied on moved away. The Winnipeg way of creating a tech community, by building on top of unremarkable local attributes, provides a path forward for many mid-sized cities struggling to chart a future.

Aiming to become a tech-friendlier city, not the next Silicon Valley, and solving brain-drain issues by encouraging tech entrepreneurship that leverages historical capabilities fueled Winnipeg’s success and provides a replicable model for other cities to follow.