Category Archives: Online Tools / Apps / Data Sources

What’s new with “cliodynamics”?

Cliodynamics is an attempt to collect and organize data on human history in a structured way that can be subjected to scientific testing. The link I just posted is to Peter Turchin’s blog, and the actual data set(s?) are available here.

There’s also a recently published book on comparative history called Figuring out the Past, which sounds interesting. My formal education in history, which did not extend past grade school, often focused on the history of individual countries (most obviously, the U.S.). Other offerings, which I didn’t have time to take in the course of my oh-so-practical engineering education, often seemed to focus on specific topics. I often wonder if it would be possible to teach kids world history more or less chronologically over the course of several years, and really delve into what was happening simultaneously in different parts of the world at various times. The other way I learn about history informally as an adult is to read or hear about a current event, then dig deeper into the history of a particular geographic area or human group to try to understand the context for the current event. I’m almost always surprised at how little context I actually had to understand the current event before I started digging, and I never have time to do as much digging as I might like.

Data is another way to look at/teach/learn about history. I’m often interested in how many people were alive at a given time, how much energy they used and what their energy sources were, and (somewhat morbidly) what they died of. But I don’t really know where to begin to look for most of that data.

learning curve for lithium ion batteries

Our World in Data has some numbers on the decline in price for lithium ion batteries.

Since 1991, prices have fallen by around 97%. Prices fall by an average of 19% for every doubling of capacity. Even more promising is that this rate of reduction does not yet appear to be slowing down.

Our World in Data

one more Covid-19 dashboard

In the U.S., it feels like we are done with Covid. At least, for those of us who are vaccinated adults. For those of us with children, life is still not back to normal because even as we are being told we can return to the office, we can’t actually do that because the children are still home. And the world is clearly not done with Covid-19, as vaccination is proceeding slowly in many countries outside North America and Europe.

Anyway, here is one more simulation dashboard that shows an ensemble of simulations going forward up to four weeks. This might be useful to see if there are blips on the horizon when (if?) the kids really are allowed to go back to school in the fall. Here’s an article describing the site in MIT technology review.

causes of death during the Covid-19 crisis

CDC has a data table on excess deaths during the March-August 2020 period. Obviously, people died of Covid-19 itself, but they also died of other things indirectly caused by Covid-19.

  • 257,000 excess deaths compared to long-term average (I’m rounding numbers to the nearest thousand and nearest percent or so, although when I do math I will round after I do the math)
  • 174,000 due to Covid-19 disease itself – this is around 70% of the total, so 30% of the excess deaths were indirect (and/or random bad luck)
  • Drug overdoses were 13% higher than normal, but suicides were 6% lower than normal. These two things usually go together so there is a bit of a mystery here.
  • Homicides were 6% higher than normal. They don’t break down how much is domestic violence related versus street violence. I would imagine bar fights were down significantly.
  • “Unintentional injuries” were higher than normal. I imagine this is things like falls and drowning, but not motor vehicle crashes because those are separate. Maybe people hurt themselves doing things around the house. Unfortunately, we tend to take more risks doing similar activities around the house than if we were doing them at work.
  • Motor vehicle crashes were down slightly, but the drop was not statistically significant. Given the very significant drop in traffic last year, this suggests to me that deaths per mile traveled were high. I know pedestrian and bike deaths were disproportionately high last year. I would attribute a lot this to people driving faster and more recklessly on (perceived to be) empty streets and highways. This is unfortunate, but mostly human nature and needs to be solved by better street design. Solutions exist, we just need to reach out and grab them my fellow Americans!

So I think these data support the idea that street designs and a health care system that are at least average compared to modern developed countries would have saved U.S. lives during the pandemic, and would continue to save lives in the future. So can we have nice things or not?

Cicada Safari

Cicada Safari is a phone app (I’m going to stop saying “smartphone”, I know there are still simple phones out there, but if I’m talking about them I will be specific) that lets people upload reports of Cicadas, and lets you see where people are reporting them. I’m haven’t seen any here in Philadelphia yet. But I am happy to report their cousins the mosquitoes and spotted lanternflys have joined us in the past week or so.

jobs, jobs, jobs, families, infrastructure, and more jobs…and Richard Nixon, from the bottom of my heart go fuck yourself!

Adam Tooze has a nice visualization of Biden’s spending proposals. Is this a tree plot? a cartogram? I’m not sure, experts please weigh in. A few things I noticed:

  • What Biden talks most and least about does not always match the largest and smallest proposed spending amounts. I think this is called “messaging”. For example, more would be spent on electric vehicle subsidies than on community college.
  • There is no clear line between the infrastructure package and the families package. For example, there is spending on public schools in the former and child care facilities in the latter.

