Posts of The Secret Wine Shop Blog

Local Utilities Mapping Data Project

Last time I volunteered as a DataKind Visualization judge for a CivicData challenge. This time, I volunteered using an EMC Gives Back day off work, to figure out how to tag poles and create a map for my community utilities undergrounding project. The utility project was for Mendocino County, a remote location near the Pacific Ocean. The town I needed to map was not within any cell phone coverage. As a volunteer citizen with only a little bit of free time, I learned that having the right tools makes this kind of project easy and fun!

Prepared to Gather my Geodata
I already had a field geotagging device in my pocket - my smart phone! As long as you have allowed Location services, even without coverage from a cell phone provider, even when both Apple and Google map apps won't work anymore, your smart phone knows your location within 1-3 meters accuracy! Kind of scary, but proves useful for gathering data.

My first step was to decide what data I wanted to gather and put it in a survey form. The survey form would be deployed to a mobile device so I could record my data out in the field. Here is what I wanted to collect.
  • location name (I made up a short naming system before I left my house)
  • text description for notes
  • location (note: you don't have to worry how the app displays location, the app will convert to decimal and create kml (or kmz or gpx) file)
  • pole # if exists
  • pole owner (for this town either PG&E or AT&T)
  • photos (as many as you want) linked to that location

To the rescue came Open Data Kit! Open Data Kit was easy to use, a lot like creating forms in Google Drive. The xml file can be imported directly into the ODK mobile app using an external SD drive without having to publish it publicly through appengine. After you collect all your data on your smartphone, you can import the whole kml file directly into Google Earth and/or Google Fusion table, hosted in Google's cloud infrastructure. The benefit to putting your data in Google Fusion is it stays there in case your phone memory gets wiped (especially my iPhone gets wiped frequently) or you change computers and lose track of where you put the data. You can import Google Fusion table directly into Google Earth too. This also helps with reproducible results, you can just hand your data to someone else later and let them visualize it. I loved the ease of conducting a Geodata project using Open Data Kit! The only drawback is mobile deployment only works for Android users.

For iPhone users, I chose Motion-X GPS. It lets you record all the above data including linked photos. I also liked the feature that lets you give permission to view your location to someone you think will stay within wifi or service coverage, so they can see your blue dot moving around and be reassured even when you're out of calling range. The disadvantage for iPhone users, is they don't let you download the whole database, you have email yourself each point as a .gpx file, then upload each .gpx point directly into Google Earth, manually add the photos, save "My Place" as .kmz file, load the .kmz files into Google Earth (described next) and update your Google Code database from there). Whew, a lot more work for iPhone users than for Android users!

