Tag Archives: IFTTT

Resolving a Hurricane of Questions

Maybe questions of social science never get truly resolved. The first year of my PhD, I remember John Mutter describing the question of creative destruction. Sometimes, the story goes, a disaster can lead to an unexpected silver lining. By destroying outdated infrastructure, or motiving people to work together, or driving a needed influx of aid, a disaster can eventually leave a community better off than beforehand. Mutter described it almost like a philosophical quandary. In the face of all the specifics of institutions, internal perceptions, and international relations, how will we ever know?

For years now, Solomon Hsiang has been producing insights from his LICRICE model, turning hurricanes into exogenous predictors. As these random shocks echo through societies, he’s been picking up everything that falls out. I got to listen to some of it when news reporters would call his office. His work with Jesse Anttila-Hughes turned up the true mortality threat of disasters, typically 10x the lives lost at the time of the event. Jesse dug further, finding how family assets changed, how meals were redistributed, and how young girls are often the most hurt, even those born after the disaster.

Last month, Sol and Amir Jina produced an NBER working paper that steps back from the individual lives affected. Their result is that a single storm produces losses that continue to accumulate for 20 years. People are not only continuing to feel the effects of a hurricane 20 years down the road, but they additional poverty they feel at 10 years is only half of the poverty that they’ll feel in another 10.


Of course, this is an average effect, and an average of 6415 different country results. But that means that for every country that experiences no long-term effect, one experiences twice the poverty.

So, is there creative destruction? It’s very, very unlikely. The most likely situation is “no recovery”: countries will never return to the trend that they were on prior to the event. Things are even more dire under climate change,

For a sense of scale, our estimates suggest that under the “Business as usual” scenario (with a 5% discount rate) the [present discounted value] of lost long-run growth is $855 billion for the United States (5.9% of current GDP), $299 billion for the Philippines (83.3% of current GDP), $1 trillion for South Korea (73% of current GDP), $1.4 trillion for China (12.6% of current GDP), and $4.5 trillion for Japan (101.5% of current GDP).

That’s what we should be willing to pay to avoid these costs. In comparison to the $9.7 trillion that just additional hurricanes are expected to cost, the $2 trillion that Nordhaus (2008) estimates for the cost of a climate policy seems trivial. That’s two big, seemingly unanswerable questions as settled as things get in social science.

Classes Diagram

Sometimes a diagram helps me find order in chaos, and sometimes it’s just a way to stroke my ego. I was recently trying to make sense of my graduate school classes, even as they’re becoming a less and less important share of my gradschool learning. So, I added to a diagram I’d made ten years ago for college.  In the end, I’m not sure which purpose it serves more.


The diagram is arrayed by discipline and year. The disciplines are arranged like a color wheel (and classes colored accordingly), from theoretical math, through progressively more applied sciences, through engineering and out the other end into applied humanities (like music), and finally back to theoretical philosophy. Arrows give a sense of thematic and prerequisite relationships.

Economics, a core of the Sustainable Development program, probably sits around the back-side of the spectrum, between philosophy and math. I squeezed it in on the left, more as a reflection of how I’ve approached it than what it tried to teach.

This is also missing everything I’ve learned from classes I’ve taught. I wish there were a place for Progressive Alternatives from two years ago, or Complexity Science from last year. I guess I need another diagram.

A time without music

I love listening to pop music when I work, but I can’t listen to anything with words when I’m reading or writing. And my life is supposed to be including a lot of that right now. At a time when I hoped to be building my Great Food Model, placing all my projects in a diorama with spotlights, I have been told instead to publish or perish. A man with many interests is not appreciated in academia, I’m told, without some beans to count.

I won’t recite the litany of projects and goals, but a couple highlights might give a gist. First, I’m really excited because my proposal to research coffee has been accepted for funding, in the time it took me to read three books on the subject to fall in and out of love with the beverage. My paper on marine reserves went through a three week crisis, during which all the results seemed like mirages, but it was resolved yesterday. I keep promising one professor that his project is now my top priority, but the processing to generate its data has taken all summer, and now I wonder if one of the inputs invalidated the whole thing.

I’ve been trying to keep a strong boundary between my work and home lives, but as work picks up pace, as occupation turns preoccupation, and the success feed on themselves, it’s been consuming more and more. I’m relying more on Flame to orchestrate our social life, and feeling more at a loss on the weekends. I’ve been learning a lot about relationships from the first self-help book I’ve read in years– Models by Mark Manson– and the January Scientific American Mind edition on relationships.

The summer is over too soon, and leaves are falling when I still haven’t worn all my shorts. I organized a soccer group, but haven’t gotten them together to actually play, or purchased a soccer ball. I have been finding time to do more climbing at the Brooklyn gym. The pain in my arms feels good, even as demons in my blood lash out at the change.

Complexity’s History and the Future

A vast leading edge of a new gestalt has begun to upset and encompass mathematics, philosophy, computers and the Internet, psychology, art, and science. It will change how we understand our world and ourselves, and what we believe is possible.

