Thursday, April 28, 2011

Agent-Based Modeling in Nelson BC, Hackathon Style

I was up early enough on Monday morning to drive a partial loop around the town, grab some cereal and soy milk from the local grocery store, and discover the overwhelming beauty of Nelson I missed when I drove in under the cloak of darkness. I really should have brought a box of this cereal home with me. Sean and I discovered it in Vancouver and we loved it.

The city is sandwiched in between a lake and mountains all around. Somehow you miss the feeling that you've dropped down into a valley when you arrive at night. Downtown is relatively flat and adjacent to the lake, while the neighborhood gently climb up the mountain giving every home a stunning view.

Miles was there to collect me right at 9:30 and we walked from the WhiteHouse Backpackers Lodge up to his house. If you made this walk every day, you'd have buns of steel. Nelson has lots of environmentally conscious residents that walk just about everywhere.

He has a fun family. Elka is the sweet smiley baby of the house. Z is the energy of the house. He's probably wondering where I am right now. Kell is their oldest and he's a bit quite and reflective. He seems wise. Miles's wife Jane takes care of everyone, including me while I'm there. There are two dogs, too. One hyperactive Chester, one mellow Lola. I kept quiet about my allergies so I could pet them as much as I wanted. People tend to squirrel their pets away when they find out I have allergies. I was loaded up with antihistamine. I'm petting those dogs. I'm excited. One is jumping all over me. Jane and Miles are trying to make him stop while I'm probably encouraging the bad behavior by trying to get in as much petting as I can. Dogs are just rad. I'm reminded of Hyperbole and a Half.

We spent the first day reviewing models to see what we could re-purpose after talking a little bit about the goals for my project. On Tuesday we really dove in collaborating in a "designer to developer" style very much like my Adobe Flash Hackathon experience. We came up with an underlying TB model that is far more sophisticated than anything I would have been able to formulate on my own. Monday and Tuesday were ten hour days, and Wednesday stretched into twelve. All of the behavioral aspects were coded on Wednesday. We were both exhausted, and I'm not sure how Miles had the energy to push through for so long when he was up most of the night taking care of two sick children.

Going all the way to Nelson BC reminded me that what I do is important and valued. It's unfortunate that I often get bogged down by the politics of my committee. They have clear well intentioned goals for my dissertation work. To finish this degree, that's all that matters I suppose. Miles has had prior experience modeling the dynamics of disease diffusion and he was genuinely interested in my research questions. He's also had experience with policy makers and knows how to construct models that have the capacity to answer the types of questions they are most interested in. When we wrapped up on Wednesday night, the model was about 90% complete. Hopefully I'll be able to sort out the rest in the next week or two.

Thursday morning, after a failed attempt to find a geocache in the rain, it was time to pack up the car and start driving back to Spokane. Of course, right when I'm getting ready to leave, it starts snowing, but only for a minute. The snow came down in giant clumps like nothing I've ever seen before. They were literally big round splats a few inches in diameter. I'm not even exaggerating a little bit. I kept my fingers crossed that it wouldn't start up again, and headed over to the Ellison Market to buy some chocolate to bring home to Sean. This is where folks buy their fresh milk in glass containers among other things. I thought I'd ask the clerk how to get back to the highway that goes to the border. She was bewildered and clearly stressed by the question, so I stopped her mid stammer to let her know I had a map. I would guess that a lot of folks that live in Nelson take very few trips out of the city. The highway out of Nelson was literally a few blocks away.

The trees all around had a beautiful white dusting of snow and as I climbed out of the valley, it started snowing. I can't even begin to describe how spectacular the scenery was. The trees are enormous and everything was just so stunning in shades of green topped with fresh white snow and deeply contrasted by the dark wet pavement. Waterfalls were making their way down craggy rock faces at every turn, and the occasional creek over passes were mighty displays of white water rapids making their way down to the glassy river below. Unfortunately, I didn't stop anywhere along the snowy part to take any pictures because I didn't want to get caught up there should the light snow turn heavy. I have to say, I handled it really well.

The border crossing back to the US was less "interesting" accept that my car, bags, and suitcase were all searched. Not a lot of questions this time around which was fine by me. Heading back into the US, I just felt like the Border Dude was doing his job. A few days earlier when I was entering Canada, I felt like the Border Dude was interrogating me.

Once I was clear of the snow, I stopped a few times to take pictures at various heritage markers and the Box Canyon Dam.

The rest of the drive back to Spokane was relatively free of any precipitation, and traffic was at a minimum until a brief section through the middle of downtown. I stopped at the Mountain Gear store on Division which was somewhat anti-climactic. I was so excited to go there after having bought gear from their online store. It was very much like an REI, but I didn't find any deep discount sales racks. With still an hour before I needed to drop off the rental car, I stopped at a little Asian restaurant called the Mustard Seed for lunch. Nothing to write home about, so I'll spare you the bland review. I will say that the wait staff and manager were really nice and the service was fantastic.

