Tag Archives: James Rising

Science and language

One of the rolling banners at last year’s meeting of the American Geophysical Union had a scantly-clad woman and the words “This is what most people think of as a ‘model’”. See, scientists have a communications problem. It’s insidious, and you forget how people use words and then feel attacked when you have to change how you speak.

I have a highly-educated editor working with me on the coffee and climate change report, and she got caught up on a word I use daily: “coefficient”. For me, a coefficient is just a kind of model parameter. I replaced all the uses of “coefficient” with “parameter”, but I simultaneously felt like it dumbed out an important distinction and wondered if “parameter” was still not dumbed down enough.

AGU has a small team trying to help scientists communicate better. I think they are still trying to figure out how to help those of us who want their help. I went to their session on bridging the science-policy divide, and they spent a half hour explaining that we have two houses of congress. Nonetheless, it is a start, and they sent us home with communication toolkits on USB. One gem stood out in particular:

So I will try to reduce the ignorance and political distortions of my devious communication plots, until I can flip the zodiac on this good response loop. Wish me luck.

Tropict: A clearer depiction of the tropics

Tropict is a set of python and R scripts that adjust the globe to make land masses in the tropics fill up more visual real estate. It does this by exploiting the ways continents naturally “fit into” each other, splicing out wide areas of empty ocean and nestling the continents closer together.

All Tropict scripts are designed to show the region between 30°S and 30°N. In an equirectangular projection, that looks like this:

original

It is almost impossible to see what is happening on land: the oceans dominate. By removing open ocean and applying the Gall-Peters projection, we get a clearer picture:

version4

There’s even a nice spot for a legend in the lower-left! Whether for convenience or lack of time, the tools I’ve made to allow you to make these maps are divided between R and Python. Here’s a handy guide for which tool to use:

decisions

(1) Supported image formats are listed in the Pillow documentation.
(2) A TSR file is a Tropict Shapefile Reinterpretation file, and includes the longitudinal shifts for each hemisphere.

Let’s say you find yourself with a NetCDF file in need of Tropiction, called bio-2.nc4. It’s already clipped to between 30°S and 30°N. The first step is to call splice_grid.py to create a Tropicted NetCDF:

python ../splice_grid.py subjects/bio-2.nc4 ../bio-2b.nc4

But that NetCDF doesn’t show country boundaries. To show country boundaries, you can follow the example for using draw_map.R:

library(ncdf4)
library(RColorBrewer)

## Open the Tropicted NetCDF
database <- nc_open("bio-2b.nc4")
## Extract one variable
map <- ncvar_get(database, "change")

## Identify the range of values there
maxmap <- max(abs(map), na.rm=T)

## Set up colors centered on 0
colors <- rev(brewer.pal(11,"RdYlBu"))
breaks <- seq(-maxmap, maxmap, length.out=12)

## Draw the NetCDF image as a background
splicerImage(map, colors, breaks=breaks)
## Add country boundaries
addMap(border="#00000060")
## Add seams where Tropict knits the map together
addSeams(col="#00000040")

Here’s an example of the final result, for a bit of my coffee work:

arabica-futureb

For more details, check out the documentation at the GitHub page!

And just for fun, here were two previous attempts of re-hashing the globe:

version1

I admit that moving Australia and Hawaii into the India Ocean was over-zealous, but they fill up the space so well!

version3

Here I can still use the slick division between Indonesian and Papua New Guinea and Hawaii fits right on the edge, but Australia gets split in two.

Enjoy the tropics!

Redrawing boundaries for the GCP

The Global Climate Prospectus will describe impacts across the globe, at high resolution. That means choosing administrative regions that people care about, and representing impacts within countries. However, choosing relevant regions is tough work. We want to represent more regions where there are more people, but we also want to have more regions where spatial climate variability will produce different impacts.

We now have an intelligent way to do just that, presented this week at the meeting of the American Geophysical Union. It is generalizable, allowing the relative role of population, area, climate, and other factors to be adjusted while making hard decisions about what administrative units to combine.  See the poster here.

Below is the successive agglomeration of regions in the United States, balancing the effects of population, area, temperature and precipitation ranges, and compactness. The map progresses from 200 regions to ten.

animation

Across the globe, some countries are maintained at the resolution of their highest available administrative unit, while others are subjected to high levels of agglomeration.

