UPDATE: Read our post-election analysis on redistricting here.

When Americans head to the polls next month, they’ll cast ballots in newly redrawn congressional districts in all shapes and sizes.

Azavea, a geospatial software firm, sought to examine how redistricting transformed the geography of U.S. congressional districts. The company released a report this week analyzing all districts, highlighting states and regions with particularly unusual boundaries.

The twists and turns of some of these district lines, as has often been the case, have led to accusations of gerrymandering.

Political observers closely watch the process each decade as new districts take shape after the decennial Census. Parties wanting to gerrymander maps and boost their prospects of winning the most seats on Election Day typically pursue one of two strategies: spread opposition voters across “safe” districts to minimize their influence, or, alternatively, pack as many such voters as possible into a small number of conceded districts.

Those drawing new lines aren’t bound by many Constitutional requirements, but some states implemented reforms aimed at leveling the playing field. Courts also intervene, but do so rarely, typically only in civil rights cases.

Part of the challenge lies in deeming when a district has been “gerrymandered.”

Rather than label districts as gerrymandered, the Azavea report evaluates their geographic compactness using four different formulas, all of which compute ratios slightly differently.

Daniel McGlone, an Azavea GIS analyst, told Governing it wouldn’t be fair to rank districts based on only a single metric, so the firm compiled results for all four. The table below shows average compactness scores for all states having more than one district, with lower ratios (multiplied by 100) representing the least compact districts:

The Polsby-Popper ratio, generally the most widely cited metric, and Schwartzberg ratio measure the perimeter and indentation of a district. These measures essentially compare how closely an area resembles a circle. The two other metrics Azavea used – the Convex Hull and Reock ratios – look more at how dispersed a district is.

Naturally, some states with unusual shapes or coastal boundaries end up with less compact districts. McGlone said the firm attempted to control for this by generalizing coastal boundaries, but acknowledged existing geography still played a role to some degree in compactness scores.

“It’s important to look at all these scores in the context of the geography of the state," he said.

Maryland stood out in the report, with the state’s new boundaries registering the lowest average compactness score for three out of four measures. Analysts identified Maryland’s 6th Congressional District spanning the western part of the state and the 3rd Congressional District, which crisscrosses areas around Baltimore and the western shoreline, as two extremely contorted districts. U.S. District Judge Paul Niemeyer recently dubbed the 3rd District as “reminiscent of a broken-winged pterodactyl, lying prostrate” across central Maryland.

Activists responded by collecting enough signatures to challenge the new map.

Democrats currently hold six of Maryland’s eight U.S. House seats. Gov. Martin O’Malley and other Democratic Party officials endorsed the ballot measure to retain the map, known as Question 5, while Republicans oppose it. If voters reject the measure, lawmakers must go back to the drawing board and establish new boundaries before the 2014 Congressional Elections.

One clear pattern emerging in the firm’s analysis underscores the role redistricting authorities play. In general, independent commissions or court actions were found to be responsible for drawing the most compact districts. By contrast, districts drawn by legislatures or legislative commissions tended to be less compact (see page 10 of the report).

Gerrymandering certainly isn’t new. History scholars say Patrick Henry was the first to employ the practice, drawing a district to defeat rival James Madison in Virginia’s 1789 congressional election.

McGlone also pointed out majority-minority districts, drawn to promote minority representation in Congress, are often some of the least compact. Three of the top five districts with the lowest compactness scores in the report are majority-minority.

North Carolina’s 12th Congressional District is one such example. The district, shown to the left on the map below, stretches 120 miles from Charlotte to Greensboro and recorded the lowest z-score of any district.

Here’s another map with the 10 least compact districts identified in the report, based on scores for all four metrics: NC-12, FL-5, MD-3, OH-9, TX-35, NC-4, LA-2, FL-22, MD-6 and NY-10.