Friday, December 16, 2016

New Online Map-Building Tool

Boy have I wished for exactly this tool many times: Thanks developer! I haven't tried it yet so I can't endorse it but wanted to blog it here so I remember it next time I'm grumbling I can't find the map I want for a post.

Friday, October 28, 2016

Reverse Engineering Airline Costs from Fares

I thought it would be good fun to do a scatter plot of flights with how much they cost vs how long they are. I did them in two groups of international and US domestic flights (about 20 each), getting the best fares 3 weeks out with Google Flights, and then got the linear equation that described them.

What it showed:

The Y-intercept for US flights was $92; that is, it costs you $92 to get on the plane, and then $32 for every hour you fly. So flying from one of the Norcal cities to San Diego (1.5 hrs) should be about $140. Checks out.

That $92 would be for maintenance and all the other fixed costs. Now, not including the TTD (through-the-door) cost, at a domestic rate of $32 for every hour you fly, you can figure out how much that balances against fuel costs. At a jet fuel cost of $5.02/gallon at the time of writing, and a 737 mid-air burn rate of 750 gallons per hour, a 737-MAX (200 passengers) that's less than two-thirds full will lose money just considering fuel costs alone. Including the TTD, they have to be only 15% full before it drops below that. Again, that's just fuel costs. Pilots and flight crew eat up money and that $92 might be better thought of as gate-time costs. Of course not everyone will get the good fare that I was using for my comparison, but the average fare certainly won't be double what I got here.

Interestingly, international flights showed a negative Y-intercept of -$12 - which initially I thought could represent a subsidy, but is essentially zero. Plus, then I noticed that the per-hour cost of flying is almost four times as expensive as the domestic numbers I had above. Of course long international flights aren't using 737s, and fuel is probably taxed more than in the U.S. but does this really work out to a factor of four? More than likely this is because most countries' airlines are heavily subsidized (and/or socialized), and even beyond that international route scheduling changes only very slowly and so often doesn't represent what the market would actually bear. For this reason, when I was traveling to Vancouver a lot I found it was worth both my time and money to fly to Seattle and drive, regardless of whether I was looking at American or Canadian airline prices.

Tuesday, October 25, 2016

Tepuys Are Cool

I have long been obsessed by Mount Roraima and tepuys, and it's easy to see why. (This is the second time I'm blogging about them.) They are a chain of sheer-walled flat-topped mountains jutting vertically a thousand meters from the Venezuelan and Brazilian jungle. Some of them are over a hundred miles from the closest road, but even if you could drive right up to the base of one of them, so what? Their isolation produces their alienness, with reproductive isolation producing bizarre frogs with long legs, carnivorous plants, and other evolutionary nonsense. The only communication between the summits and the surrounding jungle is by flying animals, and many of them were not reached by humans until the 60s and 70s with aircraft (or more recently by balloon in the movie Up.) Adding to this they also have deep sinkholes that are cut off even from the surrounding plateaus. The weather at the top is frigid, rarely breaking 10 degrees centigrade, making life hard for whatever jungle-adapted organisms find themselves stranded up there. Combine all this with the extreme weathering of the summit plateaus - they're two billion years old, with predictable bizarre rock formations and bedrock constantly swept clean of nutrients by daily rain - and you have the recipe for what is easily the strangest place on this planet.

Though normally I'm intrigued by trying to get to bizarre places, in this case I'm quite content to read about the mountain in biologists' reports. This report goes out of its way to warm about the rain and the damp, and I believe him - the few pictures I've seen of people at the top makes it look unpleasantly moist in all respects. This report is written in an inappropriately cheerful tone, given the description of inch-long ants eating their faces and flying beetles they mistook for birds.

Images 1, 2, and 5 from All That Is Interesting. 3 is from, 4 is from Wiki.

One can be forgiven for thinking that Roraima is a boundary not just for three countries, but for other dimensions.

I made it onto Boingboing with my other blog post for pointing out that these mountains clearly demonstrate we are in a simulation, and that the simulation is Minecraft.

Monday, October 24, 2016

Were There Demographic Triggers for the American Revolution?

I'd often been curious about whether there was a generational tipping point in colonial America that led the colonists to seek separation. In other words: was it just that by the 1770s, there were enough native-born Americans that at some point they were going to stop feeling close kinship with the mother country, and would find some flashpoint to use as a case for separation, taxes or otherwise? This is attractive because it gives us a number and can be simply modeled; you could see where a colony is on the "revolution curve".


