Walter Payton College Prep has been named the best public high school in the United States in new rankings from Niche. View Full Caption DNAinfo/Justin Breen

CHICAGO — Walter Payton College Prep has been named the best public high school in the United States in new rankings.

The rankings from Niche, which looks at schools and neighborhoods, reviewed more than 17,000 public high schools using U.S. Education Department data and reviews from students and parents.

The company examined how prepared students were for college, how well students did on the SAT and ACT and what the schools' graduation rates were, among other things.

Walter Payton got (almost) straight A's in the fields graded by Niche, though it earned a B+ for its food and another B+ for sports. The school often is lauded as being among the best in the country.

Northside College Prep (No. 2) and Whitney Young Magnet High School (No. 6) also ranked high nationally.