Fun With Google Maps – Solar Panel Edition

I love poking around Google Maps – there are so many unexpected things you can find that are obvious from a top-down view, but are so hard to see at a ground-level view.

I was looking at a Google Maps of the Epcot theme park in Disney World, Florida. Do you see any interesting shape in the screenshot below?

Map of Epcot, located in Disney World, Florida. Includes surroundings of Epcot.

There’s a hidden Mickey in the top left hand corner! The three black circles are arranged into the shape of Mickey Mouse’s head! See the screenshot below for detail:

Google Maps picture of solar panels forming the head of Mickey Mouse.

If you zoom in enough on Google Maps, you’ll notice that this is actually an array of solar panels, generating electricity to feed the Disney theme parks. Notice that there seems to be a dirt access road to the panels and a fence around the entire array. As I said before: this solar panel array would be difficult to see in person, much less the general shape of it; but with Google Maps, the difficult becomes so obvious!

Firestore Add Document – Python

A simple example of adding a document to the Firestore:

    from google.cloud import firestore
    
    #Make a note in the firestore
    firestore_client = firestore.Client()
    doc_ref = firestore_client.collection(u'CollectionsNameHere').add({
        u'propertyone': u'thisisavalue',
        u'propertytwo': 2,
    })
    logging.warning(doc_ref[1].id)

.add returns a tuple of the date that the document was written into the firestore, and a document reference to the written document. .add lets Firestore create a document ID to the written document: to figure out what the ID is, the last line accesses the tuple and pulls out the document ID.

An item that bit me: the official documentation for Firestore states that .add and .doc().set() are equivalent. That’s true, but the returns from both of those functions are different.

Documentation from Google showing .add and .doc.set are the same operation.

.add returns a tuple of the document creation time and then a reference to the added document. However, .set returns a WriteResult, not a tuple. The WriteResult contains the time the document was updated/set in the property update_time. Make sure to use the correct function as necessary.

Set Documentation

Set Documentation - Firestore
WriteResult documentation - Firestore.

Add Documentation

Add documentation - Firestore

Google Doodle: Ruth Asawa

Today’s Google doodle celebrates the sculpture artist, Ruth Asawa.

This is how the Google front page looked like:

Google front page with Ruth Asawa.
Google front page with Ruth Asawa.

Here is the doodle by itself:

Ruth Asawa Google doodle.

The doodle linked to a search for Ruth Asawa:

Google search for Ruth Asawa, linked to by today’s doodle.

Leveraging Google Maps To Comparison Shop Between Travel Sites

Need to book a hotel room, but you’re looking for a good deal? Google Maps has you covered. This post is if you already have a particular hotel picked out.

As an example, I’m going to pick the Contemporary Resort in Orlando, Florida. First, go to Google Maps and type in contemporary resort. Select the Contemporary located in Orlando, FL.

Using Google Maps to locate the Contemporary Resort, in Orlando Florida.

After searching, you’ll see a screen similar to the below:

Contemporary Resort hotel availability from Google Maps.

On the left hand side, there are advertisements (note the small Ad disclaimer in the middle of the screen) where Expedia and other trip planning sites offer deals for the hotel. You can comparison shop between providers – KAYAK is offering rooms for $492, but Expedia is offering for $488 (see purple arrow). The dates of the hotel stay can be changed as well, see the red arrow for the date pickers.

Keep your eye out for similar ads and deals in Google Maps – I frequently see travel deals being offered.

Why I Love NewsBlur – Folder RSS

After the closure of Google Reader – which I was a big fan of – I moved all of my RSS feeds to NewsBlur. One of the reasons I moved to NewsBlur is that it has a full API and is very easy to interface with!

For instance, folder feeds are available and don’t require authentication, making it easy for an app to merge multiple RSS feeds and treat them as one. For example: in NewsBlur, I’ve created a folder called economy and set up multiple feeds (New York Times, Forbes, Washington Post Business) underneath that folder, like so:

A Newsblur folder containing multiple feeds.
A Newsblur folder containing multiple feeds.

Right clicking the folder name and clicking folder settings pops up the folder settings tab. The URLs listed in the Feed Address section return a RSS list with all of the items from the feeds combined into a single feed. Even better: the URL supplied doesn’t require authentication, so an application can read it instead of having to poll 5 separate RSS feeds.

Newsblur folder settings screenshot.

Disney Waiting Page

I like to collect examples of error pages, but this is slightly different. When I was browsing Disney.com, I was shown the below page asking me to wait until the request could be completed.

Notice the stylized Space Mountain image in the middle, which helps to customize and personalize the page to the Disney branding. This is a good page to use as a template if you need to build a similar long-waiting page.

Screenshot of a Disney page asking the user to wait while a long-running request executes.
Screenshot of a Disney page asking the user to wait while a long-running request executes.
A close-up of the stylized Space Mountain image, which helps to brand the page with the Disney theme.
A close-up of the stylized Space Mountain image, which helps to brand the page with the Disney theme.

Missing Logs – Google Logs Viewer

I opened a new GCP project to host a Python application when I hit a problem – my logging.info() and logging.warn() statements weren’t showing up in my logs. Then I realized the standard error and standard out streams weren’t selected in logging!

If you’re missing log information, make sure to select the correct streams in the second dropdown box, as in below:

Screenshot of logging, selecting stderr and stdout streams.
Screenshot of logging, selecting stderr and stdout streams.