Friday, November 9, 2012

Data Crunching, Election Edition

I'm getting more into data analytics, and have been looking for some substantial examples beyond the usual "more and more companies are using analytics" blanket statements from Harvard Business Review. Much to my relief, Time came out with a nice piece about the Obama campaign's use of data in their recent electoral victory.

Full disclosure: I'm a libertarian and was in the 1% of the population that voted for Gary Johnson. Living in Massachusetts, my vote didn't matter anyway. I also voted for Scott Brown for Senate because he is a moderate, though his campaign was poorly managed.

Anyway, the article points out some interesting bits about how the Obama campaign pulled off the win. Through massive computer simulations, data crunching, targeted ads, and efficient door-knocking, they were able to raise $1 billion. That is impressive no matter how you spin it, folks. One can only imagine what upcoming local elections will have.

I have a friend who works in the (spinning down post-election) Elizabeth Warren campaign. He's more on the database-building-mechanics side of things, but he was able to talk about how the campaign used the data to target individual voters. My bet: the scale of analytics used in this year's national election (per voter) will be used at the local level in 2-4 years.

Monday, November 5, 2012

Delivery Time Improvement Auction Market

In high school and during college breaks, I worked at a local pizza place (as I've mentioned all too frequently here). As an overzealous engineering student, I was always looking for ways to do things more efficiently. One of our biggest problems: inefficient allocation of human capital (a.k.a. delivery boys).

Alas, I never had the time to come up with anything fancy, until now (years later). I decided to start a pet project to develop a web-based "Pizza Delivery Route Optimizer" using as much open source software as possible.

I'm still designing the system, and don't plan on selling it, but a thought occurred to me:

What if people could bid in a live auction on how quickly their orders could arrive? Let's say it's a busy Friday night, and you want your pizza there in 30 minutes or less. In a fair world, even with a fancy Pizza Delivery Route Optimizer running, this would be an unrealistic expectation.

But what if it weren't? What if you could see approximately when your order would arrive, how many orders were ahead of you, and could either bid against other orders to move up in the pecking order or pay a small fee to do the same? What would be a fair price? I'd imagine it would be tailored to current supply (number of drivers) and demand (number of orders). For example, if there are 20 orders ahead of you and only 15 drivers on staff, the fee would be higher than it would be if there were 10 orders and 12 drivers.

To do an auction, the customer would need to set up an account and would only be billed if their expected (not actual) delivery time were made earlier. It'd be unfair to the delivery guy (and probably unsafe) to guarantee a time of arrival. Remember Domino's "30 Minute Guarantee"? Domino's ended it when a delivery guy killed someone trying to make it in the 30 minute window.

I think there may be a market for the auction format, but the implementation would be tough. For one, you wouldn't likely have people stay on a website to actually bid in real time (they are, after all, not willing to spend the time picking the pizza up in the first place). Therefore, a simple fee would probably be easier to implement. This would, however, not necessarily do well for the delivery guy, since the customer would feel no reason to tip the delivery guy if they've already paid more for the delivery in the first place. Perhaps you could split the fee with the delivery guy? It's a tough one to do if you want things to be fair to all parties.

Monday, October 29, 2012

2012 MLB Dollars Per Win

With the San Francisco Giants' sweep of the Detroit Tigers last night, the 2012 MLB Season is officially in the books.

As I've done the past few years, I broke things down in simple terms: which teams were the most efficient in getting the most value per dollar in payroll? Yes, this isn't really a straightforward answer, since teams with higher payrolls tend to have higher non-baseball revenues (namely merchandising and TV deals), but from a pure baseball standpoint: who had the best year?

Below is a simple table of how teams ended up in terms of dollars in payroll vs. total wins (including post-season). The Oakland Athletics, a perennially efficient team, did extremely well this year, spending nearly one fifth as much per win as the lowly Red Sox. Not to be forgotten was the sub-par performance of the Phillies this season.




Source for payroll amounts: http://www.cbssports.com/mlb/salaries

The World Series Champion San Francisco Giants ended up in the middle of the pack due to their above average payroll, though one could argue winning it all is worth it. I would also credit the Washington Nationals for being the only other 100 win team while having a below average payroll; great year for the Natinals.

Just for your edification, here is the correlation between wins and payroll this year. Note how low R^2 is: 0.053. I'd have to look at other years, but this year turned out to be quite a year of parity.


Saturday, October 20, 2012

Nissan's New "Steer By Wire" Technology

Before watching the video, I wasn't sure what Nissan was trying to accomplish. I didn't know of any market demand for this technology. After viewing the video and learning of the "smooth ride" capabilities, I was hooked. I can't wait for this to arrive in all cars.

I'm assuming the clutch also serves as the mechanical back-up in the event of a loss of power to the control units; the video seems to state that. That would be a major concern from a safety standpoint.

This also plays right into my dream of driverless cars. With this new system, all you'd need to do to make the vehicle driverless (assuming you completely remove the human driver) is ditch the steering wheel and clutch and plug the control unit into a master vehicle controller, which would also control throttle and brake. No more goofy actuators on the steering wheel; full-authority steering! 

Monday, October 8, 2012

Pizza Delivery Routing Algorithm - A Pet Project

A couple months ago I realized that I had completely given up on my interest in web application development. I'd studied it briefly towards the end of my Master's curriculum a couple years ago, and had been meaning to reignite my interest through a couple projects. I'm not very gifted at web development, but I've seen enough to become interested. Alas, starting an MBA and getting married became greater (and worthwhile) time sinks.

The good news (for me and my interest) is that my wedding is on Saturday, which means I'll have some free time coming up. That, and I'm most of the way through the core MBA curriculum. Right now I'm taking a course in information systems management, which, if anything, is feeding my interest in restarting my hobby. My buddy Sam has been working on something for a couple years now, and his advice was simple: "Just do something, anything. Keep sharp."

My first project: pizza delivery routing algorithm. As I've mentioned before here, I used to deliver pizzas in high school and during college breaks. I developed a strange passion for operational efficiency after the business expanded and we had a new Point of Sale (POS) system installed. This was in 2004. My boss had no interest in even developing a website for the business at the time. He was mostly concerned with building the business one week at a time. But that didn't stop me from analyzing how inefficient some of our processes were - I was an engineering student, after all.

One of the major annoyances in operating a business with a personal delivery component (e.g. pizza) is figuring out how best to allocate your delivery resources (e.g. the drivers). My boss was notorious for taking guys off the clock if business was slow. The drivers figured this out quickly and gamed the system by taking as long as reasonably possible to complete a delivery during the slow down periods. It infuriated the boss, but he had to live with it.

On the flip side, when business was booming (e.g. during the dinner rush on a Friday night), we couldn't have enough drivers. Orders would run late because of the sheer backlog. Guys would make 2-3 trips per hour. Even with 15 drivers on the clock at once, we couldn't keep up. Drivers were motivated mostly by tips, and knew that getting the order to the customer sooner rather than later would result in a better tip. Drivers couldn't care less if the next order was late. This led to serious inefficiency. Whenever I was in charge of routing deliveries, I'd have guys wait a few agonizing minutes for any deliveries they could take in tandem based on geographical proximity - basically: if you have two orders going to Main Street in Trumbull (a 15 minute drive), have the driver take both even if they came in 10 minutes apart. It drove drivers, and my boss, crazy, but it resulted in fewer late orders on the whole. We would call these "two baggers" or "three baggers" - depending on how many orders went out (in warming bags).

I wished that the manual routing I had to do were somehow automated. I know there has to be something already out there now, but I figured my first project would be to develop something simple.

The interface should be straightforward: provide the user (e.g. manager) with a table of all open delivery orders grouped by recommended batch. A batch would be determined based on driving time for the round trip and would be temporal - you wouldn't batch two orders together that were ordered more than 35 minutes apart (for argument's sake). The idea is to provide the manager with a set of options to maximize the efficiency of each delivery driver at any one time.