Gathered my Geodata - and found a mushroom!
The night before my field trip, I charged my smartphones, charged external battery (I'm using Anker), and made a few test geotags. I decided to try gathering data on both iPhone and Android to test out how the whole process works with either kind of phone.
  • GIS Stackexchange was good for random questions I still had, such as how to check a phone's GPS accuracy: if you see 6 decimal places listed, your phone is probably within the prerequisite 5 decimal places for 1-3 meter accuracy. Walk around and check that location readings change as expected. My location display had 6 digits.
  • Before leaving the house, pre-load the area where you know you'll be into Google Maps and iPhone apps. Map apps will not load in the field without cell phone coverage.
  • Optional: borrow a neighbor's dog (if you don't have your own) for field trip.
  • Now get out, enjoy nature and your day off. One place near a pole near a creek, I found a huge edible mushroom that I'd never seen before. I took it later to a local mushroom expert, Alison Gardner, author of Wild Mushroom Cookbook, which is how I found out it was a Western Giant Puffball or Calvatia booniana.

    Mapped my Geodata
    Because of the breadth of its maps from satellite to street view, I chose to use Google Earth. Here are a few tips I learned:
  • My Android ODK data was automatically uploaded to Google Fusion as well as I could download entire kml file at once. For iPhone Motion-X data, I had to transfer every single tagged location individually and upload one at a time to Google Earth.
  • kmz, kml, or gpx format stores location in decimal form, independent of how the app displays the location. I found it reassuring in my mobile apps to view angular notations with separate latitude in DD° MM' SS" N|S and longitude in DD°MM' SS" W|E. Save-as .kmz for internal working since it's more space-efficient. Save-as .kml for final maps to share since that's more standard format.
  • Because of the 1-3 meter inaccuracy, I needed to adjust the location slightly in Google Earth using visual cues. The most accurate is to use aerial view in Google Earth, looking straight down as perpendicular as you can. Use the photos you took from field with landmarks you can see from Google Earth to more precisely line up your tagged item. Use the "man" and Street View to also help verify.
  • To suppress text labels: In your left-hand menu, click a Place > right-click Properties > Style > Label set opacity to 0 (zero). Maybe you'll figure out a better way, but the "name" field turns automatically into a "label" and clutters up the look of the map unless you suppress it.
  • To link your own photos: In your left-hand menu, click a Place > right-click Properties > Add pictures you took of that location. What worked easiest for me: load all my images to Google Drive and use the Google Drive URL to link my photos per location.
  • I added layers to my Google Earth map. I asked the cartographer at Mendocino County Planning for .pdf property lines for the area. I also asked a few large property owners and the original "company town" owners for more details such as EPA hazard spots and underground water pipes. I followed these overlay instructions to add public record layers.
  • To add a custom legend, I followed the these legends instructions, required a small amount of kml editing.

  • Shared my Map
    The easiest is to share the .kml file with your public official with instructions how to download and use Google Earth, job done! Here are instructions I gave with my file and I got feedback (County Supervisor and PG&E manager) were able to see all the details.
      1. Download Google Earth
      2. Download the attached .kml file
      3. Open the .kml file using Google Earth - wait for Google Earth to finish its zooming
      4. Close the Start-up Tip window
      5. Use the +/- slider on right-hand-side to zoom in/out
      6. Double-click in the map on a pole you are interested in viewing
      7. You will be taken to street view. From here, you can zoom around street view to look at poles near roads up close
      8. If there is a picture attached, it will be linked as URL to pop-up info about the pole
      9. To go back to Google Earth, click "Exit Street View" in box on top right

    Almost done. PG&E and AT&T back office required autocad format, not modern kml. To convert kml to dxf I used Google App Engine KML Tools. I don't own autocad so I couldn't view it. The County told me I saved them $70K, which is what they paid the last mapping company to create the last autocad maps for them. So with 1 day off work, I saved my County both money and time!

    Strangely, Google's efforts to make maps more social means I now can't share this map with general public. A few months ago, I was able to go through 7-step contortion to create a "Classic Map". But now I can only create maps using "new Google maps engine lite". So for now, this is the only part of my volunteer mission that failed. But everything else worked!

    Analyzing data

    Given I'm a data analyst by profession, it's time for me to post what I do for my day job. Most of my work is corporate, so unfortunately can't share those analyses here. But here's something I did in my free time, spent a few hours looking at the city of San Francisco's public data on From that website, I grabbed all the San Francisco Police Department historical incident records, 2003-2012, and loaded the .csv files into R and Tableau. The raw data are logged police "incidents" or reported crimes, tagged by geo-location (cross-streets in neighborhoods but not specific addresses), time of day, category of crime, description, and resolution status. What I discovered could be titled "San Francisco Crime: urban myth vs. reality".

    The first urban myth, one I've heard at Silicon Valley parties, is that "prostitution is a big problem in San Francisco". Actually it's not. Looking at crimes by category city-wide, year after year, the most common crimes are "Larceny" i.e. theft, "non-criminal", "other", and "assault". Prostitution isn't even in the top 20 crime categories by frequency. Year over year, larceny remains the most frequent crime. Vehicle theft dropped from 3rd most frequent crime category back in 2003 to barely in the top 10 now. Overall crime has trended down (approx 3%/year). Diving in deeper, we see that the top crime months tend to be January, March, August and October. Also, top crime days of the week are Fridays and Wednesdays.

    Another urban myth I've heard is that "homicide happens more often wee hours night and morning than when regular people are out". Untrue. Again, the data shows homicide happens all hours, especially 11am and early evenings 6-8pm. It almost looks like murder happens the most just before lunch and dinner! Here I've downloaded homicide incidents from the entire Bay Area (including Oakland) for the last 6 months.

    What about neighborhoods, you ask? Now it seems, some rumours you hear are true. While city-wide larceny is the main crime, once we delve into neighborhoods, we see distinct crime personalities. Most dramatic is the high proportion of "drug" crimes in the Tenderloin. Carjacking is high proportionally in Ingleside. But the Rincon Tower of crime here is larceny (or theft) in South of Market. There's almost twice as much theft happening in the Southern Police District (which includes the Ferry Building, Giants Ballpark, Caltrain station, and Folsom/11th night club area) compared to any other neighborhoods. While BayView, the notoriously "bad gangs" neighborhood, has almost as much violent crime (e.g. assault) as larceny, the astute eye will see that Mission and Southern have, by quantity, actually more assault than Bayview. The chart below is split into upper - crime category profiles per neighborhood over all years, and lower - per year frequencies of crimes per neighborhood. Overall Southern has stood tall in larceny all this time; while drugs in the 'loin peaked around 2008. It should be noted that police reporting districts are close but don't exactly correspond to the common names for local neighborhoods.

    Southern has the most crime, closely followed by the Mission, but the Tenderloin followed by Mission have the highest resolution rates. This means if you report a crime in the Mission you are more likely to get a police resolution than if you report a crime in Richmond, for example. Maybe because drug incidents are more easily "booked" and resolved than other types of crimes?

    Next, what's interesting is to look at correlations between types of crime. In the chart below, the size and darkness of the circles indicate high positive correlation, meaning those two crimes tend to happen together at the same times and places. Size and redness of the circles indicate high negative correlation, meaning they usually didn't happen at the same time or place. In the graphic below, the darkest biggest circles are on the diagonal since anything has correlation=1 with itself. The graph is symmetric, so you only need to look above or below the diagonal. Kidnapping and weapons appear highly correlated. Maybe that's expected? How about recovered vehicle with weapons and arson? Does it make sense that drugs are negatively correlated to runaways and vehicle theft? Maybe that's because runaways and car thieves don't go to the Tenderloin? Prostitution and Pornography appear to be focused, connected crimes. "Forcible sex" i.e. rape is correlated with assault, robbery, kidnapping, stolen property and trespass. Some crimes seem more broadly correlated with lots of other crimes. It's important to remember at this point that correlation has nothing to do with causation.

    The next thing to do is plot crimes city-wide by time of day. This should show us crimes that are closely related by frequency and time but not necessarily location. We'd expect to see crimes that could travel show up here. Indeed paired crimes "warrants and drugs" that we saw in the correlations graph jump out again here. "Larceny and vehicle theft" is a pair we didn't see earlier though.

    One visualization trick I've learned is to make a grid of pairwise X-Y line charts and look for straight lines - those are suspected fruitful regression variables. Looking at the grid of pairs, we can pick out the pairs "warrants and drugs" and "larceny and cartheft" like we found above. In addition, "larceny" and "warrants" look the most related to the most number of other crimes. Running step-wise regression on this dataset would be the best way to pick out even deeper patterns that our naked eyes can't see.

    The next step would be to take some of these findings to the Police Department, and find out what the field experts say, and whether knowing such things could help guide the police where to focus their presence?

    Next step beyond that, is find out how does San Francisco crime profile compare to other large cities? I suspect there will be overall trends in common as well as distinct differences city-by-city as we saw neighborhood-by-neighborhood.

    Local Wine Country Itineraries

    Where should I go in wine country? That is one of the most common questions I get (the 2nd most-asked question is what wine should I pair with [x] dish?) Following are some Google Map itineraries I've made for visiting wine country.





    Mary Elke Vineyards in Anderson Valley

    Harvest 2011.  It's early morning and I'm driving from San Francisco, across the foggy Golden Gate bridge, north on hwy 101.  After Hopland, I hang a left at hwy 128.  Headlights are on because of the fog.  The drive takes about an hour just on the narrow twisting part of hwy 128. This feels like a different world.  A secret back country.  Tree-studded mountains embrace the valley.  Little creeks criss-cross and join the Navarro River that burgeons to the Pacific Ocean.  At Boonville, I make a few wrong turns and every time I get curious looks from locals trying to assess my intentions.  It's a rural valley and outsiders are not insiders. I eventually pull into Elke's Donnelly Creek Vineyard where the deeper into the vineyard I go, the darker the shade of red the rich earth becomes.

    The historic Donnelly Creek Vineyard is on elevated sandy loam benchland with a perfectly sloped and well drained Southwest exposure.  It's fruit is sought by Mumm Napa, Roederer Estate, Radio Coteau, Copain Wine Cellars, Londer Vineyards, Au Bon Climate, Mendocino Wine Company, Far Niente, ICI/La Bas, Franciscan, Goldeneye (part of Duckhorn), and Breggo Cellars.

    The fog is lifting now.  Mary greets me and digs her toe into the dirt to show me the large round stones that are everywhere. The vineyard is planted to Chardonnay, Pinot Gris, and Pinot Noir.  The Pinot Noir is Pommard 5, Dijon 113, Dijon 115, a field selection called the "Elliott", and another called the "Stang" ("selection massales" or field selections are colloquially called "clones" but there is a difference).  The Elliott clone is an old heritage vine from Napa Valley named after its grower; it has similar traits to the Martini clone.  Most Pinot Noirs are a blend of Dijon/Pommard clones from France.  The Stang and Elliott clones are what give the Elke Pinot Noirs their distinctive nose.  The Elke "Blue Diamond" Pinot Noir is a blend of 50% Pommard 5, 25% Stang and 25% Elliot (same blend for the last 15 years!).   Mary is proud of and responsible for both the Stang and Elliot clones grown only here, as far as anyone knows right now.

    The vines are cane-pruned to four positions, 4 spurs and 2 canes (except the Pinot Gris which is cordon-trained). The whole Elke family used to live on the property when it was an apple orchard that Mary converted to an organic orchard before planting it to grapes.  Today, three of her employees and their families live on-site, so she keeps the vineyards and property as free of chemicals as possible.  While I'm there, fat happy chickens run around scratching between the vines, testament to a good ecosystem.

    The Elke approach to winemaking is to keep it as natural and simple as possible. The winery consists of a small red shack without climate control and an outdoor concrete pad with an overhanging roof.  The interior of the red shack doubles as the tasting room and cellar.  A young winemaker from New Zealand, Matthew Evans, has been making Elke wines since the 2010 vintage.  His name serendipitously is the same as Mary's son's.

    The grapes are hand sorted and destemmed into fermentation vats where minimal sulphites are added.  A specific strain of yeast isolated in Burgundy is added.  Punchdown frequencies follow heat temperatures - more punchdowns when the temperature is hot and fermentation is active (maybe 3x/day), fewer at lower temps (maybe 1x/day).  Since gentle extraction is important, all punchdowns are done by hand.  Once fermentation is complete, the must is pressed in a manually operated wooden basket press directly into 30% new french oak barrels where malolactic conversion happens.  Aged about 16 months in barrel, handling is kept to a minimum, ideally no racking until bottling, which is the "burgundian" reductive technique. 

    Mary Elke is a hands-on grower, winery owner, business woman and seems like everyone's mother. Jesus, her vineyard foreman, has been with her from the beginning and takes care of the vineyard as if it were his own. She met him when he was harvesting apples at age 21. Now he is over 50 and his two children come to lend a hand during grape crush. In 1990 when Mary heard the Stanford graduate housing trailers were going to be moved, she rallied to have them brought to Anderson Valley, which is remote, and before then had very few places to stay. Now harvest workers at Roederrer, Scharffenberger, Navarro and even I have a place to stay thanks to Mary.

    Elke wines are extremely food friendly.  The Pinot Gris is a dry style I pair with citrus salad.  The Rose of Pinot Noir is also dry and perfect with light meats.  The sparkling brut is ever so slightly sweetly orange blossom flavored, I paired it with pumpkin apple soup.  I had the Pinot Noirs with Thanksgiving Dinner turkey and fixings.  The winery is closed during Winter, but here's some sugestions for your next trip to Anderson Valley and Elke Vineyards.

    the "Mitochondrial Eve" of Zinfandel?

    Breaking news in ampelography (the study of grape genetic origins and classifications): a new "Eve" of Zinfandel has been discovered! A Tribidrag leaf (existing only as a dried herbarium specimen in the Natural History Museum in Split, Croatia) also known as Pribidrag, is now identified as Crljenak Kastelanski (i.e. in Croation "the black grape of Kastel"). Historical documents trace the cultivation of Tribidrag in Croatia back to the beginning of the 15th century. See

    Tribidrag supposedly comes from the Greek and means 'early grape' or 'July grape'. The Italian name 'Primitivo' also refers to its earliness relative to other grapes in the region. As I understand it, we have Tribidrag & Pribidrag now as the earliest synonyms for Italian Primitivo which is also a synonym for American Zinfandel. Plavac Mali is the result of crossing offspring of crossing Zinfandel and Dobricic, another Croatian variety.

    In 2001, Carole Meredith published (together with Univ. of Zagreb collaborators Ivan Pejic and Edi Maletic) the finding that Crljenak Kastelanski is what we Americans call Zinfandel. See > and > An interesting "insider note" from Carole Meredith about the usefulness of dried herbarium speciments on "Yes, the Tribidrag DNA was extracted from the leaves of an herbarium specimen in the Natural History Museum in Split, Croatia. Herbarium specimens are representative examples of a particular plant that have been pressed and dried. They are quite dead. Dried leaf tissue can be a great source of high quality DNA. When my lab was analyzing grape varieties from other countries, we couldn't use fresh samples because the USDA plant quarantine regulations prohibit the importation of living grapevine tissue unless it goes through a quarantine station for disease testing. That takes 2 years! So we figured out how to chemically dry leaf samples using anhydrous calcium chloride. This was quite legal since the leaf tissue was no longer living. But the DNA was very well preserved."

    In order to keep up with the times, I've added 2 new rows to my own grape varietals database: one for Tribidrag and another for Pribidrag linking them to Crljenak Kastelanski. The synonym Kratosija which was previously attached to Primitivo is now attached to Crljenak Kastelanski.

    Please let me know if you hear of any other grape varieties I've missed, I would welcome the news!

    Robert Biale Winery in Napa - Part I

    Recently I was lucky to be invited to the Robert Biale winery in Napa. Robert Biale makes year after year one of the most sought after by collectors cult Zinfandel blends, called the Black Chicken. The Black Chicken began in the 1940's as a bootleg wine by 14-year old Aldo Biale and his mother, just after Aldo's father died, they needed money to keep the farm going. They kept the Zinfandel bottles hidden behind stacks of wooden picking boxes and people came by to buy codeword "black chicken". Funny thing was, the Biales only had white chickens at the time. Aldo Biale passed away recently, late 2009, but left behind his vineyard, equipment, and old wisdom.  You can still sometimes see his widow Clementine at the winery, and Aldo's son Robert Biale, who tends to the vines and is the current President of ZAP. Besides high quality Zinfandels, Biale also makes high quality Syrahs and Petite Sirahs.

    The day of my visit, our goal was to blend 150 barrels of 2010 vintage wine into the 2010 Black Chicken. The barrels had already been taken down from the stacks and spread out on the winery floor on 2x2 racks. Our first job was to taste each barrel, rinsing the thief (pipette used to draw out a wine sample) between barrels using grain alcohol, one of the best sanitizers available in a winery.

    One single bad barrel could ruin the whole lot! At stake is the livelihood of 15 different local grape-growing families whose grapes are represented in those barrels. We were looking for barrels that either were obviously bad (tasted like vinegar or sauerkraut or gym socks) or those that just didn't taste "right". The latter is very subtle. It could be that the aromas or wine taste flat, just not as good as they should. For each barrel, we took note of the barrel maker, year the barrel was made, vineyard source of grapes and how that barrel tasted.

    I learned that in a true blend, complexity comes from not only choosing different varietal grapes from different vineyards but also mixing barrels from different makers and years. The oldest barrels on the floor dated back to 2002, the newest ones were from 2010, with the vast majority on the neutral older side (~80% old neutral wood). I started noticing the different barrel flavor profiles. I took note that I particularly loved the aromas & flavors coming from old Francois Frères barrels and from younger barrels of a brand that looked like "MV" (but later learned was "MU" for Marieu, pic of 2008 barrel below).

    Our approach to blending was to separate the entire lot into 3 groups, each representing a different "terroir" and therefore different flavor profile. Group 1 was the field blends which almost by definition come from old vines. Group 2 was old vine Zinfandel from the original Aldo's vineyard. Group 3 included Zinfandel, Primitivo, and Petite Sirah from the "home ranch" in Oak Knoll District. For barrels in each group, we were tasting for "unique expression of terroir". We representatively sampled from each group, then the "all-in" all 3 groups together. From there, we tried altering more/less of a particular group. To simulate adding 1 barrel from a new (to Robert Biale) Mt. Veeder Zin vineyard we had to go down to just droplets for our 50ml sample.

    Steve Hall, winemaker at Robert Biale

    Blending is the art of focused sensory perception and expression. Supposedly the average human can detect 300 different aromas. Smell is one of those senses that is directly stored in the brain as a memory. So as we smell, we directly recall to mind certain memory associations. The act of blending means smelling, concentrating on what you can remember, and then vocalizing that memory. As we blended and smelled and tasted, we each talked non-stop, forming our impression of each blend as we talked and putting into words what we smelled. Steve Hall, the winemaker at Robert Biale, has a concept in mind, what he wants the Black Chicken to be. He described it to me as light like a feather while deep & dark, tension between rich booming low and high notes, a wine full of life, images of contraband and mystery. What we did was a sort of pattern-matching. We vocalized what we perceived in a blend and then tried to find the closest match of our description of that blend to Steve's original description of what the Black Chicken should be. The blending process took 1.5 days; in the end we reached the 2010 Black Chicken "recipe". It's an ecstatic blend, and I can't wait to taste the finished product in the bottle! But for that I've got to wait until Winter 2012.

    Secret Dreams of a Cyber Girl

    These ghoulish devils are turning people into empty hulls. They ask to draw your portrait, then they draw an abstract-looking rendering. Some others have a type of x-ray machine & they'll photograph right through your body. Either way, they end up possessing a map of your core data. They give you a copy, posing as one of the hordes of newly appearing street artists, but keep an image for themselves. Collaboratively they're building up a library of images of each one of us. Later, they have only to see you on the street, in the super market, sitting at a cafe, in your own bed dreaming, somewhere where you're unconscious is as strong as your conscious, and they'll snap another x-ray of you or dab another color on their existing painting finishing sufficiently their information model of you. That night, their victim will mysteriously die of a heart attack or some other unexplainable internal death.

    I am a French Bridgette Bardot, lithe & brunette. My attacker looks like a Matthew Barney main character from Cremaster Cycle. Lots of people I know around me have already died. I'm still alive, I think it's through my willpower, I feel internally strong. Whenever I feel the ghoul trying to get a clear picture of my internal organs, I steel myself & make myself hate and want my attacker dead. I'm planning an elaborate wedding with painted rivers as backdrop. The ghoul is planning to come to my wedding and photograph me so that he can color match the paint he's already chosen in his portrait of my soul, and then I would finally die with my guard down. So far, I've kept the wedding location a secret.

    # syllables used to describe wine is inversely proportional to the value of the wine

    After Monday night's Muscardini Cellars tasting at the Secret Wine Shop, one reviewer left me this sheet of paper, which I found fascinating. According to this wine reviewer's self-referential definition of good value wines, Muscardini Cellars wines are good value since the reviewer gave very short word descriptions of the wines: "good nose", "tannin & struct", "balance", "best, yummy".

    Last Monday, 20 people showed up to taste 6 different Michael Muscardini wines. Of the 20 people, 12 filled out their reviews and favorite rankings sheets.

    Lesson #1 about tastings is when you greet people, get them to sign your signup sheet, then hand them a score sheet & ask them to score the wines & give you any comments. That way you'll get more ratings results and handwriting clues if you need them.

    The results: 2008 Barbera won people's favorite wine 5 times! The 2009 barrel sample Zinfandel won 4 times. 2009 "Tesoro" won 2 x. The 2008 Sangiovese won 2 x. The 2009 Rosato won 1 x. One person voted a tie for favorite wine between the '08 Barbera, '09 Tesoro and '09 Zinfandel.

    With this tasting, I paired a very smoky sausage with the 2008 Barbera. Everyone, except 1 person, said they loved the sausage with the wine. Interestingly the 2008 Barbera won this tasting as most people's favorite wine of the evening; usually it's the Zin that wins.

    Lesson #2 about tastings is food can make a big difference in how people perceive & rate a wine. Don't worry about getting the pairing perfect for everyone. Pairing is a matter of personal taste, so not everyone is going to love your choice but more people will love the wine.