While there is no shortage of complaints from New Jerseyans about the sky-high cost of living or the state being too crowded, two of the best places in the country to live are right here in the Garden State, according to Money magazine's annual list of the 50 Best Places to Live.

Taking into account factors such as cost of living, education, housing and crime, among others, the magazine named Parsippany-Troy Hills as the 26th best place to live in the U.S. in 2018. Union made the list at No. 43.

In their reasoning, Money highlighted that Parsippany-Troy Hills, a Morris County township with over 50,000 residents, has one of the best school systems they evaluated in New Jersey and has a low crime rate. While it is close to cities like New York City and Newark, Parsippany-Troy Hills has more than 30 parks.

"With good schools -- among the highest scoring of any New Jersey locale we evaluated -- and low crime, the township is a good place for families," the magazine wrote.

Like Parsippany-Troy Hills, Money noted Union's proximity to major cities, while also offering a more typical suburban life, as a major reason why the township of just under 60,000 made the top 50.

"Year-round local advantages include ultra-low crime risk, high graduation rates, and home prices that, despite Union's proximity to New York, are right around the national median," the magazine wrote.

Money also noted Union's robust diversity, describing it as a "majority-minority community," where the demographics have shifted significantly in recent years.

To determine the ranking, Money examined municipalities that have over 50,000 residents and then eliminated places that had double the national crime risk, had less than 85 percent of its state's median household income or a lack of ethnic diversity. That left them with 583 places.

From there, according to the ranking, the magazine analyzed a variety of data points to narrow down the list, with the highest emphasis being put on economic health, public school performance and local amenities. Housing, cost of living and diversity were also heavily weighed.

Joe Atmonavage may be reached at jatmonavage@njadvancemedia.com. Find NJ.com on Facebook.