The system would have to be flexible and optional. It would have to interface with the existing POS system to collect all open orders coming in. It should be optional because of various factors that come into play, especially driver skill. A manager probably wouldn't want to assign a long and expensive "three bagger" to the newest driver. The manager would have the option to break the orders into pieces. Therefore, the system would have the be "slave" to the POS system except, perhaps, if the manager decided to go with the recommendation and assign deliveries through it and have the POS system only become the "slave" in such cases. For example, if the system recommends a particular batch, the manager would select that batch, match it with a driver, and click "ASSIGN." The system would send the request to the POS system, which would assign those three orders to the driver.

I plan on using the MapQuest API for the background routing algorithm. There are many other options, but I found MapQuest's to be the most open for now.

There are a few tricky aspects that I'll need to take into account:

- Ensuring the correct address is entered. This would probably need to be tied in with the POS - the user may need to confirm the address with the customer.
- Tweaking the interface with the POS system to pull and push requests (timing, etc.). I'll have to make my own dummy POS for starters.
- Tweaking the algorithm to take other factors into account, like weather (doubtful) and performance parameters for drivers like average delivery time (maybe)

I doubt any business would actually pay for this, but it's a neat project. Maybe, just maybe, I could get a blurb in Pizza Today.

Tuesday, October 2, 2012