world-24k

The tool is generalizable, and able to take any mechanism for proposing regions and scoring them. That means that it can also be used outside of the GCP, and we welcome anyone who wants to construct regions appropriate for their analysis to contact us.

algorithm

Top 500: Leverage Points: Places to Intervene in a System

This is another installment of my top 500 journal articles: the papers that I keep coming back to and recommending to others.

Few papers have had a larger impact on my thinking and goals as Donella Meadows’s article Leverage Points: Places to Intervene in a System:

Folks who do systems analysis have a great belief in “leverage points.” These are places within a complex system (a corporation, an economy, a living body, a city, an ecosystem) where a small shift in one thing can produce big changes in everything.

She then explains how to understand them and where to find them, with fantastic examples from across the systems literature: global trade, ecology, urban planning, energy policy, and more. Reading it makes you feel like a kid in a candy shop, with so many leverage points to choose from. Shamelessly stealing a punch-line graphic, here are the leverage points:

leverage points

I have a small example of this, which you can try out. Go to my Thermostat Experiment and try to stabilize the temperature at 4 °C without clicking the “Show Graph” button until at least 30 “game minutes”. Then read on.

I’ve had people get very mad at me after playing this game. Some people find it impossible, get frustrated, and want to lash out. It’s a very simple system, but you are part of the system and you’re only allowed to use the weakest level of leverage point: the parameter behind the thermostat knob. What would each of the other leverage points look like?

  • 11. Buffer sizes: you can sit at a bad temperature for longer without hurting your supplies
  • 10. Material stocks and flows: you can move all the supplies out of the broken refrigerator
  • 9. Length of delays: the delay between setting the thermostat and seeing a temperature change is less
  • 8. Negative feedback: you’re better at setting the temperature
  • 7. Positive feedback: the recovery from a bad temperature is faster
  • 6. Information flows: you get to use the “Show Graph” button
  • 5. Rules of the system: you can get a new job not working at a refigerator warehouse
  • 4. Change system structure: you can modify the Thermostat experiment code
  • 3. Goals of the system: you replace the thermostat with a “fresh-o-stat” and just turn that up
  • 2. System mindset: you can close the website
  • 1. Transcending paradigms: you can close your computer

Resources:
Take a look at this podcast on Leverage Points from Made You Think.

Observations on US Migration

The effects of climate change on migration are a… moving concern. The news usually go under the heading of climate refugees, like the devastated hoards emanating from Syria. But there is already a less conspicuous and more persistent flow of climate migrants: those driven by a million proximate causes related to temperature rise. These migrants are likely to ultimately represent a larger share of human loss, and produce a larger economic impact, than those with a clear crisis to flee.

In most parts of the world, we only have coarse information about where migrants move. The US census might not be representative of the rest of the world, but it’s a pool of light where we can look for our key. I matched up the ACS County-to-County Migration Data with my favorite set of county characteristics, the Area Health Resource Files from the US Department of Health and Human Services. I did not look at migration driven by temperature, because I wanted to know if some of the patterns we were seeing there were a reflection of anything more than the null hypothesis. Here’s what I found.

First, the distribution of the distance that people move is highly skewed. The median distance is about 500 km; the mean is almost 1000. Around 10% of movers don’t move more than 100 km; another 10% move more than 2500 km.

bydist

The differences between characteristics of the places where migrants are moving from and where they are moving to reveals an interesting fact: the US has approximate conservation of housing. The distribution of the ratio of incomes in the destination and origin counties is almost symmetric. For everyone who moves to a richer county, someone is abandoning that county for a poorer one. The same for the difference between the share of urban population in the destination and origin counties. These distributions are not perfectly symmetric though. On median, people move to counties 2.2% richer and 1.7% more urban.

byincome byurban

The urban share distribution tells us that most people move to a county that has about the same mix of rurality and urbanity as the one they came from. How does that stylized fact change depending on the backwardness of their origins?

urbancp-total

The flows in terms of people show the same symmetry as distribution. Note that the colors here are on a log scale, so the blue representing people moving from very rural areas to other very rural areas (lower left) is 0.4% of the light blue representing those moving from cities to cities. More patterns emerge when we condition on the flows coming out of each origin.

urbancp-normed