This new gestalt is the culmination of threads that have been developing in many different areas, and they intersect in the emerging understanding of complexity and its connection with computers. Here are a few thoughts of how historical developments have brought us to this point.

Within mathematics, the rise of formalism upended the very nature of mathematics, making math about the creation of math, only to see this approach run up against fundamental flaws (Incompleteness and Halting problems). However, that process of realization itself led to the creation of computer.

Within physics, linear models gave rise to systems understandings (the inadequacy of causality, overdeterminacy), paralleling the evolution of mathematics away from the simple mechanics of truth. This process of exploration is now giving rise to models of out-of-equilibrium processes and entropy, possible only to study through simulation.

These processes in academics were connected to what happened in art, with the transition from the importance of technique (like physics’s former focus on formulas), to an exploration into the nature of painting itself (formalism), to a re-engagement with society (systems). Now new media (computers) are breaking open the possibilities of experience (simulation).

Within philosophy, the trench warfare that has shown a slow receding of absolutism to the forces of relativism is giving way to a new philosophy of multiple perspectives.

Within psychology, early neurobiology combined with the opportunities of technology produced positive psychology, but now more modern views are developing an idea of the emergent self.

It is no mistake the study of complexity is arising at this moment in history, nor that complexity science is so closely tied to developments in computational approaches. Another society-wide driver is also inextricably connected: the rise of big data. Big data lays out complexity for us to see, and demands a new fundamental theory of physics which combines thermodynamics with information theory.

The process of formalism changed the way that people thought about what they were doing, and computers are changing the way we think about everything again. The new gestalt recognizes multiple realities, and it recognizes the importance of simulation. In fact, it ties these two together: simulation and reality are linked. When you make a simulation, you create a new reality. It isn’t this reality, but this reality isn’t a well-defined thing either.

Python SoundTouch Wrapper

SoundTouch is a very useful set of audio manipulation tools, with three powerful features:

  • Adjusting the pitch of a segment, without changing its tempo
  • Adjusting the tempo of a segment, without changing its pitch
  • Detecting the tempo of a segment, using beat detection

I used SoundTouch when I was developing CantoVario under the direction of Diana Dabby and using her algorithms for generating new music from existing music, using Lorenz attractors.  SoundTouch is a C++ library, but CantoVario was in python, so I built a wrapper for it.

Now you can use it too!  PySoundTouch, a python wrapper for the SoundTouch library is available on github!  It’s easy to use, especially with the super-cool AudioReader abstraction that I made with it.

AudioReader provides a single interface to any audio file (currently MP3, WAV, AIF, and AU files are supported).  Here’s an example of using AudioReader with the SoundTouch library:

# Open the file and convert it to have SoundTouch's required 2-byte samples
reader = AudioReader.open(srcpath)
reader2 = ConvertReader(reader, set_raw_width=2)

# Create the SoundTouch object and set the given shift
st = soundtouch.SoundTouch(reader2.sampling_rate(), reader2.channels())

# Create the .WAV file to write the result to
writer = wave.open(dstpath, 'w')

# Read values and feed them into SoundTouch
while True:
    data = reader2.raw_read()
    if not data:

    print len(data)

    while st.ready_count() > 0:

# Flush any remaining samples
waiting = st.waiting_count()
ready = st.ready_count()
flushed = ""

# Add silence until another chunk is pushed out
silence = array('h', [0] * 64)
while st.ready_count() == ready:

# Get all of the additional samples
while st.ready_count() > 0:
    flushed += st.get_samples(4000)


if len(flushed) > 2 * reader2.getnchannels() * waiting:
    flushed = flushed[0:(2 * reader2.getnchannels() * waiting)]


# Clean up

A moment in philosophy

Like art, there was a time when philosophy eschewed any direct relevance to ordinary life. Like mathematics, it was built-up by a new kind of formalization. In math, that process was inspired by set theory; in philosophy, it was called logical positivism. When Godel’s theory showed that such formalisms ultimately eat themselves, both math and philosophy had a wake up call. Of course, by then all their friends had moved away.

Philosophy is going through a renaissance right now, for the same reasons that math is. It’s computers. Computers aren’t just changing society, how we think about ourselves, and what we can know. They are breaking open the notion of truth itself.

Godel’s theorem tore down the notion that formal languages can embody all of truth. But it had a much more important consequence, which had nothing to do with its result. As speech by Chaitin argues:

[Formalization] failed in that precise technical sense. But in fact it succeeded magnificently, not formalization of reasoning, but formalization of algorithms has been the great technological success of our time—computer programming languages!

So if you look back at the history of the beginning of this century you’ll see papers by logicians studying the foundations of mathematics in which they had programming languages. Now you look back and you say this is clearly a programming language! If you look at Turing’s paper of course there’s a machine language. If you look at papers by Alonzo Church you see the lambda calculus, which is a functional programming language. If you look at Gödel’s original paper you see what to me looks like LISP, it’s very close to LISP, the paper begs to be rewritten in LISP!