The CN Turbo Train

Canadian rail was way ahead of its time.

The TurboTrain - a United Aircraft product.


Sunday, September 30, 2012

Customer Service and the Principal-Agent Problem

A couple weeks ago, I read a nice little piece that Stephen Dubner wrote on the Freakonomics blog about the principal-agent problem. A cheap, but guilt-ridden, reader wrote in to Freakonomics about an unfortunate transaction involving a cab ride in Las Vegas. The reader was charged $3 to use his credit card on a fare of $11.50, and decided to take it out on the cab driver, who was nonplussed and berate. 

This is a familiar story to anyone in the food service industry, let alone anyone who works in customer service. Anyone who has had to deal with unruly customers who feel “cheated” by something, like a late delivery of their food, usually takes it out on the easiest target (pizza delivery guy, cashier, whomever) instead of those truly responsible for the wrong-doing (manager or store owner). In reality, the principal (the store owner) usually has the leverage (pizza delivery guys are usually just happy to be working) and would rather the customer take out their frustration on the messenger in most cases.

It has to do with misaligned incentives. Back in high school and during college term breaks, I worked at a pizza place that offered “fast free delivery.” My fellow drivers and I made most of our money (our wages were low – I left the place earning $7.50 an hour after starting at $5) through tips. The business benefitted from customers who were attracted to the “free” aspect of the delivery service. The rationale we were given as drivers was that the customers would tip us more than we would have received from a delivery fee. For the most part, this was true, and drivers benefitted from the “free delivery” protocol, but it didn’t shield us from dealing with disgruntled, and frequently rude, customers. Despite the root cause usually being out of the driver’s control (busy night, a mistake in the kitchen, etc.), customers usually exerted punishment on the drivers through reduced (or nonexistent) tips. 

One approach I took was to grease the wheels a bit when I knew a fellow driver was going to take a hit for something like a delivery that left the store late (I’d usually wait a few minutes to give the driver some breathing room). While waiting for an order to take, I would call the customer and inform them that we’d been flooded with orders and the driver had just left. I can’t remember many times, save for perhaps a couple exceptions with some truly rude customers, when this didn’t benefit the driver. He’d arrive and be greeted by an understanding customer and the tip amount would usually be unaffected (sometimes it would be higher than expected!). My boss didn’t agree with this strategy because “it makes us look bad if we're slow,” but I continued the “honesty first” approach nonetheless because it didn't really affect the owner's bottom line since the food wasn't going to get there any faster if I called ahead or not. 

Another approach, which got me in trouble a couple times, was only employed if I was the driver who arrived to a late order. If the customer complained and tipped poorly, I’d apologize and inform them of the following: 

“Thank you for your business. I understand your concern, and would like to inform you that the free delivery service is not your only option in obtaining your order. Pick-up is always an option.” 

One customer was visibly upset when I gave him such a disclaimer, and followed me back to the store to complain to the manager on duty. He approached the counter and loudly asked the girl behind the register to find the manager on duty. She looked over at me (the manager on duty) and said “Pat, this gentleman would like to speak to you.” I think the conversation lasted about a minute before he apologized for losing his head. I gave him a menu and told him to keep it handy if he felt like picking up a pizza from us again (words carefully chosen). It’s all about aligning incentives, folks.

Wednesday, August 29, 2012

Cooking Simulator

Try as I might, I cannot find the utility.

Monday, August 27, 2012

"The Switch" Heineken Ad

When I first saw this ad, I replayed it about a dozen times. It was the first time in a long time. The facial expressions are marvelous.

 

The band is Clairy Browne & The Banging Rackettes. I imagine the name is an homage to The Ronettes. They almost pull it off. Almost.

 

Monday, August 13, 2012

Average Speed of New World Records

I was taking a look at a feature on NYTimes.com showing the 38 new world records set at the 2012 Summer Olympics. Several of them happen to have been broken the day before by the same athlete, but in the end: it's still an impressive figure.

I thought it would be nice to see how fast people were moving, on average, while breaking the record. I didn't care much about the cycling records (not discounting you cyclists out there) - just purely human powered movement. This was simply due to the history of running and swimming. We've been doing both for quite a while.

