Data science, teaching, and other stuff.

MAUP

Don Quixote fighting windmills

A common vein in my research has been tilting against challenges in geographic measurement. Barriers to ecological inference drive an emphasis on individual-level geographic data. The limits of aspatial segregation measures motivate efforts to develop more flexible approaches. Ambiguity about what constitutes a neighborhood motivates progress on subjective and objective definitions. Residential selection that confounds estimates of place effects leads to designs with more credible assumptions.

During a PhD visit, I was told that, based on my interests, I would always have to reckon with the Modifiable Areal Unit Problem (MAUP). I did not know what that was, but it became an outsized presence in how I think about my research. If there are infinitely many ways to draw the map, and the available areal units are at least somewhat arbitrary, to what extent are we capturing actual underlying spatial relationships? A couple of new projects (one, another) grapple directly with this problem, adapting redistricting algorithms to provide a simple solution to the problem of many possible maps: drawing many maps to represent the underlying geography as a distribution rather than as a single boundary choice. This allows researchers not to rely on any single aggregate representation and to measure MAUP sensitivity directly: by drawing comparable units with different boundary choices or by drawing units at much larger or smaller scales.

Translation

Philip Roth, The Ghost Writer:

I turn sentences around. That's my life. I write a sentence and then I turn it around. Then I look at it and turn it around again.

I am curious (exception, rule?) whether most novelists view the most crucial part of their crafting stories as happening at the sentence level, and whether the distinction between a good and great novel is a function of differences in talent in crafting those building blocks. Many book reviews focus on quality of prose, although perhaps the true quality is pulling readers through the story without conscious marveling at the writing (or in spite of that).