City dwellers are least willing to move to less-urban areas. However, people from completely rural counties (< 5% urban) are more likely to move to fully urban areas than those from 10 - 40% urban counties. How far are these people moving? Could the pattern of migrants' urbanization be a reflection of moving to nearby counties, which have fairly similar characteristics? urbandistcp

Just considering the pattern of counties (not their migrants) across different kinds degrees of urbanization, how similar are counties by distance? From the top row, on average, counties within 50 km of very urban counties are only slightly less urban, while those further out are much less urban. Counties near those with 20-40% urban populations are similar to their neighbors and to the national average. More rural areas tend to also be more rural than their neighbors.

What is surprising is that these facts are almost invariant across the distance considered. If anything, rural areas are *more* rural than their immediate neighbors than to counties further away.

So, at least in the US, even if people are inching their way spatially, they can quickly find themselves in the middle of a city. People don’t change the cultural characteristics of their surroundings (in terms of urbanization and income) much, but those it is again the suburbs that are stagnant, with rural people exchanging with big cities almost one-for-one.

The Society, Environment and Economics Lab

seel

I’d like to introduce SEEL, David Anthoff’s nascent lab within the Energy and Resources Group at UC Berkeley. What was initially a ramshackle group of Ph.D. students, associated with David for as little reason that economically minded folk in ERG’s engineering-focused community need to stick together, seems to be growing into a healthy researching machine. Check out the new website for the Society, Environment and Economics Lab.

The current drivers are around FUND, a widely-used integrated assessment model, maintained by David. For a long time, models like this have been black boxes, and FUND is one of the few with open source code. That’s changing with David’s new modeling framework, Mimi, which has allowed him to rewrite FUND as a collection of interconnected components.

I like the vision, and I think it’s implemented in a way that has real legs for shifting the climate impact assessment process into a more open process. But we’ll find out soon. The National Academy of Sciences is meeting soon to discuss the future of the “social cost of carbon”, an influential quantity computed by models like FUND. David is going to try to convince them that the future of impact modeling looks like Mimi. Godspeed.

Making your own duct tape wallet

Duct Tape wallets are cool, thin and light, and personalizable. The instructions below describe my design, which I think is elegant, and you can modify to your heart’s content.

Step 1.

Measure out the length of the two longest strips of duct tape:

Line four bills up, just touching along their long edges. Rip two
small strips of duct tape to measure an additional width to the left
and right of the four bills, or use credit cards, as shown below.

How to measure the backbone

Measuring the backbone

 

 

 

 

 

 

 

 

 

Step 2.

Measure out one strips of duct tape this length and lay it sticky-side-up.
Then measure a second strip and lay it stick-side-up with just
enough overlap to form a secure connection.

The backbone diagramThe backbone

 

 

 

 

 

 

 

 

Step 3.

Fold the strips into the basic wallet frame, by first folding them
in half, with the sticky-side out. Then continue folding in an
accordian fashion, only allowing the faces with the same letter
shown below to stick together. Make sure that these adhering faces
are smooth an even.

Folding faces Folding result

First fold
The first fold, in half, with a bill to measure the second fold.
Second fold
After the second fold.

 

 

 

 

 

 

 

 

 

 

 

 

Flip over
After the third fold and flipping over.
Final backbone
After the rest of the backbone folds.

 

 

 

 

 

 

 

 

 

 

 

Step 4.

Measure out a length of duct tape a little larger than twice the
width of the wallet and wrap it around the outside, with the
sticky-side covering the remaining stick-side of the wallet frame.

The wrapper diagram The wrapper

 

 

 

 

 

 

 

That’s it!  Enjoy your new wallet!

Final wallet

One console to rule them all

I love text consoles. The more I can do without moving a mouse or opening a new window, the better. So, when I saw XKCD’s command-line interface, I grabbed the code and started to build new features into it, as my kind of browser window to a cyber world of text.

I want to tell you about my console-based time-management system, the entertainment system, the LambdaMOO world, the integration with my fledgling single-stream analysis toolbox. But the first step was to clean out the password-protected stuff, and expose the console code for anyone who wants it.

So here it is! Feel free to play around on the public version, http://ift.tt/1PEsTtI, or clone the repository for your own.

screenshot