Here's how the new speed records (track and swim) broken down in average speed:



Sunday, July 29, 2012

BOOKD: The Big Short by Michael Lewis

I just added this one to my library book list.


Sunday, July 22, 2012

The Robots of Kiva

The work they are doing at Kiva Systems is pretty amazing. I first heard about them a few months ago, and was happy to find out they're based in North Reading, just north of Boston. Kiva Systems designs and builds warehouse management systems for distributors interested in cutting costs. The systems involve a small army of 18" tall robots, and the scalability is impressive. Here's a video given at TEDx Boston by Kiva's Founder and CEO, Mick Mountz.


Friday, July 13, 2012

Waterbury: The New Ciudad Real?

I grew up in the wealthy Fairfield County, Connecticut. From my vantage point, the Naugatuck Valley was almost as big an eyesore as nearby Bridgeport - "the Valley" had less violent crime, at least. I knew very little about Waterbury. I drove there exactly once before the age of 17 - to pick up my driver's license with my father. The city was nothing more than a part of the small, but historic, rust belt running up the Naugatuck River. I did end up appreciating The Valley at the age of 23, when I moved to Derby, south of Waterbury and west of New Haven, after my parents retired to North Carolina. Immediately, I was intrigued by the residents.

My neighborhood had an interesting mix of Eastern Europeans (Polish and Romanian) immigrants, blacks, and me. During my 19 month residency, I was exposed to a dynamic community that knew virtually nothing of Derby's proud industrial history. There were few, if any, long-time families. Most had lived there since the 60s or 70s and worked in Fairfield County, making the quick drive down Route 8. Few worked north in Waterbury.

That's why I am intrigued by an article in The Atlantic Cities talking about the potential to revitalize Waterbury, the "Brass City" of a bygone industrial era from a century ago. Could high speed rail save Waterbury? The article uses the small city of Ciudad Real, Spain as an example. Ciudad Real boomed after high speed rail moved into town. Folks from Madrid and Sevilla moved in to save on housing expenses. Businesses moved in to cater to the new crowd. The rail line was a channel for gentrification. It's a nice story.

The problem is: Waterbury isn't ready for it. Even if Amtrak moved into town (which is FAR from a sure thing), it would be greeted by a divided city. There are neighborhoods with lovely homes that want nothing to do with the rest of the city. These homes are their own bedroom community. They live relatively well due to incentives and protection by the city. An invasion of wealth may not suit their interests. Also: the city's systems are poorly run. The city has had its share of bad politicians running it. One of my landlords, who lived in an affluent and isolated Waterbury community, described the waste disposal process to me: "They don't have a dedicated pick-up for large items, like couches. So every week, people just throw their large crap on the sidewalk. It's like the city has thrown up. It looks awful." Not exactly appealing to those with means.

But it's not like I want Waterbury to fail. I have friends who live there, and I'm interested in seeing it thrive. I don't know what effect that would have on the rest of the region, but it'd be good to see some competition to the wealthy folks in Westport and Stamford for once.

Sunday, June 24, 2012

Code for America and Civic Engagement

I am fascinated by the work of groups like Code for America. Though I will give due credit to smaller projects like Hacking Tyler Texas for being civically engaged before it was cool.

Here's Jennifer Pahlka, Code for America's founder, at TED:


6-24-12: PBS: America Revealed: Pizza Delivery

As a former pizza delivery guy (glad to see CT is actually featured in this) with a casual interest in supply chain and complex systems, this made my day. It makes me wish the place I worked at in high school had the means to equip the delivery guys with GPS tracking. 




