Programming Taiwan

Barometric recording of Typhoon Soulik

It all started a few weeks ago with Sparkfun having “20%-off” day, when I got myself (among other things) a BMP085 barometric pressure sensor. When it arrived, I have soldered some pins on it, and set it up with an Arduino Nano, to have the readings off it easily.

View of the circuit
BMP085 barometric pressure sensor breakout board from Sparkfun

Originally all I wanted is just some laid back pressure recording, so maybe I can use that to predict the weather a bit. “Pressure falls: bad weather comes, pressure rises: things will clear up”. I was recording for about a week, and nothing really noteworthy came out of that.

Then it was the news, that the year’s first typhoon is on the way to Taiwan, and it was supposed to be a big one. Obvious that I will try to record the barometric pressure pattern of its passing, but wanted to make it more interesting and informative. More visual than just the timeseries plot of pressures.

The Japanese Meteorological Agency (JMA) is a good place to watch for information about typhoons. They list path prediction, typhoon properties like strength, wind speeds, and central pressure, have satellite imagery. Putting these together, two days before the typhoon arrived, I set up a script to download the satellite imagery as it became available.

Satellite picture of Typhoon Soulik and location of Taiwan on 2013-07-12 morning
The morning before the typhoon arrived

The JMA publishes usually 2 satellite images in an hour for our North Western Quadrant (at :00 and :30), one of them covers the whole area, the other covers just the top 80% or so, leaving a dark band on the bottom. Nevertheless, matching up the pressure reading with the satellite pictures would be a good little project for this time.

Friday came, the government gave the afternoon off, though it turned out no landfall happened till everyone supposed to be off anyways, just a bit of on-and-off rain. People stocked up on convenience store food (I now have a good supply of instant noodles:) and water, taped over their glass windows, take in their plants and BBQ equipment from outside – well, those who have planned.

Around 10pm the big rain has arrived, here’s a video of how it looked from my window. Went to sleep later, and got woken up around 3:30am by the rain having changed into pretty darn big wind. Here’s another video of the violent part of the typhoon that time in the morning, that doesn’t even really do it justice. The houses around here are pretty tall, and I wonder if they have protected from the wind, or been artificial canyons channeling it. Some things got broken, though not as much as I expected – which is a very good thing.

In the meantime by the power of the Internet I have checked out the pressure reading, how is it going a few miles away in the Taipei Hackerspace, where I have left the barometric pressure sensor (the geolocation is 25.052993,121.516981)

Here’s the entire recording of the approximately 2 days of typhoon. It was pretty okay weather in the start and end of the plot.

Plot of pressure readings
Pressure reading during the passing of Typhoon Soulik, recorded at the Taipei Hackerspace

The readings have been corrected to sea level (from about 20m height, where the Taipei Hackerspace is), should be good within 1hPa or less.

The the pressure was indeed dropping like a rock, and the dip on the graph coincided with the most violent wind that woke me up. According the JMA, the central area of the typhoon had pressures down to 950hPa, which means that core must have passed pretty close to here, having readings below 958hPa, though probably not directly, as it didn’t stay down there for long.

I made a video syncing up the pressure reading and the satellite picture. The red dot on the video marks the recording location. (Watching it in full screen and HD makes it clearer.)

I would wonder what was the flat part in the readings while the typhoon was leaving. Maybe sign of changing direction, by the look of it.

Either way, this was fun to do, and I am glad that only a few people got hurt here, much fewer then even during the less powerful typhoons. Maybe getting people scared a little (like with this “super typhoon” stuff that went on) helps them keep safe? Just don’t use it too often.

Extra material

I put almost all material used here into a gist: the satellite imagery download script, the plotting, the movie frame generation, the movie generation script, and the complete barometric recording. Because this last part is pretty big (5Mb), Github truncated the rest of the scripts. I guess it’s okay to check check it out. Will add the Arduino sketch to read the sensor and the logging script later.

The satellite imagery weighs about 60Mb, so don’t put it online, but if anyone wants them, let me know.

Keep safe!


Startup Weekend Taipei

