Posts for Tag: graph

Visualizing the outcome of Eeny Meeny Miney Moe

Posted In: Counting | Math
eeny meeny miney moe

Who is selected when kids do Eeny Meeny Miney Moe?

I was watching my kids try to pick who got go first by doing the kids rhyme,

“Eeny, meeny, miny, moe, catch a tiger by the toe, if he hollers let him go, eeny, meeny, miny moe.”

Since there were only two of them, it got me thinking, if you knew which one it would fall on at the end, you could decide who to start counting with to ensure that you select who you want. For each set with different numbers of options, you will get a different individual from that set chosen so I thought I’d visualize who gets selected.

Click “Start” to see which option gets selected when there are different numbers of options. Hover over the graph to see which option is chosen.

There are multiple variants of the rhyme, but the primary one mentioned above has 16 counting elements. The math is such that you take the modulo (which is equivalent to a remainder in long division). For example, if you have 15 choices for the 16 element phrase, you’ll count through all 15 and then go back to the first option and end on it (i.e. item number 1 is chosen). 16 divided by 15 has a remainder of 1. In the case that the remainder is zero, you choose the last item. I.e. if there are 16 items/people to choose among, the last option is chosen and the remainder will be 0.

Longer variants will have more words, which are also shown on the dropdown menu. If you know of other variations, let me know in the comments and I can add them.

Primary: “Eeny, meeny, miny, moe, catch a tiger by the toe, if he hollers let him go, eeny, meeny, miny moe.” – 16 counting elements (“catch a” is one element, “by the” is another, etc)

Variation#1: “Eeny, meeny, miny, moe, catch a tiger by the toe, if he hollers let him go, eeny, meeny, miny moe My mother told me to pick the very best one and that is Y O U” – 31 counting elements

Variation#2: “Eeny, meeny, miny, moe, catch a tiger by the toe, if he hollers let him go, eeny, meeny, miny moe My mother told me to pick the very best one and you are it” – 29 counting elements

Source and Tools:
The rhymes come from my childhood and my kids helped me remember some of the variants. Calculations are done in javascript and visualization is done with the open source Plotly javascript graphing library.

state borders

Bay Area Coronavirus Cases

Posted In: Health
coronavirus bay area

Compare the Bay Area coronavirus cases with Los Angeles and the rest of California

I wanted to better understand the coronavirus situation in my home region, the Bay Area, and I hadn’t seen any good resources that compared what was happening here to other regions in California. So I decided to make this graph. This page will be updated daily so you can come back regularly to see how the situation is changing (and hopefully improving sometime soon).

The coronavirus lockdowns began in mid-March 2020 and things have been opening up in late May, which corresponded to an uptick in coronavirus cases in the Bay Area and throughout California. While the cases in the Bay Area are increasing, it’s clear that there’s a big difference between the Bay Area and much of the rest of California. Los Angeles is currently leading the state with a large increase in the number of new cases in June as the economy tries to reopen restaurants, bars, gyms and other businesses.

You can toggle between coronavirus cases and deaths and look at the absolute numbers or on a per capita basis (per one million inhabitants). California has 39.5 million residents, while greater LA has 18.7 million residents and the Bay Area has 7.7 million residents. The daily data is shown as well as a five day moving average so you can get a better sense of the trends.

The San Francisco Bay Area was among the first regions to impose restrictions on gatherings and encourage people to stay home to fight the virus. In late February, the city of San Francisco declared an emergency in preparation for the upcoming pandemic and by early March, things became clear that life would not continue on as before.

The Bay Area is defined as the nine-county region consisting of Alameda, Contra Costa, Marin, Napa, San Francisco, San Mateo, Santa Clara, Solano and Sonoma counties.

Greater Los Angeles is defined as the 5 county region consisting of Los Angeles, Orange, Ventura, San Bernardino and Riverside counties.

Data and Tools:
County level data on coronavirus cases and deaths is from the New York Times github. Data is processed in python and javascript and graphed using the plotly open source graphing library.
bay area coronavirus cases

Videoconferencing popularity before and during coronavirus lockdown

