On Friday, February 20, I had the pleasure of giving a talk to a group of young and smart individuals enlisted to represent Barcelona in the Global Urban Datafest. For this hackathon, the organizers offered one Raspberry Pi platform per team and a variety of sensors to capture physical parameters. Their list of suggested project topics included data acquisition and actuation, monitoring and management, security transport and mobility, the environment, and more. The event lasted three days and was locally organized by Anna Calveras and Josep Paradells with the help of Universitat Politècnica de Catalunya, Barcelona’s City Council, iCity Project, Urbiotica, IBM, and Wolfram Research.

Early on, hackathon participants were oriented to the various tools available to aid them with development. I showed the hackathon participants that the Wolfram Language knows about thousands of real-world entities, and that everything in the language is a symbolic expression.

Using CityBikes API to get real-time data, it was easy to track usage in a bike-sharing system in a smart city. Importing and visualizing this data with GeoGraphics was straightforward:

I ran a scheduled task to obtain the data for Barcelona every 10 minutes. Here is an animation of that data, showing bike usage in Barcelona over a 24-hour period:
Then I explained how I used a Raspberry Pi to digest Friday’s bicycle data overnight. The microprocessor was set up to compute the total number of bicycles available in different cities every 10 minutes from 3:30–8:30am CET:

European cities showed a valley in the number of available bicycles at 8am when people cycled to work. Citizens from New York and Mexico City were found to head back home around 5am CET.
Essential for this hackathon was the new Wolfram Data Drop, an open service that makes it easy to accumulate data of any kind, from anywhere, which works great on the Pi while connected to theWolfram Cloud. The following is a dataset that I created for Barcelona’s bike-sharing system. Every 3 minutes the total number of parked bicycles is added to a Databin:
http://blog.wolfram.com/2015/05/01/a-smart-programming-language-for-a-smart-cities-hackathon/