A case is often made that after the Seven Years War, the colonies began to view themselves as able to defend themselves, while resenting restrictions the Crown placed on territorial expansion. Once this change in perspective occurred, along with a land-owning elite that had been reading a lot of Enlightenment books, the clock was ticking. Is that it? Or was the clock ticking because of basic demographic factors?

The answer is: not obviously. In 1790 the proportion of immigrants in the colonies was, at absolute most, 24% of the total population. (This simple data is mostly from Wikipedia.) English immigrants, who might be more loyal to the Crown, not even 6% were born in England (if you include the rest of the British Isles, that comes up to 11%.) In fact, the actual numbers of people born outside the colonies must be much lower than this, since this number assumes that everyone who ever immigrated to the colonies was still alive in 1790, which is obviously nonsense, and immigration slowed down around the time of the Seven Years War. So, if there is a native:homeland ratio serving as a "demographic trigger" for separation, it's well below one-quarter and maybe even around 10%.

You might be thinking, "the colonists must have felt completely separate by 1775!" Not so fast. The timing is suspect. Of the native-born colonists in 1775, many if not most of them would be at least second-generation. I don't have the numbers to determine how many were second- and third-generation, but it seems unlikely that a third-generation person would (independent of other conditions) be that much more disconnected from the homeland than the second-generation one. More intuitively, the big break in attitudes about the homeland would come between the initial immigrants and their first-generation native-born offspring. So why is the grandson of the immigrant all of a sudden taking up arms, and not the son? Why the 25 year waiting period? What's more, by 1775 there's no clear evidence of consistent, quickly identifiable cultural differences (e.g. a distinct accent) that would mark people as having been born on one side or the other of the Atlantic and thus drive a sense of colonial identity.

Another question would be what percentage of native-born people held high positions in the various colonial governments? I don't have access to such data and don't know if it exists, but a review of the birthplace of colonial governors shows no clear trends across the colonies. Pennsylvania had a number of native-born governors until 1763, when again it was run by British-born officials; Massachusetts was run by native sons starting in 1757 until administration was given back to an English-born military officer in 1774.


Another possible contributor to the break: colonial merchants and landowners had accumulated enough capital by the 1770s that they felt strong enough to challenge the Crown, but again that's speculation. Per capita income was higher, and taxation lower in the Americas on the eve of the Revolution. This greater wealth may have been a two-fold cause of the split: the colonies felt strong enough to revolt, and the Crown couldn't resist the chance to increase taxes on its wealthy colonies to cover its debt after decades of war. Of course, as we already know, the most obvious and direct cause for the Revolution was taxation, starting with the Stamp Tax just 2 years after the Treaty of Paris.

If this is the case, we should see something similar occurring in other British colonies as they become wealthier. We do suffer from a paucity of examples, but there has been one (and only one) other example of a revolt in an ethnic-majority-Anglo British colony that turned into a shooting war, the mystifyingly forgotten Canadian uprisings of 1837. I can't find data for per capita income at that time, or for that matter native:homeland ratio. In any event the revolt was not well-subscribed and was quickly put down, by a colonial government that also was interested in compromise in a way that they had not been 60 years earlier with the older colonies.

Moving out of the Anglophone world, it should also be pointed out that Mexico had been settled by Spain started in the early 1500s, and only revolted in 1810, undergoing this process almost a century and a half slower than the United States. (Arguably they only did so because of the external trigger of the Napoleonic Wars.) Given the much greater genetic and cultural admixture of natives with colonists in Mexico, it seems that national identity is not as important, though this could be confounded by an elite of greater European descent (still visible in Mexico today) that identifies more with Spain that the people and land around them.


I don't have enough data to make a revolution curve, but there are some qualitative statements I can make with moderate confidence. Chiefly, if you're going to govern people badly, and they're accumulating wealth and far away, you're not going to be governing them for long. And, "warm" cultural ties in the form of lots of people from the homeland living in the colonies seem not to be as important.

Saturday, September 17, 2016

Bad Stripe Is Evident in More QOL Indicators

The Bad Stripe is a section of the US that runs from extreme southwest Pennsylania along the Appalachians, turns west and decreases in intensity through western Kentucky and Tennessee, and extends through Arkansas and into eastern Oklahoma. As noted before, it consistently shows lower values for happiness and human development indices. For US demographics and geography buffs: it's not the Black Belt, which abuts it further southeast and closer to the coast. It is clearly, however, a cultural boundary zone between north and south - basically, from the southern shore of the Ohio River to the Deep South - and the part that extends west of the Mississippi may be a result of having been settled by Appalachians, since Americans have tended to in-migrate east-to-west. But the reasons for the Strip and whether it really has resulted from the same factors remains unclear.

