Friday, April 29, 2011

Memories: When the Soviets tried to recruit me to be a spy

Dan Morrill on the Android team reminded me today of a story I told him awhile back that is worth sharing.

In 1989 I was on my junior year abroad, in Budapest Hungary. Nice random chance. I had gone into the education abroad program at UCSD and told them "I need to get out of the country!" and they obliged. When I'd applied, it was 1988 and there was maybe some interesting stuff going on in Poland with Solidarity, but no one knew what was coming. I arrived in August of 1989, and a week later the Hungarian government opened the borders, allowing East Germans to leave to Austria. At the time, this was hugely momentous. East Germany and Hungary were part of the Warsaw Pact, an alliance of Soviet backed Socialist states run by the Communist parties and mostly dictated to by Moscow. Travel between those countries was permitted but travel to the West was severely restricted. East Germany (officially known at the time as the Germany Democratic Republic, or it's German abbreviation "DDR") cut off travel to Hungary, but the chain of events that had started (arguably) with the Solidarity strikes in Poland started to cascade. The end result was a very different Europe. But no one knew that at the time.

In fact, I didn't find out about the Hungarian government opening the border for a week. There were few English language news sources at the time (remember, no public Internet) and the faculty of Karl Marx University of Economics, where my program was situated, didn't bother to tell us, perhaps a little scared about what was going on.

Anyway, I was studying to be a historian at the time and historic things were happening so I was in heaven. My mother was a peace activist, and decided to go to Moscow to do work there. She was also an artist and had no real concept of dealing with bureaucratic institutions. She wanted me to visit her for Christmas in Moscow, and since I was in Budapest I thought why not? But to go, I needed an invitation to get a visa. Not an easy process. BTW, still not an easy process. So I asked her to get me an invitation.

My mother responded by saying "I invite you". I told her I needed something written, and she sent me a telegram that went something like this "Here's your invitation. I don't understand why you need this. Seems like you just don't want to spend Christmas with your mother." I may be mis-remembering that last sentence.

Sighing in frustration, and realizing I wasn't going to get anything better out of her, I showed up at the Soviet consulate. Now most embassies have nice neat orderly lines that move people through the place. The Soviet consulate in Budapest, at the time a part of the Soviet embassy, a huge concrete monstrosity, ran things differently. They let people crowd around and push their way to the front of the line. Being a shy retiring type at the time (unlike now) it took me an hour to get to a window. I tried to communicate to the official who just stared at me, and then turned and summoned someone who could speak to me in English. He frowned at me, looked at my passport, this young idealistic many trying to get a visa, glanced at the telegram dismissively, and said only "You come back tomorrow, 12:00".

