How long does it take to count to 1 million? 1 billion? 1 trillion?

Posted In: Math | Programming
Facebooktwittergoogle_plusredditpinterestlinkedinmail

My son likes large numbers (like septillion, googol and googolplex) and once asked me how long it would take to count to septillion (which is 1 followed by 24 zeros).  I told him it would take longer than the age of the universe to do that, so he started working his way down.  He asked me about counting to one million.  I did a little math (assuming one number per second) and got about 11-12 days . . . but then thought, the large numbers (like 658,243) take more than a second to say.

Looked on the web a little to see if anyone else had done a more sophisticated calculation.  Lots of calculations were like my own (assuming one number per second).  Others acknowledge that it would take longer for large numbers and made assumptions about what that would be.  But nothing definitive, so I thought I’d make one.  This counting calculator is based on the number of syllables in every number and counts all the syllables you’d have to pronounce in order to count from one to one million (or other numbers).

(more…)

How Much Water is in California Reservoirs? – Current and Historical Visualization

Posted In: Water
Facebooktwittergoogle_plusredditpinterestlinkedinmail

California has had an issue with drought, especially for the past few years now.  Recently, 2016’s El Nino weather pattern has brought a significant amount of rain to the state and helped alleviate some, but not all, of the major issues.  
I’ve been very curious to understand how the rain storms we experience are lessening the impact of the drought, and whether one wet season (like 2016) can really “get the state out of a drought”.  One way to assess this is to look at the status of California reservoirs.

(more…)

Shall We Play A (Market Timing) Game?

Posted In: Financial Independence | Money
Facebooktwittergoogle_plusredditpinterestlinkedinmail


The Market Timing Game simulation is premised on the idea that buying-and-holding index investing and index funds are a no-brainer investment strategy and market timing (i.e. trying to predict market direction and trading accordingly) is a less than optimal strategy. The saying goes “Time in the market not timing the market”. In this simulation, you are given a 3-year market period from sometime in history (between 1950 and 2018) and you start fully invested in the market and can trade out of (and into) the market if you feel like the market will fall (or rise). The goal is to see if you can beat the market index returns.

If you get the 80’s movie reference to “WarGames”, then you might guess the best way to avoid losing the Market Timing Game.

Another way to put this is just to buy and hold. Put your investments into low-cost index funds and don’t worry (too much) about the ups and downs of the market. They always happen, but over time, stocks tend to go up and trying to time when to get into or out of the market leads to sub-optimal result for most regular investors and even many professional investors.

Data and Tools: Daily, historical dividend adjusted prices for the S&P500 stock index (between 1950 and 2018) were downloaded from Yahoo! Finance. The game was programmed in Javascript using the Plot.ly engine to create the graph.

¿Cuánto tardarías en contar hasta un millón?

Posted In: Counting | Fun | Math
Facebooktwittergoogle_plusredditpinterestlinkedinmail

Disculpe(n) mi pobre español. Utilicé google translate para escribir esto en español.
Aquí está la calculadora que calculará cuánto tiempo lleva contar un millón (o números mayores) en español.
(more…)

Financial Freedom Calculator (Multi-Period FIRE Visualization)

Posted In: Financial Independence
Facebooktwittergoogle_plusredditpinterestlinkedinmail

This is an update to the Financial Freedom Calculator. That one still works well, but this version adds the ability to add multiple savings amounts representing different periods in time. This allows you to visualize your progress towards financial freedom rather than just giving you the latest value for your freedom date. It does so by showing different colors for the different periods (you specify them by adding different savings amounts and names). It should be fairly obvious looking at the calculator, but if you had a total of 25000 in savings in 2016 and 70000 in 2017, then your calculator is colored in two sections representing the freedom days you had achieved in the two different years.
(more…)

Interactive Dot Illusion (Individual Linear Motion Yields Circular Motion)

Posted In: Fun
Facebooktwittergoogle_plusredditpinterestlinkedinmail

This post doesn’t really involve data, but I was just messing around with animation and the canvas in Javascript and decided to make this. It’s a fun little interactive web animation that makes aggregate circular motion from a bunch of dots moving in straight lines. There are no real instructions except to mess with the controls and see what it does to the animation (i.e. change the number of dots, the speed slider, the dot colors, and show the dot paths).
(more…)

Demographic Characteristics of US Voters (2016)

Posted In: Voting
Facebooktwittergoogle_plusredditpinterestlinkedinmail

US politics has more than a few issues, which have been highlighted by the current situation in Washington DC. The protests and greater political awareness from high school students and young adults is a positive sign for democracy, but it needs to be accompanied by increased rates of voting from this demographic. I thought it would be interesting to explore rates of voting in the US across different demographic groups (age, education, income, race). This data is from the 2016 US presidential election.

Total eligible US voting population was about 224 million in 2016 and the overall rate of voting among this population was 61.4%.

The first graph shows the distribution by age. As we can see, the rate of registration and voting increases with age. It is hard to engage young people to be interested in voting but hopefully they will do so in greater numbers this upcoming election.

(more…)

Counting to One Million, One Billion or One Trillion in Spanish

Posted In: Counting | Programming
Facebooktwittergoogle_plusredditpinterestlinkedinmail

There was lots of interest in the calculator to estimate counting time (in English) to one million, one billion and up to one trillion.  I decided to do the same for other popular languages (Spanish).  Here is the calculator that will calculate how long it takes to count to one million (or larger numbers) in Spanish. 
(more…)