Category Archives: Online Tools / Apps / Data Sources

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.

the Oura

The Oura is a fitness tracker, but unlike others it is a ring you wear on a single finger. See Wired article here and company website here. It seems to focus mostly on measuring your heart beat and temperature – all the time – and coming up with a variety of metrics and feedback for you based on that. The NBA and NASCAR have apparently given them to all their athletes (yes, I maintain that race car drivers are athletes, but we can continue the debate down at the corner bar when and if it reopens.)

I’m curious about fitness trackers, but if I ever invest in something I would like blood pressure and nutrition to somehow be incorporated.

the numbers on maternal mortality

The site Our World in Data likes to plot various statistics against GDP per capita. The U.S. is almost always below the middle, and sometimes towards the bottom, of the industrialized countries. On maternal mortality, the U.S. is orders of magnitude safer than many poor countries, but like other stats there is a noticeable gap with the leaders in our peer group (Finland, Iceland, France, Japan, Switzerland to name a few). Greece and Poland stand out as middle income countries that do much better than us. Interestingly, Belarus also stands out as a high-performance, lower-income country on this metric. The plot is animated, so you can see the U.S. drifting slightly worse over time even as our wealth grows, and even as other countries tend to make progress over time. I think I’ve said it before – we’re coasting on fumes, drifting behind the middle of the pack, and continuing to lose momentum.

modern monetary models

These two posts have a long explanation of monetary theory in general, and modern monetary theory in particular. It’s a little over my head, although I like challenging myself to try to understand it. It is a very abstract system to try to understand. I think that if you can understand monetary policy, you might have a chance to understand what money actually is. And if enough people understand it, they might stop believing in it and the world might end.

Basically, as I understand it, the government prints money (i.e., borrows money from itself) and spends it, usually more than it takes back in taxes, and this creates a surplus in the private sector. It can control the money supply by changing the amount it borrows and spends, or by changing the tax rate. I think what people find scary about “modern monetary theory” is that it suggests money doesn’t have to be taken seriously and any needed amount can just be printed any time. This is why politicians generally have not been given the keys to the printing press.

I have a metaphor in my mind of the real economy as a machine with pistons and gears turning. The fuel for the machine is maybe human effort and ideas (and some actual fuel). But the gears will grind without grease, so you have to lube it up. Not enough and the system will shut down violently. Adding extra will not make the machine turn faster, but it will not do any serious harm other than maybe a gunky mess someone has to clean up. Better to use a little too much lube than not enough. The lube for the economic machine is money.

There were a few other interesting things in the articles that I didn’t know or hadn’t thought about recently. It refers to the late Wynne Godley at Cambridge University as the “father of stock-flow consistent modeling”. I think a few people in a few different disciplines might claim that mantle, but that is the neat thing about system theory, it’s interdisciplinary. There is a certain irony if anyone is into it and doesn’t realize it is interdisciplinary.

There is a free(?) system dynamics system called Minsky, something like Stella but tailored specifically to finance and economics. Matlab also has a sort of stock-flow simulation module call Simulink that I hadn’t heard of. I am still waiting for that system dynamics R package.

The Minsky model also made me think of the late Jay Forrester, who advocated for a long time for stock-flow modeling in economics.

Traditional mainstream academic economics, by trying to be a science, has failed to answer major questions about real- life economic behavior. Economics should become a systems profession, such as management, engineering, and medicine. By closely observing the structures and policies in business and government, simulation models can be constructed to answer questions about business cycles, causes of major depressions, inflation, monetary policy, and the validity of descriptive economic theories. A system dynamics model, as a general theory of economic behavior, now endogenously generates business cycles, Kuznets cycles, the economic long wave, and growth. A model is a theory of the behavior that it generates. The economic model provides the theory, thus far missing from economics, for the Great Depression of the 1930s and how such episodes can recur 50–70 years apart. Simpler system dynamics models can become the vehicle for a relevant and exciting pre-college economics education.

Jay Forrester, quoted in a blog called Viewpoints that Matter (including the blogger’s viewpoint, presumably)

Imagine if the average high school graduate really had an intuitive understanding of how important systems like the economy are structured and why they function the way they do as a result. The world might be a different place.

I’ve been working on one more metaphor for awhile. Maybe the real economy is like a tightrope, and the financial economy is like a safety net stretched above a concrete floor. If we use too much food, water, energy, saturate the atmosphere and ocean with our waste, etc. we will fall off the rope. Hitting the concrete floor would be a failure of the real economy like starvation or freezing to death. The safety net would be a spike in prices for food or energy that slows down the economy short of (most people, right away) actually dying of exposure. The fall would still be very painful and you might break bones or even your neck if you fall just the wrong way. What about something like nuclear proliferation or all the ice in Antarctica suddenly melting? I don’t know, maybe dry rot in the old net that we are failing to do anything about. No price signal is going to save us from those.