Translation, then, confuses me. The best fiction I have read in the past few years -- Ferrante, Knausgaard, Grossman -- is not originally written in English. This fact makes sentence-by-sentence choices on the part of the author seem less vital to the greatness of the novel. Rather, something at a higher level (the novel's ideas, characters, metaphors, the originality of the observations, etc.) is the crucial piece. This seems true to me regardless of whether the translation is good or not. I found the English prose of all these books to be very good to great, and at times I found myself impressed with the choices of the translator. But a great translation is evidence of there being some quality in the book that transcends original language and can thus be communicated by a skilled translator in another language. Perhaps this varies by author or language, or luck of the draw with the translator -- or perhaps for the best books (at least to my taste) these are all secondary concerns. I don't doubt that these books would be better in their original languages, but the fact they are this great in other languages informs my impression of what makes a great novel.

There must be cases though where this breaks down. I am reading Twelfth Night to Nathan and reading Shakespeare out loud is delightful and fascinating -- the wordplay and invention is the joy of the plays, although perhaps that is because the plot archetypes have been so folded into modern constructions as to seem less powerful. Shakespeare has been translated into over 100 languages. How good is it in other languages? How good can it be?

I am reading The Savage Detectives by Bolaño and I have thought about this a lot because the book is about poets and poetry.

Reflections on ~2 months with Claude Code/Codex

Come on in, the water is warm and we have plenty of tokens.

  • Integrated essentially my entire research workflow, except for actual writing, with Claude Code and Codex: chatbots as sounding boards when developing ideas, methodological questions, data sources, background literature, Claude Code/Codex for data collection, coding, package design, code review, formatting, replication verification, and so forth.
  • Truly autonomous research still feels far off, but not due to lack of intelligence, just lack of memory/sufficient context window for complex projects. But I have been optimizing for human-with-agents workflow, with autonomous stuff being more experimental.
  • Working with agents is quite immersive and fun.
  • Moving back and forth with both models is pretty seamless, scaffolding helps a lot, especially with Codex.
  • Claude Code's autonomy is compelling, at its best when reorganizing an entire codebase, or working across multiple sessions on long data collection projects
  • Rate limits on Claude are real, I hit the 5 hour one regularly. Good to have Codex as well. Been using Pro/Max 5x for both.
  • Some of that rate limit hitting is due to being greedy and always wanting to use the best Claude model.
  • General workflow is work on 1 important thing at a time with Claude to preserve tokens, fan out with Codex.
  • Git was trending up in use on projects, but now is essential.
  • Codex has essentially replaced Rstudio, Github Desktop, Pycharm.
  • ChatGPT 5.5 is noticeably better at autonomous coding than 5.4 or 5.3 Codex and -- it admitted this to me when I asked -- more Claude-like by design.
  • Adding tables and figures to (over-long) appendices used to be quite the chore, now either agent can directly throw these into .qmd or .tex files, even edit Overleaf.
  • Both models work well with batch job cluster systems, with some friction for Codex since its shell default constantly fails there before it jumps local.
  • This may be habit, but I am much more happy with the answers I get from ChatGPT Pro chatbot than Claude. But both good overall. Claude gets over-exuberant.
  • Using the models to write prompts (sometimes for each other) is a major efficiency gain. So the input is my detailed but more scattered request, then a detailed prompt from the LLM, input the prompt, get a plan, modify plan, approve plan, execute. This is most important for more complex database maintenance or data collection.
  • Everything is cleaner, faster, easier to work with. Smarter and better.
  • The design of the interface is well done. You feel like a conductor orchestrating the agents. Ironic but agentic automation feels involving.
  • The productivity force multiplier when not just you but also your co-authors are embracing agentic capabilities is intense.
  • It's interesting how much of the competitive advantage of different models, Claude specifically, is the design of how they deliver their intelligence, not just the actual intelligence they deliver.
  • I had Claude write a prompt to ask ChatGPT to give it a run down on who I am and what I do and what I typically use ChatGPT for. That was a weird experience.
  • Claude revised the Codex documents in all of my repos and made Codex run better in terms of memory, adversarial review, multiple agents, etc.
  • Codex is a great pre-doc, Claude is a great post-doc.
  • Some projects require restricted environments or locations where AI is not allowed. Makes for a nice respite from the rapid takeoff world. Slow research soothes the soul.
  • This has been quite energizing. Ideas propagate faster. I can try things that would other wise have taken a very long time to learn.

New realignments, new political geography?

Prepared a piece for the forthcoming Handbook of American Political Geography. Some tidbits deserve emphasis:

Researchers and policymakers must hold in their minds two truths: that geographic polarization, across urban-rural divisions, is close to as high as it has ever been in the country’s history, and that Americans are not completely isolated geographically from people who disagree with them politically.

In a 50-50 country, segregation would have to be quite extreme to truly bring cross-partisan proximity to zero. So despite areas of high isolation, many voters do live in places with large numbers of out-partisans, and as we move beyond the neighborhood level to larger geographies we see more cases of mixed partisan composition.

Still the urban-rural divide is strong, and the data suggests that partisan segregation rapidly increased starting around the 1970s through the 2000s, and continuing to increase more modestly up through 2020.

But as the Handbook piece demonstrates, recent electoral data suggest a plateauing or perhaps a reversal of these long-term trends. Whether this persists or is a blip in a steadier time-series may have to wait for more time to pass and data to be accumulated. But the evidence on sources of political segregation, both recent and more long-term point to the importance of political realignments changing the American map without people sorting residentially. So what political realignments of the Trump era could even out the American map? From the piece, on college education and racial realignments:

This demographic realignment challenges urban-suburban polarization, previously falling along the income gradient, effectively liberalizing the suburbs relative to cities, reducing polarization along this dimension. Republican gains with minority voters can erode Democratic strong points and upend urban-suburban divides.

The most interesting demographic here to me is one where voters are realigning but also where the mass of the distribution is imbalanced:

However, the American electoral map is headed towards an age cliff. The distribution of age in the electorate is such that the largest voting bloc is at or approaching senior status. The Baby Boomer generation dwarfs younger generations. Thus, a large aging group of voters anchors the political geography of the electorate, in that they are unlikely to move because of their age and are either set in their ways or trending Republican in a manner that increases geographic polarization. But as this generation dies off, they are replaced by a younger, more mobile electorate. This distributional shift could produce a shock to levels and trends of geographic polarization.

So the current American political map is held down, to an extent, by an immobile aging electorate, declining residential mobility more generally, and -- until maybe recently -- polarized politics with lower rates of party switching than in past eras.

Barbed wire

Taylor Sheridan, 1883:

Come across any barbed wire yet? It's twisted steel wire with little barbs woven into it. Sharp as a knife's tip. It is the one fence cattle will not push through. They're going to carve this country into little rectangles. Then fence them off. And just like that, two of our great pleasures are gone.

Reviel Netz, Barbed Wire - An Ecology of Modernity:

Define, on the two-dimensional surface of the earth, lines across which motion is to be prevented, and you have one of the key themes of history. With a closed line (i.e., a curve enclosing a figure), and the prevention of motion from outside the line to its inside, you derive the idea of property. With the same line, and the prevention of motion from inside to outside, you derive the idea of prison. With an open line (i.e., a curve that does not enclose a figure), and the prevention of motion in either direction, you derive the idea of border. Properties, prisons, borders: it is through the prevention of motion that space enters history.