Here are the major changes from the original XKCD code by Chromacode:

  • Multiple “shells”: I currently just have the Javascript and XKCD-Shell ones exposed. Javascript gives you a developer-style javascript console (but buggy). You can switch between the two by typing x: and j:.
  • A bookmark system: ln URL NAME makes a new bookmark; ls lists the available bookmarks, and cd NAME opens a bookmark.
  • A login/registration system: Different users can have different bookmarks (and other stuff). Leave ‘login:’ blank the first time to create a new account.
  • Some new commands, but the only one I’m sure I left in is scholar [search terms] for a Google Scholar search.

Share, expand, and enjoy!

Labor Day 2015: More hours for everyone

In the spirit of Labor Day, I did a little research into Labor issues. I wanted to explore how much time people spent either at or in transit to work. Ever since the recession, it seems like we are asked to work longer and harder than ever before. I’m thinking particularly of my software colleagues who put in 60 hour weeks as a matter of course, and I wanted to know if it’s true across sectors. Has the relentless drive for efficiency in the US economy taken us back to the limit of work-life balance?

I headed to the IPUMS USA database and collected everything I could find on the real cost of work.

When you look at average family working hours (that is, including averaged with spouses for couples), there’s been a huge shift, from an average of 20-25 hours/week to 35-40. If those numbers seem low, note that this is divided across the entire year, including vacation days, and includes many people who are underemployed.

The graph below shows the shift, and that it’s not driven by specifically employees or the self-employed. The grey bands show one standard deviation, with a huge range that is even larger for the self-employed.

klass

So who has been caught up in this shift? Everyone, but some industries and occupations have seen their relative quality of life-balance shift quite a bit. The graph below shows a point for every occupation-and-industry combination that represents more than .1% of my sample.

hours

In 1960, you were best off as a manager in mining or construction; and worst as a laborer in the financial sector. While that laborer position has gotten much worse, it has been superseded in hours by at least two jobs: working in the military, and the manager position in mining that once looked so good. My friends in software are under the star symbols, putting in a few more hours than the average. Some of the laboring classes are doing relatively well, but still have 5 more hours of work a week than they did 40 years ago.

We are, all of us, more laborers now than we were 60 years ago. We struggle in our few remaining hours to maintain our lives, our relationships, and our humanity. The Capital class is living large, because the rest of us have little left to live.

The role of non-empirical science

The New York Times has an op-ed today about that argues “Psychology Is Not in Crisis, in response to the response to a paper that tried and failed to reproduce 60 of 100 psychology experiments. I have been thinking for a long time about the importance of falsifiability in science, and the role of the many kinds of research we do in light of it.

I was recently re-perusing Collins et al. 2010, which purports to address the need for an integrated approach to environmental science, with a new conceptual framework. The heart of the framework is the distinction between “pulse” and “press” dynamics. I do not want to explain the difference here though. I want to know if we learn something from it.

Knowledge comes in many forms. There’s empirical knowledge, facts about the world that we know could not have known until they were observed; analytical knowledge, resulting from the manipulation of logical constructs; and wisdom, inarticulable knowledge that comes from experience.

The Collins et al. paper uses analysis, but it proves no theorems. But of course analysis can be a powerful tool without mathematical analytics. Recognizing multiple parts of a whole can open doors in the mind, and provide substance to a question. Nonetheless, the criteria for science of the usefulness of analysis is, does it allow us to learn something we did not already know? Knowing that fire is a pulse dynamic while climate change is a press dynamic could come in handy, if these categories added additional knowledge.

I claim that papers like this do not try to teach analytical knowledge, although they focus on a piece of analysis. Their goal is to expand our wisdom, by giving it shape. The distinction is not tied to anything we did not already know about fire and climate change. Like a professor who notices two things being conflated, the paper tries to expand our vocabulary and through it our world. Alas, it is exactly the wherewithal to shape our conceptual world that constitutes the wisdom sought. Pulse and press dynamics are one nice distinction, but there are so many others that might be relevant. Having a distinction in mind of pulse and press dynamics is only useful if I can transcend it.

Knowledge builds upon itself, and naturally bleeds between empirics, analysis, and wisdom. I am not a psychologist, but I presume that they are seeking knowledge in all of its forms. The discovery that 60 empirical building blocks were not as sure as they appeared does not undermine the process of science in psychology, and indeed furthers it along, but I hope that it undermines psychology-the-field, and the structure of knowledge that it has built.