I was in and out of there pretty quickly, arriving at the airport just in time to drop off the rental car before it started snowing again. It was only a tiny bit of snow that had no chance of surviving the warm pavement. Nothing like the giant snow clumps of Nelson, and certainly nothing capable of delaying my flight. In fact, the flight from Spokane to Phoenix was the highlight of the many flights I took for this trip. I flew on US Airways and they will charge you extra for what they consider "premium seats. When I booked, they only had premium seats left. I wasn't about to pay an extra $15 dollars for a premium seat, so I just didn't select a seat for the trip back to Phoenix from Spokane. When I checked in the day before my flight, an exit row seat was now available for no extra charge, so I took it.

When I got on the plane, it wasn't just any exit row seat, it was one of those super awesome exit row seats without a seat in front of it. Check out all of that leg room! It's a little wasted on someone as short as I am, but that didn't stop me from swinging my legs up and down like a kid on the playground.

On top of that, I had the good fortune of sitting next to Matt, a funny guy on his way to Vegas to celebrate his 40th birthday with his best friend.

My connecting flight to Los Angeles departed and landed on time and I thought I'd call the Santa Barbara Airbus office to see if by chance there was a bus back to Santa Barbara at 8:00PM when I landed. One was scheduled to leave at 7:30PM, and the one I had a reservation for was scheduled to leave at 10:00PM. To my total surprise, the 7:30PM bus was still circling the airport and I had literally 5 minutes to get off the plane and run through the airport down to the exits by baggage claim. I got out there exactly as the bus was pulling up in front of my terminal. I've never been so excited to get on a bus. This means I'll get home at 10:30PM instead of 12:30AM.

I've been home a few days now, and it has taken me some time to catch up on all the little projects that I'm involved with. Now it's time to see how far I can get with the model...

Next trip: San Francisco for Google I/O.

Monday, April 25, 2011

Outbound, Inbound, and Determined

This is one of those weeks of travel I will surely remember for the rest of my life. I've been struggling with the coding environment for my dissertation models for quite some time now. I can do the simple things, but it's a slow process for someone without a computer science background. Logic is king in programming, and I am apparently pretty illogical most of the time. So what's a girl to do? Get help.

On April 19th, I contacted Miles Parker, ready for help. He's a software engineer that works in my field. This is important to me because I really wanted the agent-based modeling side of things to be done correctly based on the research questions in my dissertation proposal. I've been doing most of my coding in an environment Miles developed called AMP. It's free, open source, and has a lot of features to make model building easier for non-programmers like myself. Even still, what I'm trying to do goes beyond the typical model.

By Sunday, I was on the Santa Barbara Airbus down to LAX at 3:30 in the morning. Surprisingly, flights on Easter Sunday to just about anywhere are relatively affordable even when you book last minute. I wasn't just going anywhere though. I was heading about as far north as I'd ever been, and of course there was no direct way for me to get there.

For starters, I needed to get to Spokane, Washington, and I needed to get there as early in the day as possible with a returning flight that's after noon. That pretty much excludes flying out of Santa Barbara, so down to LAX I went for a 7:45AM flight to Phoenix and then on to Spokane.

When I arrived at the airport, an earlier flight to Phoenix was just boarding. I thought for a second, I should ask if I can get on that flight. A longer layover in Phoenix would be better because wireless Internet is free there. It's usually not a problem to switch if there are seats in coach available and it usually won't cost you anything. I should have asked. Hindsight = 20/20

My 7:45AM flight was delayed a good 2 hours making me miss my connecting flight. There was quite a bit of commotion on the plane since we had all boarded, yet couldn't get off the ground. This wasn't a case of "trapped on the tarmac" though.

Our delayed flight had thirty North Carolina bound passengers that were originally on another flight that was cancelled. They were all taken off the plane and moved to another flight. There was one family and another woman who were missing their connecting flight to Cancun. Since it was the only flight from Phoenix to Cancun, they were given the option to be stuck in Los Angeles for the night, or travel on to Phoenix to be stranded there for the night, assuming our plane would get fixed. Others were missing their connections to Germany. I never quite heard what happened with them.

Then there was the man from China sitting right in front of me. He was trying to get to Spokane, too, and he spoke little to no English. I showed him my boarding pass and did my best to communicate to him that he should stay with me. The whole time I was thinking about how confusing this must be for him.

Once we landed in Phoenix, we were put on a flight to Portland, and then from Portland we were put on a flight to Spokane. With the help of free wireless Internet in Phoenix, I was able to use Google translate to give him some general information. For instance, he was clearly not a regular traveler in the US because he walked off and left his big duffel bag unattended. Lucky for him, I saved it from being picked up by security.

I've never been to Portland, but it sure does look like a great place to visit. Check out this photo from the plane taken a few minutes after take off:
The original plan was to land in Spokane at 1:15PM. Of course, I don't arrive until 6:20PM. The goal to get to Spokane early was not met and I haven't even told you why I was so concerned about getting there early.