Below are two maps from the several earlier articles showing the frequently re-emerging Bad Stripe: increased voting GOP for president in 2008 (bright red is 15% or more increase since 2004), and self-reported by congressional district, also 2008.

So it was with great interest that I read this Medium article ("The Origin of Populist Surges Everywhere", there's another more-intense-Republican-voting map, as well as these two: death by overdose (mostly opioids, i.e. pain meds) on top, and firearm suicides on the bottom - "diseases of despair", as the author calls them.

Paintings of Unnoticed Places

Westside San Joaquin

I've run across Stephanie Taylor's work before, in the hospital where I work, and on every occasion they were paintings non-iconic, obscure, but nonetheless unique and immediately identifiable aspects of California. These are places we aren't suppose to see, because they aren't how the place wants to think about itself, but we see them anyway. Consequently it's exciting to see them represented. I was moved to write about them and post some here after a trip to the Crocker in Sacramento. I've always had kind of a strange fascination with boiling a place down to its authentic essence - taking the semantic mean, I guess you could say - and while usually I feed this addiction by poring over maps and narratives, here she's accomplishing the same thing visually. (Of note, as I looked through her work I noticed that she draws the occasional map.) Through these non-places, she lets California speak for itself, in the same way that Terrence Malick's New World let the real Virginia speak for itself. Some of these places, specifically, are the Salton Sea, the rivers in the Central Valley, the golf courses in SoCal - oddly, places that many Californians would not recognize - but that if you're observant and you've been up and down the state, you immediately know. I guess my enthusiasm can be excused as resulting from the kinship I feel, after having often been in and around these places that we're not supposed to notice, and so has she, and more importantly I wonder if she found them all the same way.

A second observation is in order about her portraits, rather than the landscapes (although I've included only landscapes here). Paintings of people are, I think, necessarily more honest about the intrusion onto the subject the act of capturing them represents. Non-candid photography of casual subjects often seems a bit disingenous to me. Clearly the subject knows s/he is being photographed, yet the speed of the shutter leaves us thinking that somehow we're seeing them in the moment as they actually are, not how they are for the camera. When someone is being painted, we know they sat for it, that they posed, that they moved during the process.

You can see more at this Bee article, as well as at her studio.

Above: two Salton Sea images. Next two below: Southern California.

Two below: scenes from the Central Valley.

Two below: a foothill-looking forest,
and one getting into higher in the Sierra.

Tuesday, August 16, 2016

Problems of Utilitarianism #3: Hypothetical Happiness Matters, Unless It Doesn't

I spent the previous post about problems of utilitarianism critiquing the repugnant conclusion, by saying that what counts is utility as experienced by individuals, not some big abstract pile of hypothetical total utility points separate from the people that experience them. This explains why it's better to have some happiness-experiencing people than none at all, but not why and not why we shouldn't feed the utility monster.

If we define "bad" as decreasing utility - then quickly and humanely killing someone in their sleep would be acceptable, because they don't suffer. But in fact this isn't what our moral intuitions lead us to do. We endorse ending the lives of living things only when there is no possibility of future positive experience, future experience that would make life worth living. Hence a patient with ALS looking to the future may choose assisted suicide, but we don't sneak up to the hospital bed of someone suffering from pneumonia and give them a quick overdose of fentanyl.

The problem is that not just the pile of utility points, but also all future positive experience is also an abstraction. In fact almost all utility is abstract, i.e. not being currently experienced. We don't just react to immediate pleasure or pain we're experiencing this millisecond, we're also setting up to avoid future pain and gain future pleasure. However, abstract though it is, again it will be experienced non-abstractly by an individual.

One might argue that to make others' suffering less abstract the answer is to increase empathy so you're motivated to help them and everyone's utility increases; or, to decrease empathy so you can't be haunted by others' suffering. It is possible that from a population perspective one of these strategies is more stable and self-perpetuating than another, and this could be modeled experimentally. Whether this will helpfully apply to a natural evolved nervous system (even a social one) is another question, as these nervous systems evolved as machines subservient to the mission of spreading their genes, and if suffering achieves that, then that's what will be employed. When the nervous systems rebel and start thinking the universe is about them is when the story gets confused, which may be why these inconsistencies in reasoning about morality and happiness continue to appear.