A giant American flag is splashed across the side of the Ardent Mills complex in downtown Alton, Ill. (John Badman/Telegraph via AP)

Patriotism is an inherently difficult thing to quantify. It means different things to different people, certainly.

Which makes measuring it an inherently flawed exercise. But a new study from WalletHub gives it the old college try, basing its data-heavy rankings on 12 measures from sources including the U.S. Census Bureau, the Defense Department and voter-turnout data, among many others. Half of its score is based on military engagement, while half is based on civic engagement — voting, volunteering, etc.

The conclusion: Virginia is the most patriotic state in the country. In fact, it's the only state that scores in the top 10 on both military and civic engagement.

The least patriotic? New Jersey.

Here are the top 10:

  1. Virginia — 69.17
  2. Alaska — 67.94
  3. South Carolina — 62.62
  4. Colorado — 57.51
  5. Georgia — 57.41
  6. Hawaii — 55.08
  7. Montana — 54.87
  8. Alabama — 54.08
  9. Washington — 53.88
  10. New Hampshire — 53.31

As noted above, few states score high on both measures. Red states tend to score higher on military engagement, while blue states tend to score a little higher on civic engagement. Minnesota, for example, ranks first on voter turnout but 48th on military enlistments. Alaska ranks second on military enlistments but 49th on voter turnout.

Because there tend to be bigger differences in military engagement than in civic engagement — particularly on military enlistments, which accounts for a whopping 25 percent of every state's score — states with good scores on the military tend to be higher on the list. It's a big reason why red states overall have a better average score than blue states. Again, this is all subjective.

(One of the civic-engagement measures used, for example, is Google searches for American flags. It's a very small portion of a state's overall score — less than 2 percent — but a good example of the subjectivity we're talking about.)

The 10 least patriotic states, according to this study:

  • 41. Louisiana — 35.75
  • 42. Michigan — 34.83
  • 43. California — 34.42
  • 44. Pennsylvania — 33.2
  • 45. Massachusetts — 31.89
  • 46. Illinois — 31.02
  • 47. Rhode Island — 30.91
  • 48. New York — 26.4
  • 49. Connecticut — 26.34
  • 50. New Jersey — 19.47

Below are five highest-scoring states and lowest-scoring states on some of the 12 measures used by the study:

Source: WalletHub

And in case you're curious, here is the methodology behind the study:

Military engagement — total points: 50

  • Percentage of residents who enlisted in the military in 2014 (non-prior service): triple weight (~25 points).
  • Number of veterans per 1,000 residents: full weight (~8.33 points).
  • Number of active-duty military personnel per 100,000 residents: full weight (~8.33 points).
  • Percentage of people in military reserves: full weight (~8.33 points).

Civic engagement — total points: 50

  • Percentage of residents who voted in the 2012 presidential election: double weight (~12.9 points).
  • Percentage of people who voted in the 2016 primary elections: full weight (~6.45 points).
  • Volunteer rate: full weight (~6.45 points).
  • Volunteer hours per resident: full weight (~6.45 points).
  • Number of Americorps volunteers per 100,000 residents: full weight (~6.45 points).
  • Number of Peace Corps volunteers per 100,000 residents: half weight (~3.23 points).
  • Frequency of Google searches for American flags (adjusted by total number of searches): quarter weight (~1.61 points).
  • Civics-education requirement: full weight (~6.45 points).