Miles lives far away. Yeah, you get that, but I'm talking all the way up in Nelson, British Columbia. The only practical way to get there is to fly to Spokane and drive the remaining 155 miles north to this little mountain town. From the Spokane airport, you're driving right through downtown, and then after that you're on winding two lane highways the rest of the way.

I had a super cheap rental car waiting for me at the airport ($9.99 a day with unlimited miles, gotta love Enterprise), but since it was getting dark with a potentially icy/snowy drive ahead, I was easily talked into an upgrade. At $17 a day, I was okay with it. Insurance on top of that was a bit pricey, but better safe than sorry. By 7:00PM, I was on the road in a Ford Escape. I felt ready to conquer the road doing my very best to keep ice and snow fears under control.

What I hadn't anticipated were deer. I saw a few of them ever half hour. Big ones, little ones, darting across the road like nobody's business. Every "I hit a damn deer" story I'd heard from friends over the years was playing over and over again in my head. I tried drowning it out with satellite radio, which was something I'd never experienced before. Since I practically had the death grip on the steering wheel, I didn't explore many channels. I spent most of the drive listening to comedians on The Foxxhole. Thankfully there was no snow or ice to contend with and rain was light and never lasted for more than a few minutes.

Being afraid takes up a lot of energy, and by the time I got to the border, I was thoroughly rattled. It was after 9:00PM when I drove up to the border. It seems that there was just one guy working each side. I pulled up to the window and the questions began. On the surface, the questions could make for a friendly conversation, but the tone always makes you feel like you are being interrogated.

Border Dude: ID please. Where are you going.
Me: Hanson
Border Dude: Where?
Me: Nelson! Nelson - sorry about that...
(So now I just assume I seem suspicious because I don't appear to know where I'm going. Damn deer have scrambled my brain.)
Border Dude: Why are you going to Nelson.
(Notice I end that sentence with a period, not a question mark because none of the questions ever really come across like true questions.)
Me: To visit my friend Miles.
(Now up until this point, Miles is somewhat of an imaginary friend. He's real and all, I just haven't met him. I've read loads of his stuff, watched a few of his narrated power point presentations, emailed back and forth with him, and had conversations about him with other people in my research circle who know him and have a great deal of respect for his work. So I say "friend" to make the questioning easier.)
Border Dude: Does Miles have a last name.
Me: His last name is Parker.
(I successfully suppressed my snarky impulse to say "Last name? Of course not! He's just like Cher, Madonna, and Prince.")
Border Dude: How did you meet Miles Parker.
Me: On the Internet
(Border Dude raises an eyebrow.)
Me: But not like that! We do the same kind of research and he's going to help me finish my dissertation model.
Border Dude: What kind of research do you do.
(See now, this is problematic because he doesn't really care and what we do is "complex" and tedious to explain to someone who doesn't really care.)
Me: Agent-based modeling of infectious disease.
(I doubt he knows what I'm talking about, but like I said, he's not asking because he cares. He doesn't even try to add the intonation that indicates a question rather than a statement.)
Beyond that, he asked the typical questions: what are you transporting, are you leaving any gifts behind, where are you staying, for how long, do you have any firearms, dairy, meat, fresh fruit, etc. The whole process took a good 10 minutes and luckily I was practically chanting "I want my stamp, I want my stamp" over in over again in my head because in the end, I had to ask for a stamp in my passport. He put it on the page with my Vancouver stamp, and life was good.

I rolled out to find a herd of deer right around the corner. Someone needs to eat these guys. Seriously.

Most of the drive was pitch dark but I could tell there was still snow here and there. When I dropped down into Nelson, I pulled off at the Alpine Motel to call Sean to let him know I made it to town. I had told him I'd call him from the border, but I just wanted to part ways with Border Dude and keep driving. Sean helped me navigate to my final destination.

I was staying at the WhiteHouse Backpackers Lodge in a dorm room for $25 a night. I had called ahead to let them know that I'd arrive after 10:00PM and they left a note and a key in the mailbox for me. It's a good thing I called from Phoenix because I had made all of the arrangements online and they had booked me into one of the male dorm rooms. Apparently, my name is quite androgynous or perhaps even masculine because I'm often not automatically assume to be female based on my name. I'm actually quite thankful for that, but in this case, I'm glad things were clarified.

I was in room #2 which had two sets of bunk beds, an armoire with four compartments that could be locked, one end table per bunk bed, and a clip on light attached to each bed. A bright orange and red towel was waiting for me on my bed along with a note from the woman that runs the house. The bed above me was occupied, as was the top bunk across from me. The girl above woke up to say hello and tell me her name and her friend's name. Of course I can't remember either one of those names now, but they were young and very nice hippie girls. I was meeting Miles to start working on my model at 9:30 the next morning. After such a long day, I was asleep instantly.