Friday, August 22, 2014

Making Ebooks More Physical

For this invention will produce forgetfulness in the minds of those who learn to use it, because they will not practice their memory. Their trust in writing, produced by external characters which are no part of themselves
Socrates to Plato in Phaedrus
"A new study which found that readers using a Kindle were "significantly" worse than paperback readers at recalling when events occurred in a mystery story is part of major new Europe-wide research looking at the impact of digitisation on the reading experience." ... "The Kindle readers performed significantly worse on the plot reconstruction measure, ie, when they were asked to place 14 events in the correct order."

The researchers suggest that "the haptic and tactile feedback of a Kindle does not provide the same support for mental reconstruction of a story as a print pocket book does".

"When you read on paper you can sense with your fingers a pile of pages on the left growing, and shrinking on the right," said Mangen. "You have the tactile sense of progress, in addition to the visual ... [The differences for Kindle readers] might have something to do with the fact that the fixity of a text on paper, and this very gradual unfolding of paper as you progress through a story, is some kind of sensory offload, supporting the visual sense of progress when you're reading. Perhaps this somehow aids the reader, providing more fixity and solidity to the reader's sense of unfolding and progress of the text, and hence the story."

From the Guardian If haptic and tactile feedback to give a sense of progress in a book is so important how could this be added to ebook readers? One possibility is a weight that moves from one side of the ebook reader to another as you progress. This would mirror the feeling of a book starting heavier on the right and ending heavier on the left. Assuming you are reading English and not Manga or other back to front based moving system. This could be accomplished with by moving a marble as the book progresses.

Another option is to change the weight based on how far through the book you are. By adding Pez dispenser to the back of the ebook reader that dispensed sweets at points during the book a physical change in the book would result.

Once you are doling out sweets anyway you could flavour them based on the book in question. That would mean you could supply a flavour for the text at certain points which would provide the sort of physical feedback books currently do not. What flavours would go with which books and where? I have never been able to get access to the kindle SDK. But this seems like the sort of hardware project you could try at a hack weekend if you had access to the kindle api.

Thursday, June 26, 2014

The Great Stagnation, Football Ball Edition

'Since 2002, panel numbers have roughly halved every four years: 32 in 2002, 14 in 2006 and eight in 2010. Thus, by the 2022 World Cup, players should be kicking a single-panel ball around the pitch.' claimed Ken Bray here. I will call this Brays law 'The number of panels on the World Cup football ball will half every tournament'. This is not quite as epoch defining as Moore's law but still cool I think.

This year according to projections the soccer ball in the world cup should have at most 4 panels. Instead the ball has 6. 50% more panels then you would expect if progress continued at the rate Bray predicted. The Great Stagnation is the belief that things are not improving as quickly as they used to and is used to explain why we still have homeless people but not flying cars.

The number of panels each world cup ball has is found on each balls individual Wikipedia page.

2014 the Adidas Brazuca: 'The ball has been made of six polyurethane panels'

2010 the Adidas Jabulani: 'The ball was constructed consisting of eight (down from 14 in the 2006 World Cup) thermally bonded, three-dimensional panels'

2006 the Adidas Teamgeist:'The Teamgeist ball differs from previous balls in having just 14 curved panels rather than the 32 that have been standard since 1970. Like the 32 panel Roteiro which preceded it'

Fewer panels mean the ball is smoother and should fly more true. The ball flying true involves the interaction of several variables other than the panel number though. The 2010 ball was notorious for wobbly flight for example. For this reason just reducing the number of panels at the expense of the quality of the ball is a bad idea and may explain why Bray's law has failed. Still not being able to make a ball work with fewer panels indicates a technological innovation slow down to me. The aerodynamics of soccer balls and why there is a race to fewer panels is described in Brays article 'A fly walks round a football'.

Wednesday, March 12, 2014

Lets All Move to No Insurance Land

Ryanair have finally set up their own country. In order not to buy insurance you have to select that option from the country of residence option. Because the UX of select insurance clearly is to choose from a country this option makes complete sense.

If you are going to have a new country of 'don't insure me' it is clearly not in some sort of non country section of the drop down but resides just after Denmark.

I've talked before about where Ryanair if people did what they asked they would disappear. But I still like them, I just like pointing out when some company acts oddly.

There is a level of hiding extra charges from people. Setting up your own country to get an extra few quid out of people really shows commitment.

Sunday, January 05, 2014

Goodreads Recruitment Hack

I entered in some of the node.js books I have been reading into my goodreads list. And they mentioned that they were recruiting.
The programmer who told recruiters about github meet the same fate as the police officer at the end of the wicker man. But at the risk of the same thing happening to me this is a really clever idea. If you are looking for people who know about an area checking if they read the books is one way. Only goodreads can advertise on their site but anyone can look up book reviews. The other surprising thing is with 800k followers goodreads twitter mentions must be like looking at the digital rain from the Matrix. But they noticed that I mentioned their recruitment idea and replied.

Thursday, November 14, 2013

Wheat Map of the US

I thought it would be cool to make a map of the US counties by how much wheat they grew. I took the code from this article and from the Visualize Data book by Nathan Yau

I got some wheat data from here the US department of Agriculture. The map of the US comes from here

