(Edit: What could be more controversial than ranking the 50 states by how polite they are? Ranking them by how bad their drivers are. Yeah, we went there.)

"Just because we Canadians are polite, don't assume that means we're nice," a Canadian friend once told me.

I never really understood what that meant until now.

Enter FreshBooks, a Toronto company that claims to be the leader in cloud-based accounting software, which set out to rank the 50 U.S. states in order of politeness.

You might reasonably ask: How would an accounting software company do that?

They analyzed the language in 250,000 of their U.S. clients' invoices for things like whether they said "please" and "thank you" when asking clients to fork over money.

No, this is not exactly a double-blind study in a peer-reviewed journal; admittedly, it's more of a publicity stunt. But it piqued my interest.

Also, I just thought it was funny because the company is from Canada--the land of my mom's birth, in fact--which has a reputation for being the most polite country on the planet. 

"I think it comes from the fact that we say 'sorry' all the time," FreshBooks CEO Mike McDerment told me in an extremely polite voicemail message.  

With that, here are the 50 states in increasing order of how polite they are, as ranked by a Canadian company. (Be forewarned, there are a lot of ties.)

#50.    The least polite states: Tennessee and Utah (a tie)

This surprised me. I've lived in the Northeast almost all my life, but when I've visited these states, their people always seemed nice and friendly enough. Not according to the documents FreshBooks analyzed, though. Only 6 percent included polite language.

#48.     Mississippi and New Hampshire

I love New Hampshire. But the people there can be a little curt. FreshBooks says it's borne out: Only 7 percent of Mississippi and New Hampshire invoices were polite.

#46.     West Virginia, New Jersey, Illinois and Delaware

I live in New Jersey. Nice place, despite the jokes. But yeah, I can see it being at the bottom of the list. 

#42.      New York, Nebraska and Arizona

This may be the only list where New York and Nebraska are ranked near each other, except maybe for an alphabetical one: 9 percent. 

#39.       South Dakota, New Mexico, Vermont, Pennsylvania, Montana, Indiana, Louisiana, and Idaho

Again with the ties--and invoices that contained polite phrases 10 percent of the time, according to FreshBooks. 

#31.       Michigan, Maine, Virginia and Kentucky

Nice places. Middle of the list according to FreshBooks: 11 percent.

#27.       Connecticut, Missouri, Florida, Hawaii, Alaska, California, South Carolina, Oregon, Maryland, Arkansas, and Iowa

Doesn't it seem like if you lived in a Hawaiian paradise, you'd be polite more often? I've only been there on vacation though. All 11 of these states had polite language in their invoices 12 percent of the time, according to FreshBooks.

#16.       Nevada and North Dakota

Nothing pops to mind that would make these two states particularly alike, but they had the same politeness percentage: 13 percent.

#14.       Kansas, Wyoming, Georgia, and Washington State

We're getting toward the bottom of the list, and you're probably wondering which state was most polite. Here's a hint, it borders one of these states, which all came in at 14 percent.

#10.       Colorado, Texas, Minnesota, and North Carolina

Solid, good-size states that apparently have good manners. Plus, we've all heard of Minnesota Nice, right? Fifteen percent.

#6.          Wisconsin

Single digits, like the temperature. And 16 percent politeness.

#5.          Massachusetts

I've lived in Massachusetts, went to school there, have family there. There is no way I expected Massachusetts to be among the most polite states. But here it is at 17 percent.

#4.          Rhode Island

I grew up in Rhode Island. We tend to say "please" when we want someone to repeat themselves, maybe that's a clue. Anyway: 18 percent polite.

#3.          Ohio

This is probably the first state on the list that clocked in right where people would have expected it to. A nice big jump, too: 21 percent.

#2.          Alabama

I've only just passed through, so I can't judge. But 27 percent of its invoices were polite, according to FreshBooks.

#1.          Oklahoma

Here's your winner, and by a giant margin: 49 percent polite.