Dutifully and full of dread, I came back at 12:00 the next day. "Sasha" grilled me for two hours at his desk. What did my father do (episcopal minister, deceased) ? What did my grandfather do (stockbroker)? Why was my mother in Moscow (peace work with the Peace Committee, a known KGB front organization)? What was I studying (History, very interested in Eastern Europe)? Where did I grow up (Berkeley, at the time home of radicalism and Marxism in the US)? Would I like to learn more about the Soviet Union (oh yes of course? and the kicker Would I like to study Russian with his daughter, trade language lessons (Oh yes, of course, sounds great)?

At the time I wasn't a Quaker, so a little lying and stretching the truth wasn't beyond me. He seemed satisfied, and pulled out a ticket, he actually paid for my train ticket to Moscow. How exciting! At the time your ticket came with a separate seating assignment. He gave me the top bunk in a sleeping car. Wow, how generous, thank you! Afterwards I learned that the ticket was about $7 or something, depending on whether you exchanged money officially or on the black market.

So the day finally came, and I get on the train. Top bunk, all the way to Moscow, more than a day of travel. In my mind I remember it as 36 hours, but I'm not sure now. While I was boarding the train, a revolt broke out in Romania. By the time I got off the train Ceauşescu, the communist dictator was arrested. He was executed a couple days later. I'm against the death penalty in general, but I certainly didn't mourn his death.

But I didn't find out about the arrest because I was on the train. No phones or Internet in those days, and no one announcing what was happening. And I was the only American in my car, as far as I could tell. My grand mother had sent me a big box of candy, and I learned the value of american candy, so I shared them with those in my cabin. There were six people in my cabin and lo and behold in the bunk across from me there was this beautiful Russian woman who spoke English with just a slight and endearing accent. She engaged me in constant delightful conversation. Turns out her father worked at the embassy, what a coincidence! Now you have to understand that this sort of thing never happens to me. So a clever man of the times, with a slight paranoid bent, I easily put together what was happening. When she gave me her number in Moscow as we got off the train, I wasn't surprised. I never called of course. My mother had her own KGB handler, and I'm sure everything was bugged in my mother's apartment. That's not paranoia, that's just how it was back then.

"Sasha", btw a very common Russian name, short of Aleksandr, wasn't at the embassy when I went back. He had asked me to "report" on what I saw in Moscow. I thought I'd be dutiful about that, thankful for the ticket, and then just not follow-up. But he wasn't there and the embassy staff acted as if they had never heard of anyone named Sasha and it was strange that I would ask and would I please go away. Sorry Sasha, you failed to recruit a spy, but thanks for the ticket!

Thursday, March 31, 2011

NoGIS: Round Two of Neo vs. Paleo Geography?

Can't we all just get along?

I started, apparently, a few days ago with the posting of NoGIS Meetup, and the subsequent blog post, "What Does NoGIS Mean?" by Sean Gorman on the GeoIQ blog. Among other things, Sean said

"For decades, location and geography have been their own special niche, served by GIS technology from a fairly small number of vendors.  As many have pointed out “spatial is no longer special” and as a result location is quickly becoming a feature of many technologies.  As location base apps become ubiquitous the characteristics of geographic data are changing as well.  The data of this new paradigm does not look like the static parcel data, which is stereotypical of much traditional GIS work.  As we saw in the NoSQL characteristics data is now high volume, dynamic and users/developers want to see/query it in real time."


And the usual statement by neogeographers (in one of the comments)


"I’m not inferring that GIS and NoGIS are mutually exclusive..."


James Fee, traditional defender of the Paleo...OK, that's a bit much but let's say a frequent defender of all things Paleo responded in his blog post:



As with anything, everyone is quick to say we’ve all been doing this since the 1960′s so ignore it and move on unless you’ve got one of the following to accomplish:

And then goes on to list the geography industry's equivalent of hipster evils.

And I thought that the Neogeography vs. Paleogeography wars were largely over and we were all getting along. But perhaps it was just a Christmas ceasefire.

That said, I'll be at the NoGIS workshop, should be interesting. No one ever said geographers were boring. Oh, wait, many people have. But they are, of course, wrong.

Tuesday, March 29, 2011

My Slides for CalGIS: What you should be asking us The future of geography, and the hard - and easy - questions that follow

I do a lot of talking in my job. This quarter, January 1-March 31st, by the end of the quarter I'll have given 19 different talks at 16 different events. Many of the talks are the same or similar, targeted to a specific audience but conveying some of the same essentials in terms of content. That's because I'm doing the "spreading the word" part of my job, telling people about new technologies.


Sometimes, though, I like to do new things. I was invited to do a keynote at CalGIS's conference, and decided to write an abstract that was different from what I've been doing, so that I could explore different themes. I talked for the first time in a public talk about Google's on-going work on the Japan Crisis, and how cloud providers can help maintain a web presence for public service agencies - most of the participants were from government agencies - and related topics. I think the slides convey more of a "of course you should go with a cloud provider" then I actually presented, but most of what I was trying to convey was that these are hard choices and here's a place to start.


BTW, I hate the word cloud in this context. It's so market-y. Anyone have recommendations for a real replacement?


Sunday, March 27, 2011

Recent Slides

By the end of March, I'll have done 19 talks this year, at 16 different events. It's been a busy quarter. I'm not going to put all 19 sets of slides in here. Some of them had a lot of similarity. So I thought I'd post a couple of representative ones.

I did a talk on March 1st at the North Capital Area GTUG, at the Google DC office, on Fusion Tables. This was the culmination of a US East Coast tour that took me to College Park Maryland, Boston, and DC. It was video taped, but unfortunately the tape hasn't been digitized yet, I'll post that when I get it.


In Tokyo, at that Yahoo! Japan Geolocation conference, I gave a talk on Fusion Tables and mapping in the cloud.


I then went on to give talks at the Tokyo and Kyoto GTUGs. Here's the slides from Kyoto, largely the same as the Tokyo ones.

Wednesday, March 16, 2011

Tragedy in Japan and how to help

Like everyone, I am horrified by the loss of life and homes in the recent devastation in Japan. The scale is enormous, and as we hear more about it, many of us feel hopeless to help and scared about what it means for the future. Aftershocks and worries about radiation are all over the news, along with calls for donations, and occasional worries about scams, people promising to help, but taking money anyway.

At the same time, I am consistently impressed by the people who jumped in to help. From the first responders, the military, to the nuclear workers working day and night to prevent greater tragedy. There are people on the ground in Japan doing great work, mapping transportation routes, helping people find loved ones, providing food and shelter.
The Google Crisis Response team has been putting together many of these resources here: http://www.google.com/crisisresponse/japanquake2011.html, including ways for people to donate money, maps of the situation, and links to the Japan Person Finder app.

The Humanitarian OSM Team is also on the ground, with more information here: http://openstreetmap.jp/crisis/ about how to help with their mapping efforts.

Millions have already been donated. Millions more will be needed. Please help out now. If you want to know more about what Google is doing, follow @earthoutreach on twitter.

If you have other creative ways to contribute, please feel free to leave them in the comments.

Thursday, March 10, 2011

Ruminations on Place

Sunday, I was on a panel with Steve Chase, Hurricane Chase, and Murata Takehiko at the Yahoo! Japan Geolocation Conference (#geoconf). Yahoo! Japan (a distinct entity from Yahoo! Inc. btw), put on an excellent conference, and had announced that they would be contributing data to Open Street Map, in a similar fashion to Bing and MapQuest. There was a lot of excitement in the room, with many OSM participants present (by design I imagine). And there were inevitable questions about Google's future involvement in the project - something I'm interested in personally but can make no commitment to on behalf of Google of course. But more importantly, to this blog post at least, a question came up about whether Google would contribute Street View imagery to OSM, and whether there were any OSM related projects developing open versions of Street View. As a panelist, and someone who can't avoid talking, because I'm just that way, I had to answer of course. My answer went something like this, speaking as myself not foreshadowing a future Google product:

I don't think in the future, Google should have to be driving all the streets in the world. Ideally, we will move toward a time in which everyone is providing data about the world in open formats, in ways that are search-able and crawl-able. What makes Street View so compelling, I think, is that it gives us a sense of place, a sense of the essence, be being-ness of the location we're looking at. And in fact, in places where we don't drive cars, you can still see geolocated photos. Look at Moscow, for instance, with Pegman selected. There are photos all over. Ideally, this is something self-perpetuating, something people want to open up.

That got me to thinking, especially after reading Ed Parson's recent post about a 1930's video of Teddition. He, and the commenters, talks about what can be seen there, and what has stayed the same. Ed ends with this statement:

"We are lucky to have rare video like this for it’s completeness but at the same time it’s disappointing that for future generations Google Street View which could offer a similar resouce has had to be mutilated to accomodate privacy concerns."

Indeed, there is something we miss out on. I am not arguing for doing away with privacy, I'm just ruminating here on pictures and meaning. The word "place" has many meanings in English, but they are interrelated. The reason satellite imagery, and particularly street view imagery is so compelling is that it relates something that standard maps can't, a sense of the place or essence of a location. And that place-ness, that sense that is tied to location, time, people, trees, buildings, smell, sounds, all of that is incredibly powerful, and I think Street View is only starting to touch on what that means to people.

I've been in Japan this last week, and at two GTUG meetings, I did demonstrations of custom Street View. In particular, people were interested in this simple holiday greeting from Digitas. In it, the developers added some panoramas to their Street View application through the API, which of course anyone could do. The panoramas lead off street into the digitas office where employees hold up signs and there are thought and word bubbles around them. This conveys a sense of the place, a sense of celebration and fun and associates it with Digitas. I hope it really is that fun to work there, they seem like really nice folks in the picture!

The point I'm trying to make is that by this simple set of panoramas and a few lines of code, they were able to extend the sense of place that is the city around them, and change it to create a view of the place that is their company.

I know there are lots of academic writings on this subject, but frankly since 1994 I get bored when post-modernism or marxist dialectics get mentioned, so my forays into those studies have been unsuccessful at moving me. I read the works of China Meivelle, or Armistead Maupin instead, each of whom conveys vividly this sense of place

Today, like most days I have free in cities not my own, I walked. I walked around Kyoto. Not to find temples or castles, but to find that sense of place. I walked around, a lot, often going back over the same streets, visiting occasionally the same shops. I tried my extremely limited Japanese, and people graciously helped me out. I walked not just the big streets, but the small ones, gathering into myself my own impressions, my own sense of Kyoto-ness. Of course, this is very different from living here, what the place is like, and especially different from being a native. I tried to take pictures (posting them later) that captured this sense. How will technology solve this? Street View, satellite imagery, they are a start, but I believe augmented reality applications are going to be the best bet for capturing the "-ness" of a place. And I believe at some point, most of us will be involved in that capturing. The popularity of check-in applications, the rise of geotagged photos and videos, providing reviews, Foodspotting, and more are already starting it. It's only been 6 years since Google Earth and the Maps API came out, I wonder what we're going to see in another 6 years.

Friday, March 4, 2011

Private Tables in Fusion Tables: Better privacy for your data

Back in June, I wrote about "Techniques for protecting your data." Yesterday, Google announced another way to protect your data, Protected Map Layers.

Protected map layers, a part of the Google Maps API Premier package, allow you to create a data table in Google Fusion Tables and keep that table private. Maps API Free allows you to use only tables marked Public. Protected map layers are rendered as clickable rasters. You still have to be careful what data you put into the infowindow, make sure it's only what you want public.

Of course, Maps API Premier also allows you to make maps that are password protected, so this will be really useful for enterprises that want to keep their data entirely private but still take advantage of the performance improvements and spatial queries that are allowed by using a FusionTableLayer.

Wednesday, February 9, 2011

JSON in KML Templates

Since Google Earth 5.0, the description balloon has handled pretty close to full JavaScript. There's some interesting things you can do with this. In this example, I'm showing a very basic use of JSON using KML balloon templates.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Style id="testStyle">
      <BalloonStyle>
        <text><![CDATA[
          <script type="text/javascript">
             function loadData(){
               var foo = $[foo];
               var myObj = foo.myData[1].value;
               document.getElementById("example").innerHTML = myObj;
             }
           </script>
           <body onload="loadData()">
             <div id="example">test</div>
           </body>
          ]]>
        </text>
      </BalloonStyle>
    </Style>
    <Placemark>
      <styleUrl>#testStyle</styleUrl>
      <ExtendedData>
        <Data name="foo"><value>{"myData":[
          {"value":"1"},{"value":"50"}]
          }</value></Data>
        <Data name = "bar"><value>23094</value></Data>
      </ExtendedData>
      <Point>
        <coordinates>0,0</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>

Balloon templates are designed to allow you to use a single <Style> element for all or a set of your <Placemark;gt; elements, and then just insert <Feature> specific data into the template. Named <Data> elements inside a <ExtendedData> element provide name/value pairs. However, this can be a little flat. You can put JSON elements inside the <value> element (a child of <Data>, which gives you a lot more flexibility.

The good folks at Secorra provide ObsKML, an ocean observations format, using this technique.

Saturday, January 29, 2011

Interactivity with FusionTableLayer and mouse clicks

The FusionTablesLayer in the Google Maps API is a bit of a black box. Fusion Tables generates a clickable tile overlay to use place in your Maps API application, but you don't get direct to change anything. If you want to change data, you have to do server side calls. However, the FusionTablesLayer does give you access to row data on click, which allows you to do interesting things server side.


In my sample interactiveftlayer, I use a Fusion Table of Google's corporate addresses. The table has a simple Color column, with values of 0 or 1. In the Fusion Tables map visualization for the table, I configured the Marker Icon such that values of 0 are green, and 1 are blue. The color means nothing of course about the actual office.


In interactiveftlayer, I suppress the InfoWindow by adding a suppressInfoWindows: true option to the layer initialization. I then add an event listener to the layer that captures the click event on the layer. This gives me row information about the feature clicked. I then send a XMLHttpRequest to the server (in this case App Engine) with the other color (1 if the color is 0, 0 if it is 1). After the response from the XMLHttpRequest, I reload the layer.


There's one tricky part, and hopefully we can find a way to improve this on the Maps API end. The FusionTableLayer is cached by the browser. Which means that even if the data has changed, the layer stays the same, at least at zoom levels visited while it was visible. This includes, BTW, not only the images but the row data associated with them. In order to defeat that caching, I append a Where parameter to the layer selecting for a Id greater than a random number from -1000 to 0. Since I know all Ids are greater than 0, I can do this. I'm not proud of that strategy, but it works.

Tuesday, January 25, 2011

Two Thumbed Closure Slider for Time Slider

I've posted a couple of times about sliders - Playing with Closure UI Library: Slider and a basic Basic Time Slider in Closure. My final slider example uses the same data set as the last, and incorporates a Two Thumb slider, meaning you can use the slider to set a range of values, not just a less-than or greater-than value. I also corrected something that impacted performance in the last sample, that is I checked whether the query changed by the different events, and change the query on the map layer when the query changes from the last. This is an artifact of the events that I'm listening form, MOUSEUP, MOUSEOUT, and KEYUP. You may remember in the first sample, I realized that firing off a query change whenever the slider had a CHANGE caused too many queries to hit the overlay server, causing the Map to show the missing overlay error. Listening for mouse and key events caused fewer events to fire, but still more than one per change. The change simply tests to see if the new query is different from the old query, and only re-query the layer server if the query changes.