It's nearly back-to-school time, so social finance site WalletHub put together a list of the best and worst school systems in America.

They studied the quality of education in the 50 states (plus D.C.) by analyzing 12 factors — "from student-teacher ratios and dropout rates to test scores and bullying incident rates." 

New Jersey came in first overall, placing top five in many of the key categories including test scores and safety. D.C. came in last place, ranking as the least safe place to go to school, along with low test scores and high dropout rates.

Their interactive map shows each state's overall rank; with red representing the worst overall school systems, and green the best.

Here is the map:

WalletHub

 

The report also took those numbers and compared them with how much the state is spending on education. The results are mixed, as New Jersey comes in at No. 3 for spending, while D.C. actually spends the 14th most, compared with Arizona, which spends the least and is placed at 43.

WalletHub

 

WalletHub says that states that invest more in education ultimately strengthen their economies, citing The Economic Policy Institute report that incomes are higher in states where the workforce is well educated.