I was recently working on my Research Statement, for the impending academic job market, and dusting off some thoughts I put into my essay to get into grad school. I said, “Philosophy is grappling to find a life-affirming and ethics-motivating way to acknowledge the advances of technology and science. It has been driven by both them and worldwide clashes of culture to search for a more inclusive world view.”

It’s obvious now that one result of this search has been positive psychology (which I’ve ranted about before). But I think there’s more brewing.

I study complexity, which is ripe with connections both to science and technology. It’s not a mistake that complexity as a set of models is so closely associated with computational techniques like agent-based modeling. I happen to think that it’s also ripe with connections to philosophy– to the nature of reality and our relationship to it.

Complexity has been called the study of “little programs that never halt”: there’s a core of simplicity to any complex model, but there’s also a level of unknowability. Formalizing complexity just doesn’t work, in the traditional sense. Turning a complex model into a simple model loses essential elements, just like if you were to remove recursion from a programming language.

Ancient philosophy was content with irreducible mystery, but modern philosophy always wants to explain the foundation. It accepts that the explanation is infinitely complex, even if the foundation itself is not. But for a long time, it has been trying to explain itself to a world that wants simple models.

Computers give us a new paradigm. The world isn’t like the number zero or the number infinity. It’s like Twitter. We are creating new realities all the time now. And we can get to the bottom of our realities. We’ll never know what reality has to say, as both philosophy and science once tried to do. But we can still study why and how it says it.

Pictures from Brisbane

Here’s the first of 2-3 picture entries of pictures from my work trip to Australia and Vietnam. I give you– Brisbane!

The South Bank

A view across the river Artificial beach Park pond with Ibises Fig trees in the city Botanical garden

Coot-Tha Reserve Botanical Gardens

Local tropical forest section Overlooked by restaurant Impecable landscaping View of Brisbane from the top

See more in my Australia and Vietnam album.

Vietnam 2: Capitals

Vietnam is officially one of my new favorite countries.  Between lively cities, casual lushness, delicious food, and kind folk, I need to come back here.

I'd hoped to see the natural wonder (UNESCO'd) of Halong Bay, but a category high-3-or-4 typhoon was headed straight for it.  I'd expected Hanoi to be similarly drenched, but the nonchalance of everyone I asked turned out to be justified: all that reached Hanoi was a steady (if at times heavy) sprinkle all day.

So instead I saw Ho Chi Minh's body, in the vast mausoleum complex that includes a museum, old house, new house, and botanical garden.  His pale face was no less iconic for being on such a short body.  The line filed by him too quickly to feel much of the weight of the nearness, but there he was a few feet away.

Other observations from Hanoi: The city has a thing for turtles.  They claim that the one turtle that they didn't eat in the Old Quarter lake is over 500 years old, and the stone slabs raised in 1484 to honor Vietnam's best scholars (at the Temple of Literature– a university from 1070) are placed each on a unique-looking turtle.  A lot of the pagodas feature turtles too.

The Old Quarter is a blast to get lots in.  Each street specializes in a different kind of ware (at least historically), from shoes to tin boxes.  But all have street food, coffee shops, fruit-sellers, and sidewalks that have been turned into motorcycle parking lots so everyone shares the street.

Also, my real purpose for being here– peppering people at all levels of hydropower plant decision-making with questions– was totally successful.  Each meeting filled in more of the picture, and identified more of what others weren't saying.

Saigon, Soon gone

I think I really like Vietnam!  Or at last the centers of a couple major cities.  I met up with Semee, whose grant is funding our travel, on Saturday night.

So far, I've spent two days in Saigon (Ho Chi Minh City), in the south, and Hanoi, in the north.  Saigon's center has wide streets and wide parks, lots of modern conveniences and lots of cultural institutions.  On Sunday, we wandered around Saigon's "old city", seeing the Reunification Palace (the underground bunker is a trip!), the Museum of Fine Arts (quite good!), and the copious parks.  The lush parks are filled with individuals and groups playing games, learning guitar, studying, lounging.  And the birds here sing on the Pentatonic scale!  One was going C-G-E-D-C'.  It's like a picture of utopia.

On Monday morning, before having our first interview at an apparently deserted and gutted university, we went on a boat tour down the Mekong, to a floating temple plastered in painted-dish mosaics.  The tour was supposed to include an island town, but there's some problem with the bridge there (an odd story, since we were in a boat), so we just went to a posh riverside hotel instead.

The streets are nerve-wracking, but not as bad as Cairo.  Very few intersections have signals.  The typical approach to crossing the street involves moving very slowly and trusting that the constant flow of traffic will move around you.

Vietnam loves its coffee.  There are multiple coffee shops on every block, and half the time people just get their coffee from vendors huddled on plastic stools on the sidewalks (the same place they get their food and haircuts and park their motorcycles).  I'm a little confused about it though, since Vietnam coffee is all Robusta, which my coffee books have been railing against.  But it tastes good to me.