Posted In: Technology

Zoom has become the primary video conferencing app over the last few months as schools and workplaces increasingly turned to remote learning and meetings.

Since the shelter-in-place orders across the United States due to the coronavirus in early to mid-March, many things have changed about our daily lives. One of the main ones is that schooling and work is being done remotely through video conferencing apps on our computers, tablets and smartphones. Our kids have zoom meetings with their teachers, parents have zoom meetings with our work colleagues and we all have facetime and google hangouts chats with our friends and family.

I remembered just a few year ago Skype was a very popular app to use for video chats, so I wanted to see how Zoom came to be the most popular app. The animated graph above shows the relative search volumes for 5 popular video conferencing apps from January 1 to May 15th (before and during the coronavirus restrictions on travel and gatherings).

This article implies that the reason Zoom had taken over so much is because it is free and easy to use for consumers. Even my tech-challenged mother is doing zoom calls for friends and classes.

Data and Tools:
Data is from google trends analysis of videoconferencing apps. Data is processed in javascript and graphed using the plotly open source graphing library.
zoom popularity

200 Most Popular Ukulele Songs To Learn To Play

Posted In: Music

Here are the most popular ukulele songs on ultimate-guitar.com, a site dedicated to helping guitar and ukulele players learn to play new songs.

Since sheltering-in-place for the last few months, I’ve been playing guitar and ukulele more often than I used to. ultimate-guitar.com is a website I visit frequently in order to learn the chords and lyrics to new songs and also keep a “notebook” of songs that I like to play. I thought I’d check to see what songs are most popular on the website.

These songs are mostly user submitted and voted on. Many popular songs may have many different user submitted versions. I downloaded the most popular songs and aggregated across the different versions of the same song to get this list of the 200 most viewed ukulele songs on the website.

Sources and Tools:

Data was downloaded from the ultimate-guitar.com website. And the visualization was created using javascript and the open source plotly graphic library.

US city names

500 Most Popular Guitar Songs To Learn To Play

Posted In: Music

Here are the most popular songs on ultimate-guitar.com, a site dedicated to helping guitar players learn to play guitar songs.

Since sheltering-in-place for the last few months, I’ve been playing guitar more often than I used to. ultimate-guitar.com is a website I visit frequently in order to learn the chords and lyrics to new songs and also keep a “notebook” of songs that I like to play. I thought I’d check to see what songs are most popular on the website.

These songs are mostly user submitted and voted on. Many popular songs may have many different user submitted versions. I downloaded the most popular songs and aggregated across the different versions of the same song to get this list of the 500 most viewed songs on the website.

Sources and Tools:

Data was downloaded from the ultimate-guitar.com website. And the visualization was created using javascript and the open source plotly graphic library.

US city names

Renewable Electricity Generation in US is Now Greater Than Coal

Posted In: Energy | Environment

A remarkable thing is happening in the United States and in other places around the world. Partly due to the coronavirus pandemic and partly due to changes in natural gas and renewable energy prices, renewable electricity is now a larger fraction of the US electricity grid than coal. As of early May 2020, the fraction of coal generation of US electricity is about 18% while renewables (hydroelectric, wind, solar and geothermal) account for nearly 20%.

For the entire year of 2019, coal accounted for about 24.2% of US electricity generation, while renewables accounted for 17%.4. And in 2018, coal was 28.4% and renewables were 16.8%. When you include nuclear (not technically a renewable resource, but zero emissions of greenhouse gases), about 42% of US electricity generation in 2020 comes from zero carbon sources, while fossil fuels make up the remaining 68%.

This is good news because renewables produce little to no pollution that contributes to urban air quality, health issues and climate change. Coal is by far the worst electricity generation source when it comes to air pollution that impacts human health and climate change. So this shift away from coal and towards renewables is very good news.

Here’s the same graph but showing instead the fraction of electricity from each source (you can hover over the graph to get daily values).

Source and Tools

Data is downloaded from the US Department of Energy’s Energy Information Agency (EIA).. The graph is made using the open source, javascript Plot.ly graphing library.

coronavirus deaths