While watching some uninspiring NCAA football games today (I’m looking at you, OSU/Michigan and Georgia/Vanderbilt), I had a chance to wonder about this year’s SEC cross-divisional games. Each year, each SEC team plays two games against teams in the opposite division (i.e. each SEC West team plays two SEC East opponents).
Here is a diagram showing who’s playing who in 2015.
Another, more festive example, can be found here, which shows the distribution of lights on our Christmas tree. Falalalala-la-la-la-la.
Inspired by the Parks and Recreation episode where Ron Swanson babysits his girlfriend’s children, I made a digital Lite-Brite using PaperJS (which wouldn’t take much to surpass Hasbro’s online version. Sorry, Hasbro). Try mine out here.
I added contour lines (map here) to my IDW map (read here). The map has contour breaks at 25, 50, and 75. I was really flying by the seat of my pants coming up with this algorithm – it’s pretty computationally intensive, but it does run (at least on Firefox), so don’t panic if the “This script is non-responsive” pop-up pops up. If there’s any demand for it, I’ll write up an explanation of what’s going on, but until then you’ll have to figure it out from the source code (good luck). And, if you’ve got a more streamlined raster to contour routine, I’d love to hear about it!
Last night, lying in bed, I found myself wondering what was on the far side of the Earth (apparently that point is called an antipode). So, today, I made this map to find out. It actually turned into a pretty amazing ride down a CSS-riddled rabbit-hole, and now the map is complete with flipped and mirrored maps, jQuery opacity slider (at the bottom), and animated PaperJS lat/long display.
There are surprisingly few places where you could dig straight through the centre of the Earth and emerge on dry land. If you’re going to try it, here are a few relatively safe places:
- Fiji to Mali
- Auckland, NZ to Seville, Spain
- A large portion of Argentina/Chile to China/Mongolia
- Bermuda to Perth, Australia (you’ll emerge in shallow water, so bring some swimming trunks)
- Philippines to Brazil
- Hawaii to Botswana
Disappointingly, if I dug straight through the Earth to other side, I’d end up about far as possible in the middle of the Indian Ocean.
There are lots of similar maps out there, but I’ve yet to find another one with interactive transparent overlay maps (possibly by design – it gets a little overwhelming). If you find other cool antipode maps, feel free to link to them here.
edit: now includes custom map style!
edit: does not seem to work in Safari or IE.
Even though I’m at home sick today (or maybe due to the boredom of it), I’ve been working on improving my PaperJS-based minimum convex polygon (MCP) script (now found here, previously found here). Now, the algorithm is as follows:
- Find the point that is the farthest right
- Draw a large circle that encompasses the entire possible field, centred on that point. My circle has a radius of 720px (the field is 500x500px). The circumference of the circle is split every 18px. When those vertices are connected to the centre, there are 252 spokes.
- Loop through the spokes, starting with the spoke pointing straight down and moving clockwise. Does the spoke pass through another point (within 5px)? No? Move to next spoke. Yes? Connect the circle centre on that point (a new boundary line of the MCP), move the circle and all spokes to that point. Continue with next spoke to find the next MCP boundary point.
This method isn’t perfect, but it works fairly well. Problems arise when two or more points fall within the tolerance of the spoke hittest (5px). But like I said, I’m sick, so instead of fixing it, I’m going to watch Community.
edit: I’m very grateful to SparkGeo’s lab, which finally clued me in to how to interact with a map underneath a canvas element. Hint: canvas CSS = “z-index: 1; pointer-events:none”