Flexibility has become the No. 1 priority for workers today as advances in technology make it more challenging than ever to maintain a work-life balance.In fact, a recent survey by online job platform FlexJobs revealed that 71% of millennials have considered leaving a job because it did not offer flexible work arrangements. And of those polled, 28% said they actually would be willing to give up vacation time in exchange for more flexibility or remote work options.Indeed, more companies are starting to relax their strict 9-to-5 policy, but millennials, especially, are still worried about finding a career path that will support the fluid lifestyle they desire, one of the factors leading the surge in today’s freelance economy: There are currently 56.7 million freelancers in the U.S., an increase of 3.7 million over the past five years, says a new report from Freelancers Union and Upwork.For more on tech, transformation and the future of work, join CNBC at the @ Work: People + Machines Summit in San Francisco on Nov. 4. Leaders from Dropbox, SAS, McKinsey and more will teach us how to balance the needs of today with the possibilities of tomorrow, and the winning strategies to compete.But while freelancing offers many luxuries — such as the freedom to choose your projects, your clients and your hours; the power to control your income; and more money and time for leisurely activities rather than wasted on a lengthy commute — there are still a number of other factors to consider if you are opting to be your own boss.Location is one of them.Not all cities are ‘freelancer-friendly’Working wherever you want, from your home office or your sofa to your local coffee shop, sounds appealing, but freelancers should beware: Not all cities are “freelancer-friendly.” For instance, some cities have much slower internet speeds and steep rents. Others have limited ways of getting around town, a pain point for freelancers who need to meet up with clients on a regular basis. Some areas lack a lively activities scene, which can be extremely isolating for a freelancer.”Cities should want to attract independent workers, because they’re good for the local economy. Thanks to the well-known “multiplier effect,” for every professional that moves there, there are actually up to 4.3 jobs created in total: The freelancer will spend the money he or she earns locally, which in turn creates work for lawyers, schoolteachers, dentists, retail staff and restaurant workers,” says Stephane Kasriel, CEO of Upwork, a global freelancing platform where businesses and independent professionals connect and collaborate remotely.In order to make things easier for current or aspiring freelancers, Neighborhoods.com created a ranking of the best — and worst — cities in the country to live and work as a freelancer.To determine the rankings, Neighborhoods.com analyzed U.S. Census Bureau data from more than 150 cities and compared those cities across five metrics, including median rent, average internet speed, number of coffee shops per capita, income taxes (based on the median freelancer income of $52,074) and ease of getting around town (based on the average of combined walkability, transit and biking scores). All metrics were weighted equally, at 20 points each.Here are the best and worst cities for freelancers, according to Neighborhoods.com., along with the cities on this list that top each category.Neighborhoods.com Sept. 2019Cost of livingBest cities: Tempe, Arizona; Spokane, Washington; Las Vegas and San AntonioCost of living is one of the most important factors for freelancers. For this metric, Neighborhoods.com considered both the median rent of a one-bedroom apartment as well as income taxes based on the median freelancer income of $52,074. The average rent of the top 30 cities on its list is $1,139. Cities like Tempe, Arizona; Spokane, Washington; Las Vegas and San Antonio all had a median rent of less than $1,000.Internet speedBest cities: Austin, San Antonio and Garland, TexasMost freelancers are at the mercy of the internet, so having one that is fast and reliable is a priority. If the internet speed is slow, it could take longer to complete a project, which means potentially losing out on future work from clients. If fast internet is a top priority, you may want to look at Texas for your home base. Six Texas cities appear on Neighborhood.com’s top 30 ranking, and three of those cities (Austin, San Antonio and Garland) have download speeds of 60 Mbps or faster, according to BroadbandNow data.Neighborhoods.com Sept. 2019Getting aroundBest cities: St. Paul, Minnesota; Tempe, Arizona; Ann Arbor, Michigan; Pittsburgh; Salt Lake City; Tacoma, Washington; Hialeah, Florida; and Fort LauderdaleNot only is internet speed important for freelancers but so is the ease of getting around town. From meeting up with clients to finding the perfect coffee shop, freelancers are no strangers to being out and about throughout the day.Freelancers who need to get around town quickly should look to the following cities: St. Paul, Minnesota; Tempe, Arizona; Ann Arbor, Michigan; Pittsburgh; Salt Lake City; Tacoma, Washington; Hialeah, Florida; and Fort Lauderdale. All eight cities have an average walkability, transit and bike score of 50 or more.Coffee shopsBest cities: Las Vegas and Sin City, Nevada; Spokane, Vancouver and Tacoma, WashingtonAccording to Kasriel, coffee shops are more important to freelancers than many people realize. Upwork’s 2019 Freelancing in America study found that nearly two-thirds, or 64%, of freelancers say they’re interested in working in alternative workspaces, such as coffeehouses.A man uses the Internet on his laptop computer at a Starbucks coffee shop in New York City.Getty Images | Spencer PlattNeighborhoods.com analyzed data from more than 20,000 Starbucks locations to determine which cities have the most Starbucks locations per 100,000 people. What they found: Las Vegas is No. 1 when it comes to Starbucks per capita, and Sin City is home to a whopping 25.3 per capita. Spokane and Tacoma also has a large amount of Starbucks locations.THE OVERALL BEST AND WORST CITIES FOR FREELANCERSA sixth metric?Kasriel claims that a sixth metric — the number of freelancers in a given city — should also have been included in the Neighborhoods.com study.”One of the main challenges for remote workers can be isolation. That’s why having a local community of other similar professionals who can provide support, connection and networking opportunities is so important. The more of a critical mass of freelancers you can get in a place, the more effective they all become,” he says.Kasriel also says that, based on Upwork’s 2019 study, 46% of freelancers say they’re unable to work for a traditional employer due to personal circumstances, such as health issues or familial obligations.”Cities would do well to take that into account by offering services like affordable childcare, public parks and accessibility assistance for those with disabilities,” he says.