Long Islanders may have their grievances, but according to a new assessment, some Nassau and Suffolk county residents are happier than their upstate peers.

According to Zippia.com, a career resources website, six out of the state’s 10 happiest places are on the Island, with Setauket-East Setauket in fourth place, North Wantagh in fifth, North Hills in sixth and West Hills, North Merrick and Cold Spring Harbor ranking eighth, ninth and 10th.

The website said it compiled data from the Census Bureau’s 2010-2014 American Community Survey to come up with an index for 341 hamlets, villages, towns and cities with more than 2,000 residents.

Weighted factors included college degree attainment, employment rate, work commute, cost of living, homeownership, poverty rate and number of families.

Niskayuna, in Schenectady County topped the list, followed by Westvale in Onondaga County and Harris Hill in Erie County.

advertisement | advertise on newsday

Plainview narrowly missed the top 10, taking 11th place. In fact, more than half of the top 50 places are on Long Island.

New York City, which a 2014 University of British Columbia study declared the unhappiest city in the United States, took last place in the Zippia survey.

Find out where your hometown ranks at www.zippia.com/advice/happiest-places-in-new-york/.