I really should have started to write this up about two weeks ago, just after StartupWeekend Taipei really happened. Better late than never (if there was ever a good excuse then this is), so taking some time out on this typhoon weekend, here’s my experience of that good 54 hours.

Board with the StartupWeekend Taipei logo


After StartupBus and the Taiwan Enterpreneurship Challenge, I cannot deny that I have a lot of fun at these kinds of events. So I signed up for Startup Weekend Taipei quite a long time ago, especially since I had a free StartupWeekend voucher from Microsoft BizSpark.

I kept recommending the event to more and more people and it seems there were quite a few of my friends who wanted to come but couldn’t because it was all sold out. “Sold out” in this case is 150 participants. That’s probably about the same number of people as on all the Busses, though this time stationary and all in one place. I wasn’t sure what mixture of people will come, just that it will be quite different as Taiwan still seems to have less of a hacker culture.

It turned out that more than 2/3 of the people were Taiwanese and much smaller proportion of foreigners than I expected. This is great – for Taiwan. For me it was a bit of a roadblock.

25 people went up to the stage to pitch their ideas in the hope of getting a team. Of those, only 5 were in English. After the pitching everyone got their three pieces of voting post-it notes and could mark which ideas they liked the most. Based on the votes, only the most popular 12 pitches were kept and only those people could carry on their ideas. Well, since Taiwanese were really not voting for ideas pitched in English, there were in the end 2 ideas that I could join up with… This time it worked out well (oops, is this a spoiler?), but next time probably the organizers should look at this whether the procedure of setting up teams worked or not.

12 teams for 150 people also meant that every team was huge… At the Bus our team had 8 people and I felt it was pretty big. Certainly if I want to start my own company I would probably get going with less then that.

Actually, that large team count is good for getting things done once we agreed on what’s to be done, but it’s pretty bad for reaching such agreement.

Our team had 7 people: 3 coders, 1 designer, 3 marketing/business planning. One (two) sentence pitch: Restaurant search engine for menu items. Tell us what you wanna eat, we show you where are the restaurants serving that in the neighbourhood.

Whiteboard planning for FoodJing at StartupWeekend Taipei
Whiteboard planning for FoodJing interface and functionality

Simple idea, but with our team we had quite a bit of back and forth when discussing the focus of execution. I tend to get very involved once I’m sold on an idea, maybe a little bit too involved. After a bit of discussion I had the role of back-end designer, creating the infrastructure on which all of the user-facing services can be built. I choose that one, because I felt that’s the part of the architecture where I can add the most in terms of making something that other people can rely on and can build on relatively easily. I do feel that without a good back-end no amount a front-end glitter can save things….

Of course in part I chose this role because on the Bus I worked with a great team who taught me a lot about that and wanted to try myself out.

Exercise for the first evening (Friday night): A long, long discussion about a name. Next up is getting some ideas of the feature set then simplify, cut, reduce and then reduce some more. It’s great, I recommend it to everyone. I think I was a bit too combative at that time (sorry, Dobes!), but at least I realized that and tone back quite a bit. Since at 11pm they closed the venue we went home till the morning. I wanted to get something little done by that time so I can show that off for the team. Of course I slept like a log instead.

Next morning (Saturday) I woke up quite early, earlier than usually on a weekday. That’s a very good sign. At the venue they already had some breakfast prepared for everyone. I was too nervous and excited to eat in the beginning. Then when I tried my bagel an hour later, it was amazing! Run back to the table to get another one, but obviously everyone is enjoyed them a lot and were less nervous. All of them were grabbed up.

Filled table with good breakfast and drinks
Breakfast time at StartupWeekend, these were totally yummy

After some more discussion we got working on an actual thing. The technology used:

  • Bottle, a Python micro-framework, it’s a single file. I like it a lot, have to check it out more later, especially because there are a swarm of Python micro-frameworks so good to know the strength and weaknesses of each.
  • MongoDB, through MongoLab, wanted to use for our database and geolocation “nearest place” lookup, but run into some weird Unicode bugs that I couldn’t solve in about an hour. Scratch that, will check it when there’s time
  • Google AppEngine, hosting and database. Perfect for this kind of thing. Had some problem with data export and import (“list” datatypes are not imported back correctly) so I wrote some custom remote imports and all fine at this level. Oh, and Geomodel, that’s useful.
  • lots and lots of Javascript (jQuery, Mustache, something for the instant search,…) for the front-end. That wasn’t me, so not exactly sure what else was going on there. I was checking with the front-end people only as much as it affected the schema of the API response.
