

What's the Most Concave State in the U.S.? Using R to Solve a Geography Puzzle - lil_tee
http://news.rapgenius.com/Atodd-whats-the-most-concave-state-in-the-us-using-r-to-solve-a-geography-puzzle-lyrics

======
joshuahedlund
Fun stuff, especially if you're a U.S. geography nerd (states with the largest
coastlines, states that border the most states, all that good but mostly
arbitrary stuff)

Pedantic, I'm sure, but from the title before I clicked on it I was trying to
think of the state whose shape might independently be considered the most
concave (though that may be much harder to define). This version of concavity
depends largely on the shapes of the states around it (e.g. if Nevada split
into 6 horizontal states, suddenly California would be the winner).

~~~
thejteam
That was what I thought it would be at first as well. My definition of "most"
concave: pick two points at random in the state. What is the probability the
segment connecting them leaves the state? In this case the hard part is
defining what to do about water. As an example, I live in Maryland. It is
easily the most concave if you don't treat the Chesapeake Bay as part of the
state. If you do, not quite as concave. See maps in the link for the shape of
MD if you are not familiar with it.

~~~
howeman
I was going to go with "Divide the land area of a state by the area of its
convex hull. Which is the lowest percentage?"

~~~
tzs
My first thought was to go with the length of the state's boundary that is on
the convex hull divided by the length of the whole boundary.

So...we've got at least 3 ways so far to assign a measure of
convexity/concavity to a state, and they give quite different results.

For instance, your method and the method in the comment you responded to both
would assign a low concavity to a state that is almost a square, except that
the boundary has a high frequency, low amplitude sawtooth pattern imposed on
it. Mine would score that has a very high concavity.

~~~
thejteam
I was interested in this and did a very quick google search. Measuring
concavity/convexity of a generic 2D surface object doesn't seem to be a very
common operation. The one reference I found seems to do what you describe:

[http://www.ncbi.nlm.nih.gov/pubmed/7945702](http://www.ncbi.nlm.nih.gov/pubmed/7945702)

Although I don't have PubMed access so I can't be sure.

This is an interesting problem.

I chose the "random points" method because it seemed easier to me to get an
approximate answer for a generic shape rather than try to figure out areas.
Lengths didn't occur to me though and seems interesting, although the shape
you describe doesn't "feel" concave to me.

------
epi8
Any idea whether this depends on the projection used to get the map in the
first place? I mean, the "straight lines" are really curves that lie in the
boundary of the Earth's surface, unless I'm missing something major.

~~~
homeomorphic
It doesn't matter. He's counting the number of times a continuous curve C on
the surface of the Earth crosses other continuous curves (state boundaries). A
crossing is a property of the curve and its embedding onto the Earth's
surface. While a (continuous) map projection can deform both C and the state
boundaries, it cannot create or destroy crossings.

To _draw_ the crossings, however, he needs to pick a projection and project
both C and the state boundaries, which I guess is why he included some PROJ.4
calls.

~~~
abstrakraft
It does matter - he only considers continuous curves that are projected onto
straight lines, which is a property of the projection.

------
NoodleIncident
Aaaaannnd now I'm playing FTL again. Lining up those 5-room beam strikes is
just too much fun!

On topic, though, this is pretty cool. Rivers and coastlines seem to be the
best way to get appropriately jagged borders. It's interesting to look at
states across the map from east to west and see the shapes get simpler and
more geometric over time.

------
grendal
Cancavity has a simple definition, its measure is: area of the region divided
by the area of its convex hull. Most concave is value nearest to zero. You
can't just make up definitions.

~~~
andrewflnr
Well, actually the point of definitions is that you can just make them up, but
if you're using a non-standard one you really need to say so. I do find the
definition in the article pretty pointless (aside from the fact that it has
way too many points).

------
sengstrom
It is an odd definition of concave. It would make more sense to me to require
that the line joining two points on the state's border does not cross in and
out of the original state when determining the number of other states it
crosses... This doesn't really capture concave as a geometric concept either
but more aligned with the idea that it is a local property.

------
tpurves
I would have thought concave meant in the Z dimension. Find the state with the
highest elevations on any two sides with the lowest relative elevations in
between.

------
joshdance
Pretty cool. But why is this posted on RapGenius?

~~~
hablahaha
In anticipation of their launch for GeographyGenius. Social map annotation,
which state is the dopest, etc.

~~~
yawgmoth
...I would actually love social map annotation.

~~~
simantel
Isn't that basically what Foursquare does?

~~~
yawgmoth
I'm thinking of people (geo nerds) who like to _look at maps_ and remark about
things. Not people who want to tell the world they're at Starbucks.

~~~
simantel
Have you used Foursquare recently? While it originally focused on broadcasting
one's location, it's more about social recommendations now, which really isn't
far from "social map annotation" in practice. Especially when you have people
leaving notes in parks and bridges and buildings telling you about neat
features and not just "the denver omelette is amazing here!"

~~~
yawgmoth
I have not, that's pretty interesting. Looks like I have some browsing to do
between Wikimapia and Findery.

Thanks, guys/gals.

------
benyami
This reminded me that I want to finish reading the book 'How the States Got
Their Shapes.' [http://amzn.to/16zBxBo](http://amzn.to/16zBxBo) There are some
crazy reasons some states have their strange borders.

~~~
shrikant
[Insert discussion here on the propriety of hidden affiliate tags in short
URLs.]

~~~
csense
It doesn't matter to me in this case. The book is relevant to the discussion
and the poster is a human.

But I can certainly understand some people here may want to draw a line in the
sand (to use a metaphor from the linked book's description) to prevent spam.

------
cpcallen
It appears that the author makes a mistake in his attempts to simplify the
problem, because although he is correct that he only needs to look at points
on the edges, he goes on to suggest that he is looking only at corners of the
polygon, and not at any of the (infinite number of) points between the
corners.

------
Tloewald
Interesting. But an odd definition of concavity. Surely a better definition
would be the state whose area relative to its convex hull is smallest. I'd
guess Hawaii or Florida off the top of my head.

------
nemetroid
It would be neat if the algorithm found the most illustrative solution for
each case (e.g. maximizing minimal distance in each state). Especially the
Arkansas one is obviously the edge case.

------
warinsidehere
Is this a clever way of recruiting data engineers?

~~~
gammarator
"We have enough venture funding to pay people to work on non-core parts of the
business. We are not under that much pressure to make money. The normal work
of the business is not sufficiently rewarding so we bribe employees with pet
projects."

([http://blog.prettylittlestatemachine.com/blog/2013/02/20/wha...](http://blog.prettylittlestatemachine.com/blog/2013/02/20/what-
your-culture-really-says/))