That’s just scratching the surface. You could (and should) stare at this graphic for hours, and then there is a long article to go with it. But I have to go make breakfast now because I can hear the children getting grumpy, which means my precious little bit of early morning quiet thinking time as a working-parent-of-small-children-with-no-childcare-or-grandparent-support is now over. If Biden gets this stuff through our dysfunctional Congress, it will be mostly too late to help my family but I hope it helps others. Thanks Obama…Bush, Clinton, other Bush, Reagan, Carter, Ford, and Nixon at least. Especially Nixon, fuck you – a quick skim of the article reminded me of the bipartisan childcare program of the 1970s that you vetoed. Oh and also, fuck you Ralph Nader because maybe Al Gore would have gotten some of this stuff back on track 20 years ago. And last but not least, thank you once again Bernie Sanders for not pulling a Nader.

Make/write/record music with R

Move over Garage Band, there is a new musical sheriff in town. For those of us who like to mess around in R – okay, realistically this gets added to my list of retirement projects a few decades down the road, assuming my body and brain manage to stick around for the next few decades.

gm: Generate Music Easily and Show Them Anywhere

Provides a simple and intuitive high-level language, with which you can create music easily. Takes care of all the dirty technical details in converting your music to musical scores and audio files. Works in ‘R Markdown’ documents <https://rmarkdown.rstudio.com/>, R ‘Jupyter Notebooks’ <https://jupyter.org/>, and ‘RStudio’ <https://www.rstudio.com/>, so you can embed generated music anywhere. Internally, uses ‘MusicXML’ <https://www.musicxml.com/> to represent musical scores, and ‘MuseScore’ <https://musescore.org/> to convert ‘MusicXML’.

CRAN

fun with coronavirus math

Let’s do some coronavirus math! This is a word problem, kids. I’m writing on January 14, 2021, and this post will be horribly outdated, but possibly of historical interest, when you read it.

The total number of cases confirmed to date as of today, in the U.S.: “23.1 million+” (New York Times)

The CDC’s ratio of actual cases to confirmed cases: 7.2 (CDC)

Number of cumulative cases in the U.S. so far: 23.1 million * 7.2 = 166 million (166,320,000)

Population of the United States: 328.2 million (Google)

% of our population that has had the coronavirus = 166 / 328.2 = 51%

% of our population that has been vaccinated: 3.1% (Financial Times)

But all other things being equal (which I am sure they are not), 51% of the people vaccinated will have already had the coronavirus, so the vaccine so far adds 1.6% to 51% of our population. Call it 53% to be generous.

We have heard a variety of estimates on what constitutes herd immunity, but the number 70% seems to be sticking at least in the media (I don’t have a source handy, and need to go do some other things now.) So we might not be that far off. The (painfully) slow but steady vaccine rollout tortoise will eventually get to the finish line, people are continuing to get infected at high rates every day in the meantime, and nobody wants to see another wave from the new variant, but if and when it hits us it might push us over the mark (at a horrific human cost, of course).

One last thought is that at the moment, I suspect we are immunizing people who are more likely to have already had an infection than the population as a whole. We are being told this is the most ethical approach, or the quickest way to lower risk for the population as a whole, or some combination of the two. The ethical statement may be true, although this seems subjective. I thought ethics was not up to ethicists, but rather ethicists were supposed to ascertain what our society as a whole considers ethical, and maybe compare that to other human societies past and present. I haven’t seen public polls of what people think is ethical, although they may exist. I can see a case that the way the vaccine is being rolled out is ethical, but I can also see a case for a random lottery being equally ethical.

Better planning and communication would not just be ethical, they are the common sense need and our government is continuing to fail, fail, fail and people are dying, which is the opposite of ethical governance. To my ears, it is arrogant to hear them lecturing us about ethics.

novel writing software, Scrivener, and R Bookdown

This is a pretty niche post, but a couple years ago I briefly entertained a fantasy of becoming a novelist. After I tried to write a novel, my the wisdom of not quitting my day job was affirmed. But in the course of that, I briefly investigated software that novelists are using to organize their books and research. The most popular is called Scrivener. I was thinking though that it would be neat if someone would customize the R packages Markdown or Bookdown for writing, because then especially if you are writing non-fiction you could have all your data, analysis code, tables, figures, references etc. in one place along with your prose. This post describes a system that allows the author to actually combine the use of Scrivener and R Bookdown.

advertising shits in your head

Some books just have good titles. And this one is called Advertising Shits in Your Head: Strategies for Resistance. From the publisher:

Advertising Shits in Your Head calls adverts what they are—a powerful means of control through manipulation—and highlights how people across the world are fighting back. It diagnoses the problem and offers practical tips for a DIY remedy. Faced with an ad-saturated world, activists are fighting back, equipped with stencils, printers, high-visibility vests, and utility tools. Their aim is to subvert the adverts that control us.

“PM Press is an independent, radical publisher of books and media to educate, entertain, and inspire.”

Really, they had me at the title. But it seems to me that the main way to counter the shit is to teach children from a young age to evaluate the source and quality of information they are taking in, expose themselves to multiple sources of information, think critically, draw their own conclusions, discuss their conclusions with other informed people, and be open minded.

Somewhat related is this new browser plug-in Newsguard, which provides “Trust ratings for all the news sites that account for 95% of engagement” and is “Written by journalists, not secret algorithms.” Sounds okay, although I think I have too many browser plug-ins already.