Most of the day was spent on setting up an API, working out data lookup with the chosen database and structure, making a data input interface, some helper pages, and fixing a lot of bugs. Saturday evening we had basically everything down conceptually that we needed to have working. Going home at night again was a bit of bug fixing (let’s call it The Time of Duh).

Home stretch

Sunday morning getting up pretty early again, I love this kind of inspired work when I just cannot stop myself. All the way to the venue I was thinking how to use this experience to improve my day job (though it is pretty inspired already, so I guess I’m lucky).

Most of the day was spent by fixing more and more bugs, getting the front-end right (not me, fortunately, I have no real sense of design), getting some real data, real restaurants and menus into the database, figuring out and polishing the pitch, working on the feedback from the surveys our marketing people were doing since Friday evening, do some Facebook page based hyping….. This sort of StartupWeekend stuff.

FoodJing team working
FoodJing team working last minute

I was hoping that we could get an Android app in the end as well, but the person who was working on that I felt over-complicated the thing. Yeah, because I don’t know how much the others must have thought that I’m over-complicating my job… Anyway, I haven’t been writing Android code since the Bus, but actually in about 2.5 hours there it was, an map interface showing real data from our real database. Slap on a search bar and you are golden. There wasn’t any time for finishing that up, but still I was satisfied – it was possible because of a good back-end. (okay, enough of this patting myself on the back, dude)

Then it was finally time to pitch. The panel of judges was impressive. Real investors and business people from Taiwan, US and China, about a dozen of them, maybe more. All very experienced people.

Pandey is introducing FoodJing
FoodJing team pitching for Judges at StartupWeekend

Our presentation was quite good, because the team really prepared for the questions, really answered the concerns an investor would have and covered all our bases. Many of the other presentations were more emphasizing “fun”, had “pie in the sky” models, or had something that some of the judges already gave them feedback in the development phase and they didn’t fix it. It’s probably mostly down to experience. I haven’t pitched before, so I guess I’m not the most reliable source of useful information about this.

Anyway, the punchline: we got first prize.

Foodjing team posing for photo after their win
A winning team and cheque

Of course it feels pretty good. Some non-monetary things (mostly services by the sponsors), but there was a last minute donation of NT$60.000 (about US$2000) from the judges. That comes handy, my share will run that server I’m renting and pay for some domain names for future projects….


The event has been covered on TechOrange and Penn-Olson So two people from the team will actually continue Foodjing. They are based in a different city, and there are some other, administrative issues why I wouldn’t be able to take part in that, but it’s all fine. When they get it done, I’m sure I’ll be an user. And I have plenty of lessons to take home:

  • I really can get excited about a lot of different ideas. Most ideas do have a useful core that can be developed, so on an event like this, the idea that one chooses almost makes no difference. Choose the team instead of the pitch.
  • One weekend is perfectly fine to get something done. In the end we had a working (albeit ugly) prototype. If it was done now, can be done any time. Got to use my weekends better.
  • Talk more to people who can and willing to help. Had a lot of mentors who had great feedback on everything.
  • This is not a hackathon. I took it as it was one, and my goal was getting something working. Talking to some of the organizers it took me by surprise that this is really business and by real I mean real. That these things we are making are as real as it gets. I was just thinking in terms of fun, have to take things more seriously, but without losing the ability of having a good time.
  • This time we succeeded. This cannot make me risk-averse that I don’t try anything unless I’m sure to win, cannot go to the next StartupWeekend with the mindset that I have to win again.
  • There will always be more ideas. For every one of them that fails, or succeeds but goes on without me, there will be 10 more that can be taken up. So where’s my next 10?

All in all, it was a great time and looking forward to the next event like this.