Xkcd comic book reverse engineering
About a week ago, Randall Munroe published the Frequency comic , in which various inscriptions blink with a frequency that roughly corresponds to the frequency of these events in the real world: birth, death, heartbeat, wedding, someone breaks the iPhone screen, a European resident kisses for the first time, etc. d. The beautiful pulsating picture actually consists of 50 animated GIFs.
One of the lovers of creativity Munroe wondered : how long does the full cycle take for all personnel? To do this, he downloaded GIF files, wrote his own GIF parser - and fixed the cycle of each file. The results are shown in the table below: planned cycle in seconds, planned number of impressions per hour, real cycle in seconds and real number of impressions per hour.
For 21 images, the planned indicator is different from the real one, because no modern browser supports a frame delay of less than 0.02 s. If this occurs, then the browser simply replaces the delay with 0.1 s.
The five most frequent events.
![](https://habrastorage.org/getpro/habr/post_images/168/81b/551/16881b551631c1bc938b7937141019c6.gif)
![](https://habrastorage.org/getpro/habr/post_images/1ea/769/897/1ea7698977a94c6a4f0433377c033558.gif)
![](https://habrastorage.org/getpro/habr/post_images/c73/dee/354/c73dee354da79a5de152d50e761b5531.gif)
![](https://habrastorage.org/getpro/habr/post_images/537/6c1/270/5376c127048a513782cdba10fffbfdea.gif)
![](https://habrastorage.org/getpro/habr/post_images/8f1/ab0/de1/8f1ab0de12f9ec552cc48cb5bef526d4.gif)
Five of the rarest events.
![](https://habrastorage.org/getpro/habr/post_images/3c9/7c8/7ad/3c97c87addb2516bdf7033b61d3741c7.gif)
![](https://habrastorage.org/getpro/habr/post_images/874/141/156/8741411566156631c4270121331879c5.gif)
![](https://habrastorage.org/getpro/habr/post_images/918/607/1fc/9186071fcac8f264333134241d8bb8d0.gif)
![](https://habrastorage.org/getpro/habr/post_images/ed3/48b/81a/ed348b81abaf943bf6ddc5f9f34d5b00.gif)
![](https://habrastorage.org/getpro/habr/post_images/332/d57/e2f/332d57e2f0235edcb1bdb918d1626e7e.gif)
The frequency of each event is presented on a heatmap. The darker the color, the more often the event occurs.
![](https://habrastorage.org/getpro/habr/post_images/fa6/fbe/7cf/fa6fbe7cfb55d9e35da296347f65156b.png)
The rarest events are earthquakes with magnitude 4 and gushing of the Old Faithful geyser (94 minute cycle).
One of the lovers of creativity Munroe wondered : how long does the full cycle take for all personnel? To do this, he downloaded GIF files, wrote his own GIF parser - and fixed the cycle of each file. The results are shown in the table below: planned cycle in seconds, planned number of impressions per hour, real cycle in seconds and real number of impressions per hour.
For 21 images, the planned indicator is different from the real one, because no modern browser supports a frame delay of less than 0.02 s. If this occurs, then the browser simply replaces the delay with 0.1 s.
loop_seconds | per_hour | needs_adj | loop_seconds_adj | per_hour_adj | |
---|---|---|---|---|---|
name | |||||
birth | 0.24 | 15000.00 | * | 0.34 | 10588.24 |
death | 0.56 | 6428.57 | * | 0.66 | 5454.55 |
domain | 0.64 | 5625.00 | * | 0.74 | 4864.86 |
wikipedia | 0.67 | 5373.13 | * | 0.77 | 4675.32 |
wedding | 0.75 | 4800.00 | * | 0.85 | 4235.29 |
shark | 0.83 | 4337.35 | * | 0.93 | 3870.97 |
heartbeat | 0.86 | 4186.05 | * | 0.96 | 3750.00 |
turnsignal2 | 0.90 | 4000.00 | * | 1.00 | 3600.00 |
iphone | 0.93 | 3870.97 | * | 1.03 | 3495.15 |
flight | 0.93 | 3870.97 | * | 1.03 | 3495.15 |
turnsignal1 | 0.94 | 3829.79 | * | 1.04 | 3461.54 |
car_elsewhere | 1.03 | 3495.15 | * | 1.13 | 3185.84 |
phoenixshoes | 1.08 | 3333.33 | * | 1.18 | 3050.85 |
meteor | 1.15 | 3130.43 | * | 1.25 | 2880.00 |
littleleague | 1.23 | 2926.83 | * | 1.33 | 2706.77 |
bottles | 1.27 | 2834.65 | * | 1.37 | 2627.74 |
denverpizza | 1.27 | 2834.65 | * | 1.37 | 2627.74 |
ndsex | 1.38 | 2608.70 | * | 1.48 | 2432.43 |
pulsar | 1.40 | 2571.43 | * | 1.50 | 2400.00 |
cat_mockingbird | 1.82 | 1978.02 | * | 1.92 | 1875.00 |
car_china | 1.89 | 1904.76 | * | 1.99 | 1809.05 |
phoenix | 2.05 | 1756.10 | 2.05 | 1756.10 | |
tattoo | 2.06 | 1747.57 | 2.06 | 1747.57 | |
earthquake1 | 2.43 | 1481.48 | 2.43 | 1481.48 | |
keys | 2.43 | 1481.48 | 2.43 | 1481.48 | |
eagle | 2.69 | 1338.29 | 2.69 | 1338.29 | |
vibrator | 2.99 | 1204.01 | 2.99 | 1204.01 | |
car_japan | 4.01 | 897.76 | 4.01 | 897.76 | |
4.32 | 833.33 | 4.32 | 833.33 | ||
recycled | 4.64 | 775.86 | 4.64 | 775.86 | |
bieber | 4.73 | 761.10 | 4.73 | 761.10 | |
kiss | 5.53 | 650.99 | 5.53 | 650.99 | |
car_germany | 5.80 | 620.69 | 5.80 | 620.69 | |
house | 6.22 | 578.78 | 6.22 | 578.78 | |
car_us | 6.95 | 517.99 | 6.95 | 517.99 | |
dogbite | 7.01 | 513.55 | 7.01 | 513.55 | |
amelia | 7.79 | 462.13 | 7.79 | 462.13 | |
parliament_toilet | 10.06 | 357.85 | 10.06 | 357.85 | |
dog | 15.60 | 230.77 | 15.60 | 230.77 | |
us_cancer | 18.99 | 189.57 | 18.99 | 189.57 | |
cat | 9.30 p.m. | 169.01 | 9.30 p.m. | 169.01 | |
fire_dept | 23.00 | 156.52 | 23.00 | 156.52 | |
earthquake2 | 24.26 | 148.39 | 24.26 | 148.39 | |
bike | 24.93 | 144.40 | 24.93 | 144.40 | |
book_mockingbird | 42.05 | 85.61 | 42.05 | 85.61 | |
us_cancer_death | 54.34 | 66.25 | 54.34 | 66.25 | |
holeinone | 180.00 | 20.00 | 180.00 | 20.00 | |
earthquake3 | 242.60 | 14.84 | 242.60 | 14.84 | |
earthquake4 | 2426.00 | 1.48 | 2426.00 | 1.48 | |
oldfaithful | 5640.00 | 0.64 | 5640.00 | 0.64 |
The five most frequent events.
![](https://habrastorage.org/getpro/habr/post_images/168/81b/551/16881b551631c1bc938b7937141019c6.gif)
![](https://habrastorage.org/getpro/habr/post_images/1ea/769/897/1ea7698977a94c6a4f0433377c033558.gif)
![](https://habrastorage.org/getpro/habr/post_images/c73/dee/354/c73dee354da79a5de152d50e761b5531.gif)
![](https://habrastorage.org/getpro/habr/post_images/537/6c1/270/5376c127048a513782cdba10fffbfdea.gif)
![](https://habrastorage.org/getpro/habr/post_images/8f1/ab0/de1/8f1ab0de12f9ec552cc48cb5bef526d4.gif)
Five of the rarest events.
![](https://habrastorage.org/getpro/habr/post_images/3c9/7c8/7ad/3c97c87addb2516bdf7033b61d3741c7.gif)
![](https://habrastorage.org/getpro/habr/post_images/874/141/156/8741411566156631c4270121331879c5.gif)
![](https://habrastorage.org/getpro/habr/post_images/918/607/1fc/9186071fcac8f264333134241d8bb8d0.gif)
![](https://habrastorage.org/getpro/habr/post_images/ed3/48b/81a/ed348b81abaf943bf6ddc5f9f34d5b00.gif)
![](https://habrastorage.org/getpro/habr/post_images/332/d57/e2f/332d57e2f0235edcb1bdb918d1626e7e.gif)
The frequency of each event is presented on a heatmap. The darker the color, the more often the event occurs.
![](https://habrastorage.org/getpro/habr/post_images/fa6/fbe/7cf/fa6fbe7cfb55d9e35da296347f65156b.png)
The rarest events are earthquakes with magnitude 4 and gushing of the Old Faithful geyser (94 minute cycle).