At one point in time (during a college summer break), I worked with my boss to optimize our delivery routing system. Our goal was to cut down on the total number of trips out the door by logically combining deliveries based on distance, location, and the current backlog of orders. If, for instance, it was a busy Friday night and we were (as usual) shorthanded in drivers, we'd get more aggressive in how many deliveries one driver would take at a time. If, however, things were a bit slower, we'd focus more on getting each order to the customer more quickly be doing more direct deliveries. So long as the customers were aware how busy we were (not always the case since our co-workers who answered the phones sometimes didn't operate in the same reality as the drivers), there were usually few complaints about timeliness. The big thing was training and communication. I even wrote a manual and gave it to my boss.

Then again, drivers had their own incentives. Most drivers were less willing to take two orders if their likely tip from additional orders was smaller than the order that was ready to leave the door (typically we'd have drivers wait a few minutes for additional orders going in the same direction). It took some convincing - I often said "We're in this together - I'll find you a big order for later."

But the strangest part about the pizza delivery business is how petty customers can be, especially those who have food delivered on busy nights. Look at all the work being done on your behalf. A ready-to-eat product arrives at your door on a busy Friday night, and you complain about it taking 5 minutes longer than the person on the phone promised and blame the driver. People: please. Go easy on the pizza delivery guy.

Sunday, June 17, 2012

6-17-12: (Delayed) DC Trip Photos

I finally got around to importing the pictures from my trip to DC with friends on Memorial Day Weekend. 

A few select shots:


The Sputnik Martini at Russia House


Next to Pitango Gelato on 7th St NW


The ceiling of the Main Reading Room at the Library of Congress

Saturday, June 2, 2012

Of Monsters and Men - "Little Talks"

I first heard this song on WFNX about a month ago and found the official video intriguing (perhaps it's based on Icelandic folklore?), but my favorite rendition of Of Monsters and Men's "Little Talks" is their performance on Seattle's KEXP.


Sunday, May 13, 2012

5-13-12: Disney's New Touch Interface

I don't know if their product ideas would work, but the technology is incredible.



Thursday, May 10, 2012

5-10-12: Metro GDP Per Capita

The Atlantic Cities had an article today about "America's Most Powerful Cities," which had a chart with the top cities by overall economic output. I figured I'd rearrange it by GDP per capita. Nothing terribly exciting, but here it is:



Rank Metro Area GDP per capita
1 Washington, D.C.  $79,377.36
2 San Francisco  $76,833.33
3 Boston  $69,222.22
4 New York  $67,513.23
5 Houston  $67,053.57
6 Dallas  $59,786.89
7 Philadelphia  $58,508.47
8 Los Angeles  $57,858.27
9 Chicago  $55,715.79
10 Miami  $46,654.55

Saturday, April 28, 2012

4-28-12: Tributes to Levon Helm

With the recent death of rock legend Levon Helm of The Band (my favorite group), there have been a lot of tributes by a variety of artists and fans of his. As overplayed as "The Weight" is (it was one of The Band's biggest hits), it's still a great song, and the cover by The Black Keys featuring (another rock legend) John Fogerty at Coachella is pretty touching:

 

Here's The Band's version from The Last Waltz:



And my personal favorite version from their wonderful live album Rock of Ages:

Saturday, March 31, 2012

3-31-12: Warehouse Robots


Warehouse robots - who knew? Here's a short explanation of the typical tasks of a Kiva robot in a fulfillment warehouse.



Wednesday, March 14, 2012

3-14-12: A Slightly Different Approach to March Madness Brackets

This isn’t novel in any way, but I am thinking about setting up a tournament bracket group/league for next year’s March Madness with a different reward system than usually employed.

Traditionally, the full pay-out goes to the winner or the top three winners based on their tournament selection results (total points based on games won, etc.). Usually it’s money (I never gamble on sports out of principle: I don’t like losing money). But there are some good humored leagues that reward through something like donuts or coffee or something non-monetary. My suggestion works for either, but is non-monetary.

Instead of rewarding the top score, I’d have the top finisher and the bottom finisher buy donuts for all players. Each would buy, say, a dozen donuts for the whole group. This would do three things:

  1. Force people to make risky picks to not win outright, but within reason – nobody wants to finish last if they have to buy donuts AND deal with their colleagues’ grief
  2. Demonstrate some serious game theory. Would you pick “chalk” and hope for an upset so you don’t finish first? How similar would the brackets look?
  3. Allow for discussion of the tournament over donuts!

Like most people, I don’t follow college basketball until tournament time. The only team I pay attention to is UNCW, my younger sister’s alma mater, and they haven’t played in the big tournament in several years. But I can make some reasonably sound guesses that should keep me within that comfortable mid-range. I’m guessing, with a little research, most people can get somewhere near there.

I’m guessing this model would result in more conservative brackets, but overall more consistent performance across the board. Depending on the group, I’d think the range of scores would be smaller than in traditional “winner take all” formats. I have no idea if the average score would be any better, though. Again, I’m sure this is already used in hundreds of brackets, most of which are probably run by economists.

Sunday, March 11, 2012

Tuesday, January 10, 2012

Gotye - "Somebody That I Used to Know" on KCRW

I've seen several versions of this song on Youtube over the past week or so, and this happens to be my favorite version (even compared to the official, studio version). I like his vocals better, but Kimbra's part isn't quite as strong as in the original.