Then I cleaned up the data by taking only the columns for state, county and total wheat production. This dataset includes a county 888 and 999 but that seems to be a combination of all the states counties so I stripped those out. Also there are more than 50 states in these county datasets which seems to be standard. There is always messing with numbers being seen as strings with these sorts of manipulations so some casting is needed.

The svg is 1.9 mbs and google drive does not want to store or convert it at the moment but if anyone wants it I can send it to them. This quality of file means zooming in on an individual state, like Kansas, is fine.

The code to create this picture is here.

JDLong on twitter pointed out where to get data for countries. I got the grains from here and a look at the 'head psd_grains_pulses.csv' shows the file layout

I think I want Country_code and value for the commodity wheat in every country in the most recent year value. The country code is 2 characters (iso 3166-1 alpha 2) and the map I have from wikipedia is that format you can get it here

The code to produce colors for each country based on this data is here. Again this is based on the "Visualize This" book from Yau. This css code to set the color of each country gets pasted into the style section of the BlankMap-World6.svg file. I should read all the documentation describing the values before doing any analysis like this. But I am only doing this to make pretty pictures in Python so I am making assumptions to work quickly.

extra: I made a stacked area graph of what crops have been grown when here with the code here.

Sunday, December 30, 2012

World Cup 2010 Heatmap

I am reading Visualize This by Yau at the moment. It is full of really pretty visualization ideas and examples. One it has is creating a heatmap of NBA players. To practice this visualization I have made one of World Cup 2010 players. The dataset I got from the Gardian Data blog 'World Cup 2010 statistics: every match and every player in data'. The data only has 5 qualities quantified but that is good enough to practice making heatmaps.
The R Package code I used is below
library(RColorBrewer)
#save the guardian data to world.csv and load it
players2<-read.csv('World.csv', sep=',', header=TRUE)
players2[1:3,]
#players with the same name (like Torres) meant I had to merge surnames and countries
players2$Name <-paste(players2[,1], players2[,2])
rownames(players2) <- players2$Name
###I removed one player by hand
###I now do not need these columns
players2$Position <- NULL
players2$Player.Surname <- NULL
players2$Team <- NULL
players3 <-players2[order(players2$Total.Passes, decreasing=TRUE),]
### or to order by time played
###players3 <-players2[order(players2$Time.Played, decreasing=TRUE),]
players3 <- players3[,1:5]
players4<-players3[1:50,]
players_matrix <-data.matrix(players4)
###change names of columns to make graph readable
colnames(players_matrix )[1] <- "played"
colnames(players_matrix )[2] <- "shots"
colnames(players_matrix )[3] <- "passes"
colnames(players_matrix )[4] <- "tackles"
colnames(players_matrix )[5] <- "saves"
players_heatmap <- heatmap(players_matrix, Rowv=NA, Colv=NA, col = brewer.pal(9, 'Blues'), scale='column', margins=c(5,10), main="World Cup 2010")
dev.print(file="SoccerPassed.jpeg", device=jpeg, width=600)       
#players_heatmap <- heatmap(players_matrix, Rowv=NA, Colv=NA, col = brewer.pal(9, 'Greens'), scale='column', margins=c(5,10), main="World Cup 2010")
#dev.print(file="SoccerPlayed.jpeg", device=jpeg, width=600) 
dev.off()
Nothing very fancy here. Just showing that with a good data source and some online tutorials it is easy enough to knock up a picture in a fairly short time.

Monday, December 24, 2012

The Price Of Guinness

When money's tight and hard to get 
And your horse has also ran, 
When all you have is a heap of debt - 
A PINT OF PLAIN IS YOUR ONLY MAN.
Myles Na Gopaleen

How much has Guinness increased in price over time? Below is a graph of the price changes. The data is taken from a combination of the Guinness price index and CSO data

The R package code for this graph is below.

pint<-read.csv('pintindex.csv', sep=',', header=TRUE)
plot(pint$Year, pint$Euros, type="s", main="Price Pint of Guinness in Euros", xlab="Year", ylab="Price Euros", bty="n", lwd=2)
dev.print(file="Guinness.jpeg", device=jpeg, width=600)       
dev.off() 
Paul in the comments asked a good question. How does this compare to earnings?
        price   Earnings/Price     Earnings per Week (Euro)
 2008   4.22    167.31                 706.03
 2009   4.34    161.69                 701.73
 2010   4.2     165.02                 693.08
 2011   4.15    165.81                 688.11
 2012   4.23    163.56                 691.87
Here the earnings are average weekly earnings which is the modern and slightly different value to average industrial wage which the Pint Index used. It shows that even with a price drop in Guinness the total purchasing power of pints with wages decreased. This is based on gross wages increases in tax probably made the situation based on net wages worse.

Pintindex.csv is

Year,  Euros 1969, 0.2 1973, 0.24 1976, 0.48 1979, 0.7 1983, 1.37 1984, 1.48 1985, 1.52 1986, 1.64 1987, 1.73 1988, 1.8 1989, 1.87 1990, 1.93 1991, 2.02 1992, 2.15 1993, 2.24 1994, 2.34 1995, 2.42 1996, 2.5 1997, 2.52 1998, 2.65 1999, 2.74 2000, 2.88 2001, 3.01 2002, 3.24 2003, 3.41 2004, 3.54 2005, 3.63 2006, 3.74 2007, 4.03 2008, 4.22 2009, 4.34 2010, 4.2 2011, 4.15 2012, 4.23