Somebody’s mother – by Mary D. Brine

The woman was old and ragged and gray,
And bent with the chill of a winter’s day;
The streets were white with a recent snow,
And the woman’s feet with age were slow.

At the crowded crossing she waited long,
Jostled aside by the careless throng
Of human beings who passed her by.
Unheeding the glance of her anxious eye.

Down the street with laughter and shout.
Glad in the freedom of “school let out,”
Come happy boys, like a flock of sheep,
Hailing the snow piled white and deep;
Past the woman, so old and gray.
Hastened the children on their way.

None offered a helping hand to her,
So weak and timid, afraid to stir,
Lest the carriage wheels or the horses’ feet
Should trample her down in the slippery street.

At last came out of the merry troop
The gayest boy of all the group;
He paused beside her and whispered low,
“I’ll help you across, if you wish to go.”

Her aged hand on his strong young arm
She placed, and so without hurt or harm
He guided the trembling feet along,
Proud that his own were young and strong;
Then back again to his friends he went,
His young heart happy and well content

“She’s somebody’s mother, boys, you know,
For all she’s aged, and poor and slow;
And some one, some time, may lend a hand
To help my mother—you understand?—
If ever she’s old and poor and gray,
And her own dear boy so far away.”

“Somebody’s mother” bowed low her head
In her home that night, and the prayer she said
Was: “God be kind to that noble boy,
Who is somebody’s son and pride and joy.”

Dom Luis I bridge – Porto

I recently visited Porto with some friends and a major highlight was experiencing the Dom Luis I bridge.

The bridge crosses the river Douro and connects the historical city of Porto with the port wine warehouses of Vila Nova de Gaia. At the time of construction, the Dom Luis I arch bridge had the longest span of its type, at 172 meters. In total, the bridge is just over 385 meters long.

The bridge features an upper and lower deck, with the upper level reserved for a light metro line and pedestrians, while the lower level is for general traffic and pedestrians.

The bridge was designed by Teophile Seyrig, a partner of Gustav Eiffel at the time, and many guidebooks will wrongly attribute the design of the bridge to Gustav Eiffel.

Following is a picture I was able to capture:

bridge_1

-Simon

Baby name word clouds in Python

Word clouds are a useful tool in generating a quick, visual depiction of large amounts of textual data. For example, word clouds of politicians’ speeches are able to define the central theme of each speech. In the example I present here, we will use baby names data provided by the Social Security Administration, available here.

Considering baby names registered in the year 2013, we generate a name cloud that looks like this:

nameCloud_2013

where we can clearly see that Emma, Sophia and Olivia were popular baby names in 2013. The above word cloud was generated using a python wordcloud module, available here.

The code for generating the above wordcloud pasted here:

#!/usr/bin/env python
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
from wordlcoud import WordCloud

## reads data file
my_data = np.genfromtxt('yob_2013.txt',
        delimiter=',',
        dtype=[('name','S50'),('gender','S1'),('count','i8')])
names = my_data['name']
freqs = my_data['count']

## creates list of (name,freq) tuple
words = zip(names,freqs)

## sets the geometry of the word cloud
cloud_mask = np.array(Image.open("cloud_outline.png"))
wc = WordCloud(background_color="white",mask=cloud_mask)

wordcloud = wc.generate_from_frequencies(words)

## prints to screen
plt.imshow(wordcloud)
plt.axis('off')
plt.show()

Whilst very interesting and useful, the cloud does not tell us much about popular boy names. It would be useful to be able to filter our database and generate a name cloud of only male names. This can be achieved very easily, thanks to Python’s very powerful slicing and indexing:

my_data = np.genfromtxt('yob_2013.txt',
        delimiter=',',
        dtype=[('name','S50'),('gender','S1'),('count','i8')])
names = my_data['name']
freqs = my_data['count']
genders = my_data['gender']

## Uses python list indexing
names = names[gender=='M']
freqs = freqs[gender=='M']

After the filtering, we obtain the following word cloud of boy names registered in 2013:

nameCloud_2013_males

Good luck making your own interesting and useful word clouds!

-Simon