0% found this document useful (0 votes)
42 views82 pages

Handson Entity Resolution A Practical Guide To Data Matching With Python Third Early Release Michael Shearer Instant Download

The document is a guide on entity resolution, focusing on data matching techniques using Python, authored by Michael Shearer. It discusses the challenges of identifying and merging data records that refer to the same real-world entity, emphasizing the importance of entity resolution in various sectors such as healthcare and finance. The book aims to provide practical insights on how to create richer datasets by resolving discrepancies in identifiers and names across different data sources.

Uploaded by

ventsretni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views82 pages

Handson Entity Resolution A Practical Guide To Data Matching With Python Third Early Release Michael Shearer Instant Download

The document is a guide on entity resolution, focusing on data matching techniques using Python, authored by Michael Shearer. It discusses the challenges of identifying and merging data records that refer to the same real-world entity, emphasizing the importance of entity resolution in various sectors such as healthcare and finance. The book aims to provide practical insights on how to create richer datasets by resolving discrepancies in identifiers and names across different data sources.

Uploaded by

ventsretni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 82

Handson Entity Resolution A Practical Guide To

Data Matching With Python Third Early Release


Michael Shearer download

https://ebookbell.com/product/handson-entity-resolution-a-
practical-guide-to-data-matching-with-python-third-early-release-
michael-shearer-53103394

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Handson Entity Resolution A Practical Guide To Data Matching With


Python 1st Edition Michael Shearer

https://ebookbell.com/product/handson-entity-resolution-a-practical-
guide-to-data-matching-with-python-1st-edition-michael-
shearer-55537528

Handson Entity Resolution Michael Shearer

https://ebookbell.com/product/handson-entity-resolution-michael-
shearer-57056790

Handson Systematic Innovation For Business Management First Darrell


Mann

https://ebookbell.com/product/handson-systematic-innovation-for-
business-management-first-darrell-mann-44912938

Handson Ethical Hacking And Network Defense Mindtap Course List 4th
Edition Rob Wilson

https://ebookbell.com/product/handson-ethical-hacking-and-network-
defense-mindtap-course-list-4th-edition-rob-wilson-44975634
Handson Data Analysis With Numpy And Pandas Implement Python Packages
From Data Manipulation To Processing 1st Edition Curtis Miller

https://ebookbell.com/product/handson-data-analysis-with-numpy-and-
pandas-implement-python-packages-from-data-manipulation-to-
processing-1st-edition-curtis-miller-45457142

Handson Design Patterns With Kotlin Gof Reactive Patterns Concurrent


Patterns And More Alexey Soshin

https://ebookbell.com/product/handson-design-patterns-with-kotlin-gof-
reactive-patterns-concurrent-patterns-and-more-alexey-soshin-46191644

Hands On Liferay Dxp Learn Portlet Development And Customization Using


Osgi Modules 1st Edition Apoorva Prakash

https://ebookbell.com/product/hands-on-liferay-dxp-learn-portlet-
development-and-customization-using-osgi-modules-1st-edition-apoorva-
prakash-46274882

Hands On Media History A New Methodology In The Humanities And Social


Sciences 1st Edition Nick Hall

https://ebookbell.com/product/hands-on-media-history-a-new-
methodology-in-the-humanities-and-social-sciences-1st-edition-nick-
hall-46417372

Handson Data Analysis In R For Finance Jeanfrancois Collard

https://ebookbell.com/product/handson-data-analysis-in-r-for-finance-
jeanfrancois-collard-46450416
Hands-On Entity Resolution
A Practical Guide to Data Matching with Python

With Early Release ebooks, you get books in their earliest form—the author’s
raw and unedited content as they write—so you can take advantage of these
technologies long before the official release of these titles.

Michael Shearer
Hands-On Entity Resolution
by Michael Shearer

Copyright © 2023. All rights reserved.

Printed in the United States of America.

Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,


Sebastopol, CA 95472.

O’Reilly books may be purchased for educational, business, or sales


promotional use. Online editions are also available for most titles
(https://oreilly.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
[email protected].

Acquisitions Editor: Michelle Smith

Development Editor: Jeff Bleiel

Production Editor: Aleeya Rahman

Interior Designer: David Futato

Cover Designer: Karen Montgomery

Illustrator: Kate Dullea


July 2024: First Edition

Revision History for the Early Release


2023-06-30: First Release
2023-08-25: Second Release
2023-10-17: Third Release

See https://oreilly.com/catalog/errata.csp?isbn=9781098148485 for release


details.

The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Hands-


On Entity Resolution, the cover image, and related trade dress are trademarks
of O’Reilly Media, Inc.

The views expressed in this work are those of the author, and do not represent
the publisher’s views. While the publisher and the author have used good
faith efforts to ensure that the information and instructions contained in this
work are accurate, the publisher and the author disclaim all responsibility for
errors or omissions, including without limitation responsibility for damages
resulting from the use of or reliance on this work. Use of the information and
instructions contained in this work is at your own risk. If any code samples or
other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to
ensure that your use thereof complies with such licenses and/or rights.
978-1-098-14842-3
Chapter 1. Introduction to Entity
Resolution

A NOTE FOR EARLY RELEASE READERS

With Early Release ebooks, you get books in their earliest form—the author’s
raw and unedited content as they write—so you can take advantage of these
technologies long before the official release of these titles.

This will be the 1st chapter of the final book. If you have comments about
how we might improve the content and/or examples in this book, or if you
notice missing material within this chapter, please reach out to the author at
[email protected].

All around the world vast quantities of data are being collected and stored.
This data records the world we live in, the changing attributes and
characteristics of the people, places and things around us. More data is being
added every day.

Within this global ecosystem of data processing, organisations independently


collect overlapping sets of information about the same real-world entity, each
with their own approach to organizing and cataloging the data they hold.

Companies and institutions seek to derive valuable insights from this raw
data. Advanced analytical techniques have been developed to discern patterns
in the data, extract meaning and even attempt to predict the future. The
performance of these algorithms depends on the quality and richness of the
data fed into them. By combining data from more than one organisation often
a richer, more complete, data set can be created from which more valuable
conclusions can be drawn.

This book will guide you through how to join these heterogeneous data sets
together to create richer sets of data about the world in which we live. This
process of joining data sets together is known by a variety of names including
name matching, fuzzy matching, record linking, entity reconciliation and
entity resolution. In this book we will use the term entity resolution to
describe the overall process of resolving, that is joining, data together that
refers to real-world entities.

What is Entity Resolution?

Entity resolution is a key analytic technique to identify data records that refer
to the same real-world entity. This matching process enables the removal of
duplicate entries within a single source and the joining of disparate data
sources together when common unique identifiers are not available.

Entity resolution enables enterprises to build rich and comprehensive data


assets, to reveal relationships and construct networks for marketing and risk
management purposes. It is often a key prerequisite to harness the full
potential of machine learning and artificial intelligence.

For example healthcare providers often need to join records from across
different practices or historical archives held on different platforms. In
financial services customer databases need to be reconciled to offer the most
relevant products and services or to enable the detection of fraud. To enhance
resilience or provide transparency on environmental and social issues
corporations need to join up supply chain records with sources of risk
intelligence.

Why is Entity Resolution Needed?

In everyday life as individuals we are assigned lots of numbers – according to


my healthcare provider I am identified by one number, by my employer
another, by my national government a third and so on. When I sign up for
services I’m often assigned a number (or more than one sometimes) by my
bank, chosen retailer or online provider. Why all these numbers? Back in a
simpler time when services were delivered in a local community customers
were known personally and interactions were conducted face-to-face - it was
obvious who you were dealing with! Exchanges were often discrete
transactions with no need to refer to any prior business and no need to keep
records associated with individual customers.

As more and more services began to be provided remotely and offered on a


wider regional or even national basis a means of identifying who was who
became necessary. Names were clearly insufficiently unique, so names were
often combined with location to create a composite identifier, Mrs Jones
became Mrs Jones from Bromley as opposed to Mrs Jones from Harrow. As
records migrated from paper to electronic form the assignment of a unique
machine-readable number began the era of numeric, and alphanumeric,
identifiers that surround us today.

Within the confines of their own domain these identifiers usually work well, I
identify myself with my unique number and it’s clear that I’m the same
returning individual. This identifier allows a common context to be quickly
established between two parties and reduces the possibility of
misunderstandings. These identifiers typically have nothing in common with
each other, they vary in length and format, they are assigned according to
different schemes. There is no mechanism to translate between them or to
identify that individually and collectively they refer to me and not another
individual.

However, when business is depersonalized, and I don’t know the person I’m
dealing with and they don’t know me, what happens if I register for the same
service more than once? Perhaps I’ve forgotten to identify with my unique
number or a new application is being submitted on my behalf. A second
number will be created that also identifies me. This duplication makes it more
difficult for the service provider to offer a personalized service as they must
now join together two different records to understand fully who I am and
what my needs might be.
Within larger organisations the problem of matching up customer records
becomes even more challenging. Different functions or business lines may
maintain their own records that are specifically tailored to their purpose but
were designed independently of each other. A common problem is how to
construct a comprehensive (or 360º) view of a customer. Customers may
have interacted with different parts of an organisation over many years. They
may have done so in different contexts; as an individual, as part of a joint
household or perhaps in an official capacity associated with a company or
other legal entity. In the course of these different interactions, the same
person may have been assigned a multiplicity of identifiers in various
systems.

This situation commonly arises due to (often historic) mergers and


acquisitions, where overlapping sets of customers are to be amalgamated and
treated consistently as a single population. How do we match up a customer
from one domain with one from another?

This challenge of joining up records also occurs when bringing together


datasets supplied by different organisations. As there is typically no
universally adopted standard or common key between enterprises, especially
with respect to individuals, the joining of their data together is a commonly
overlooked and non-trivial exercise.

Main Challenges of Entity Resolution


So if our assigned unique identifiers are all different and don’t match up how
can we identify that two records refer to the same entity? Our best approach
is to compare individual attributes of those entities, such as their name, and if
they share enough similarities make our best judgement that they are a match.
This sounds simple enough, right? Lets delve into some of the reasons why
that isn’t as straightforward as it sounds…

Lack of Unique Names

Firstly, there is the challenge of recognizing uniqueness between names or


labels. The repeated assignment of the same name to different real-world
entities presents an obvious challenge in differentiating who is who. Perhaps
you searched the internet for your own name? Chances are, unless your name
is particularly uncommon, you will have found plenty of doppelgangers with
exactly the same name as yourself.

Inconsistent Naming Conventions

Names are recorded in a variety of ways and data structures. Sometimes


names are described in full, but often abbreviations are present or less
significant parts of the name are omitted. For example my name might be
expressed entirely correctly, as any of the following:

Table 1-1. Name Variations

Michael Shearer
Michael William Shearer

Michael William Robert Shearer

Michael W R Shearer

M W R Shearer

M W Shearer

None of these names exactly match with each other but all refer to the same
person, the same real-world entity. Titles, nicknames, shortened forms or
accented characters all frustrate the process of finding an exact
match. Double‑barrelled or hyphenated surnames add further permutations.

In an international context naming practices vary enormously across the


globe. Personal names may be present at the start or the end of a name and
family names may, or may, not be present. Family names may also vary
according to the sex and marital status of the individual. Names may be
written in a variety of alphabets/character sets or translated differently
between languages. 1

Data Capture Inconsistencies

The process of capturing and recording names or labels usually reflects the
data standards of the acquirer. At the most basic level some data acquisition
processes will employ upper case characters only, others lowercase whilst
many will permit mixed case with initial letters capitalized.

A name maybe heard only in conversation without the opportunity to clarify


the correct spelling or maybe incorrectly transcribed in a hurry. Names or
labels are often mistyped during manual re-keying or accidentally omitted.
Sometimes different conventions are used which can easily be interpreted
incorrectly if the original context is lost. For example, even a simple name
can be recorded as ‘Firstname, Surname' or perhaps as ‘Surname,
Firstname' or even transposed completely into the wrong fields.

International data capture can lead to inconsistencies in transliteration


between one script and another, or to transcription errors when captured
verbally.

Worked Example

Let’s consider a simple fictitious example to illustrate how these challenges


might manifest themselves. To begin with imagine the only information we
have is the name:

Names

Name
Michael Shearer

Micheal William Shearer

Is it likely that a ‘Michael Shearer’ refers to the same entity as a ‘Micheal


William Shearer’? Absent any other information there is a fair chance that
both refer to the same person. The second, with the addition of a middle
name has extra information but otherwise they are nearly identical and a
comparison of the two surnames would produce an exact match. Notice i
slipped in a common mis-spelling of my Firstname. Did you spot it?

What if we add another attribute, can that help improve our matching
accuracy? If you can’t remember your membership number a service provider
will often ask for a date of birth to help identify you (they also do this for
security reasons). Date of birth is a particularly helpful attribute as it doesn’t
change and has a large number of potential values (known as high
cardinality). Also the composite structure of individual values for day, month
and year may give us clues to the likelihood of a match when an exact
equivalence isn’t established. For example consider:

Table 1-2. Example records - 2

Name Date of Birth

Michael Shearer 4/1/1970


Micheal William Shearer 14 January 1970

At first glance the Date of Birth is not equivalent between the two records
and so we might be tempted to discount the match. If these two individuals
are born 10 days apart, they are unlikely to be the same person! However,
there is only a single digit difference between the two with the former lacking
the leading digit 1 in the day sub-field - could this be a typo? It’s hard to tell.
If the records were from different sources we would also have to consider
whether the data format was consistent, do we have UK format of
DD/MM/YYYY or perhaps in the US format of MM/DD/YYYY?

What if we add a place of birth? Again, this attribute shouldn’t change but it
can be expressed at different levels of granularity or with different
punctuation. For example:

Table 1-3. Example records - 3

Name Date of Birth Place of Birth

Michael Shearer 4/1/1970 Stow-on-the-Wold

Micheal William Shearer 14 January 1970 Stow on the Wold

Here there is no exact match on the Place of Birth between any of the records
although all could be factually correct.
Therefore Place of Birth, which may be recorded at different levels of
specificity, doesn’t help us as much as we thought it might. What about
something more personal, like a phone number? Of course, many of us do
change our phone number throughout our life but with the ability to keep a
cherished and well‑socialized mobile phone number when swapping between
providers this number is a more sticky attribute that we can use. However,
even here we have challenges. Individuals may possess more than one
number (a work and a personal number for example), the identifier may be
recorded in a variety of formats, including spaces or hyphens. It may include
or exclude an international dialing prefix.

Expanding our example further:

Table 1-4. Example records - 4

Place of Mobile
Name Date of Birth
Birth Number

Michael 4/1/1970 Stow-on-the- 07700 900999


Shearer Wold

Micheal 14 January Stow on the 0770-090-


William 1970 Wold 0999
Shearer
As you can see this resolution challenge is quickly becoming quite
complicated!

Deliberate Obfuscation

The vast majority of data inconsistencies that frustrate the matching process
arise through inattentive but well meaning data capture processes. However
for some uses we must consider the scenario where data has been maliciously
obfuscated to disguise the true identity of the entity and prevent associations
that might reveal a criminal intent or association.

Match Permutations

If I asked you to match your name against a simple table of, say, 30 names
you could probably do so within a few seconds. A longer list might take
minutes but is still a practical task, however what if I asked you to compare a
list of 100 names with a second list of 100 names the task becomes a lot more
laborious and prone to error.

Not only does the number of potential matches expand to 10,000 (100 x 100),
but if you want to do so in one pass through the second table you have to hold
all 100 names from the first table in your head – not easy!

Similarly, if I asked you to deduplicate a list of 100 names in a single list


you’d actually have to compare:
1. The first name against the remaining 99, then
2. The second name against the remaining 98 and so on…

In fact you’d have 4950 comparisons to make. At one per second that’s about
80 minutes work just to compare two short lists. For much larger datasets the
number of potential combinations becomes impractical, even for the most
performant hardware.

Blind Matching?

So far we have assumed that the sets of data we seek to match are fully
transparent to us – that the values of the attributes are readily available, in full
and have not been obscured or masked in any way. In some cases this ideal is
not possible due to privacy constraints or geopolitical factors that prevent
data moving across borders. How can we find matches without being able to
see the data? This feels like magic but as we will see in Chapter 9 there are
cryptographic techniques that enable matching to still take place without
requiring full exposure of the list to be matched against.

The Entity Resolution Process

To overcome the challenges above the basic entity resolution process is


divided into four sequential steps:

Data Standardization
Record Blocking
Attribute Comparison
Match Classification

After match classification additional post-processing steps may be required:

Clustering
Canonicalization

Let’s describe each of these steps briefing in turn.

Steps in the Entity Resolution Process

Data Standardization

Before we can compare records we need to ensure we have consistent data


structures so we can test for equivalence between attributes. We also need to
ensure that the formatting of those attributes is consistent. This processing
step usually involves splitting fields, removing null values and extraneous
characters. It is often bespoke to the source dataset.

Record Blocking

To overcome the challenge of impractically high volumes of record


comparisions a process called Blocking is often used. Instead of comparing
every record with every other record, only subsets of record pairs, preselected
based on ready equivalence between certain attributes, are compared in their
entirety. This filtering approach concentrates the resolution process on those
records with the highest propensity to match.

Attribute Comparison

The process of comparing individual attributes between the pairs of records


selected by the blocking process occurs next. The degree of equivalence can
be established based on an exact match between attributes or a similarity
function. This process produces a set of equivalence measure between two
record pairs.

Match Classification

The final step in the basic entity resolution process is to conclude whether the
collective similarity between individual attributes is sufficient to declare two
records a match, i.e. to resolve that they refer to the same real-world entity.
This judgement can be made according to a set of manually defined rules or
can be based on a machine-learning probabilistic approach.

Clustering

Once our match classification is complete we may group our records into
connected clusters via their matching pairs. The inclusion of a record pair in a
cluster may be determined by an additional match confidence
threshold. Records without pairs above this threshold will form standalone
clusters. If our matching criteria allow for different equivalence criteria then
our clusters may be intransitive, i.e. record A maybe paired with record B,
and record B paired with C, but record C may not be paired to record A. As a
result clusters may be highly interconnected or more loosely coupled.

Canonicalization

Post resolution there may be a need to determine which attribute values


should be used to represent an entity. If approximate matching techniques
have been used to determine equivalence, or if an additional variable attribute
is present in the pair or cluster but has not been used in the matching
process, then there may be a need to decide which value is the most
representative. The resulting canonical attribute values are then used to
describe the resolved entity in onward calculations.

Worked Example

Returning to our simple example lets apply the steps to our data. Firstly lets
standardize our data, splitting the name attribute, standardizing the date of
birth and removing the extra characters in the place of birth and mobile
number fields:

Table 1-5. Step 1 - Standardized records

Place of
Firstname Lastname Date of Birth Birth

Michael Shearer 4/1/1970 Stow on the


Wold

Micheal Shearer 14/1/1970 Stow on the


Wold

In this simple example we only have one pair to consider so we don’t need to
apply blocking. We’ll return to this in Chapter 5.

Next we’ll compare the individual attributes for exact matches:

Table 1-6. Step 3 - Attribute Comparison

Value Record Value Record


Attribute Comparison
1 2

Firstname
Michael Micheal No Match

Lastname
Shearer Shearer Match

Date of Birth
4/1/1970 14/1/1970 No Match

Place of Birth
Stow on the Stow on the Match
Wold Wold

Mobile Number
07700 900999 07700 900999 Match

Finally we apply step 4 to determine whether we have an overall match. A


simple rule might be if the majority of the attributes match then we conclude
the overall record is a match, as in this case.

Alternatively we might consider various combinations of matching attributes


to be sufficient for us to declare a match. In our example, to declare a match
we could look for either:

Name match AND (Date of Birth OR Place of Birth match), or


Name match AND Mobile Number match

We can take this approach a step further and assign a relative weighting to
each of our attribute comparisons; a mobile number is worth perhaps twice as
much as a Date of Birth match and so on… Combining these weighted
scores produces an overall match score which can be considered against a
given confidence threshold.

We will look more at different approaches to determine these relative


weightings, using statistical techniques and machine learning, in Chapter 4.

As we have seen different attributes may be stronger or weaker in helping us


determine whether we have a match. Earlier we considered the likelihood of
finding a match for a name that is quite common versus one that is found
more infrequently. For example, in a UK context, a match on a surname of
Smith is likely to be less informative that a match on Shearer – there are
fewer Shearers than Smiths and so a match is inherently less likely to begin
with (a lower prior probability).

This probabilistic approach works particularly well when some of the values
of a categorical attribute (one with a finite set of values) are significantly
more common than others. If we consider a City attribute as part of an
address match in a UK dataset then London is likely to occur much more
frequently than, say, Bath and therefore maybe weighted less.

Note we haven’t been able to determine which date of birth is definitively


correct so we are left with a canonicalization challenge.

Measuring Performance
Statistical approaches may help us to decide how to evaluate and combine all
the clues that comparing individual attributes gives us but how do we decide
whether the combination is good enough or not? How do we set the
confidence threshold to declare a match? This depends on what is important
to us and how we propose to use our newly found matches.

Do we care more about being sure we spot every potential match and we are
ok if in the process we declare a few matches that turn out to be false? This
measure is known as Recall. Or we don’t want to waste our time with
incorrect matches but if we miss a few true matches along the way that’s ok.
This is called Precision.

Comparing two records there are four different scenarios that can arise:

Table 1-7. Matching Classifications

You Decide Ground Truth Instance Of

Match Match True Positive (TP)

Match Not Match False Positive (FP)

Not Match Match False Negative (FN)

Not Match Not Match True Negative (TN)

If our recall measure is high then we are only declaring relatively few False
Negatives, i.e. when we declare a match we rarely overlook a good candidate.
If our precision is high then when we declare a match we nearly always get it
right.

At one extreme imagine we declare every candidate pair a match, we would


have zero False Negatives and our measure of recall would be a perfect (1.0);
we’d never overlook a match. Of course our precision would be very poor as
we’d declare lots of non matches incorrectly as matches. Alternatively
imagine we only declare a match in the ideal case when every attribute is
exactly equivalent; then we will never declare a match in error and our
precision will be perfect (1.0), at the expense of our recall which will be very
poor as lots of good matches pass us by.

Ideally of course we’d like high recall and precision simultaneously, our
matches are both correct and comprehensive but this is tricky to achieve!
Chapter 6 describes this process in more detail.

Getting Started
So how can we solve these challenges?

Hopefully this chapter has given you a good understand of what Entity
Resolution is, why it is needed and the main steps in the process.Subsequent
chapters will guide you, hands-on, through a set of worked real-world
examples based on publicly available data.

Fortunately, in addition to commercial options, there are several open‑source


python libraries that do much of the hard work for us. These frameworks
provide the scaffolding upon which we can construct a bespoke matching
process that suits our data and context.
But before we begin, we’ll take a short detour in the next chapter to setup our
analytic environment, review some of the foundational python data science
libraries we will use and then we’ll consider the first step in our entity
resolution process - standardizing our data ready for matching.

1
https://www.fbiic.gov/public/2008/nov/Naming_practice_guide_UK_2006.pdf
Chapter 2. Data Standardization

A NOTE FOR EARLY RELEASE READERS

With Early Release ebooks, you get books in their earliest form—the author’s
raw and unedited content as they write—so you can take advantage of these
technologies long before the official release of these titles.

This will be the 2nd chapter of the final book. If you have comments about
how we might improve the content and/or examples in this book, or if you
notice missing material within this chapter, please reach out to the author at
[email protected].

As we discussed in Chapter 1, before we can successfully match or de-


duplicate data sources we need to ensure our data is presented in a consistent
manner and that any anomalies are removed or corrected. We will use the
term data standardization to cover both the transformation of datasets into
consistent formats and the cleansing of data to remove unhelpful extra
characters that would otherwise interfere with the matching process.

In this Chapter we will get hands-on and work through a real-world example
of this process. We will create our working environment, acquire the data we
need, cleanse that data and then perform a simple entity resolution exercise to
allow us to perform some simple analysis. We will conclude by examining
the performance of our data matching process and consider how we might
improve it.

But first let’s introduce our example and why we need entity resolution to
solve it!

Sample Problem

So let’s work through an example problem to illustrate some of the common


challenges we see in resolving entities between data sources and why data
cleansing is an essential first step. As we are constrained to use openly
available public sources of data the example is slightly contrived but
hopefully illustrates the need for entity resolution.

Let’s imagine we are researching factors that may influence whether


members of the House of Commons, the lower house of the Parliament of the
United Kingdom, are re-elected. We surmise that politicians with an active
social media presence might be more successful in securing re-election. For
the purposes of this example we are going to consider Facebook presence and
so we look at the last UK general election and examine how many of
politicians who held onto their seat have Facebook accounts.

Helpfully Wikipedia has a webpage that lists the Members of Parliament


(MP) returned at the 2019 general election, including whether or not they
were re-elected ,but it lacks social media information for those individuals.
However the website theyworkforyou.com does record information on
current MPs,including links to their Facebook accounts. So if we combine
these datasets we can begin to test our hypothesis if re-election and social
media presence are related.

THEY WORK FOR YOU

The TheyWorkForYou website is run by mySociety, a UK charity who build web tools that make
democracy a little more accessible. MySociety is not politically-aligned, and its projects are for
everyone to use.

So how can we join these two datasets together? Although both datasets
include the name of the Constituency that each MP represents we can’t use
this as a common key because since the 2019 general election a number of
by-elections1 have taken place, returning new MPs. These new members may
have Facebook accounts but should not be considered in the re-election
population as this might skew our analysis. Therefore we need to connect our
data by matching the names of the MPs between the two sets of records, i.e.
resolving these entities so we can create a single combined record for each
MP.

Environment Setup

Our first task is to set up our entity resolution environment. In this book we
will be using Python and the Juypter-lab interactive development
environment.
To begin you’ll need Python installed on your machine. If you don’t already
have it you can download it from www.python.org.2

ADD PYTHON TO PATH

If installing Python for the first time make sure to select the ‘Add Python to PATH’ option to ensure
you can run Python from your command line.

To download the code examples that accompany this book it is convenient to


use the git version control system. A guide to installing git can be found at
https://github.com/git-guides/install-git.

Once git is installed you can clone (that is take a copy of) the Github
repository that accompanies this book onto your machine. Run this command
from the parent directory of your choice:

>>>git clone
https://github.com/mshearer0/HandsOnEntityResolutio
n

This will create a subdirectory called ‘HandsOnEntityResolution’. Next


change into this directory:

>>>cd HandsOnEntityResolution

PYTHON VIRTUAL ENVIRONMENT


I recommend you to use a virtual Python environment to work through the examples in this book. This
will allow you to maintain the necessary Python package configuration without interfering with any
other projects you may have. The following command creates a new environment in a venv directory:

>>>python -m venv venv

To activate the environment run the following:

>>>.\venv\Scripts\activate.bat (Windows)

>>>source venv/bin/activate (Linux)

This will prefix your command prompt to show the environment name based on the directory name:

>>>(HandsOnEntityResolution) your_path\HandsOnEntityResolution

Once you’ve finished its important to deactivate the environment:

>>>deactivate (Windows)

>>>deactivate (Linux)

To set up our Jupyter Lab code environment and the packages will use the
Python package manager pip. Pip should be included with your Python
installation. You can check using:

>>>python -m pip --version


pip 23.0.1 from your_path\HandsOnEntityResolution\lib\
site-packages\pip (python 3.7)

You can then install the packages you will need throughout the book from the
requirements.txt file using:

>>>pip install -r requirements.txt

Next configure a python kernel associated with our virtual environment for
our notebooks to pick up:

>>>python -m ipykernel install --user


--name=handsonentityresolution
Then start Jupyter lab with:

>>>jupyter-lab

While it’s pretty self-explanatory, instructions to how to get started with


Jupyter are available at: https://docs.jupyter.org/en/latest/

Acquiring Data

Now we have our environment configured, our next task is to acquire the data
we need. It’s often the case that the data we need comes in a variety of
formats and presentations. The examples included in this book will illustrate
how to deal with the some of the most common formats we encounter.

Wikipedia Data

Opening Chapter2.ipynb in our Jupyter environment we start by defining the


Wikipedia url for the list of MPs returned in the 2019 UK general election:
url =
"https://en.wikipedia.org/wiki/List_of_MPs_elected_in_th
e_2019_United_Kingdom_general_election"

Then we can import the requests and BeautifulSoup python packages and use
them to download a copy of the Wikipedia text and then run an html parser to
extract all the tables present on the page:

import requests
from bs4 import BeautifulSoup

website_url = requests.get(url).text
soup = BeautifulSoup(website_url,'html.parser')
tables = soup.find_all('table')

BEAUTIFUL SOUP

Beautiful Soup is a library that makes it easy to scrape information from web
pages. More details are available at:
https://www.crummy.com/software/BeautifulSoup/

Next, we need to find the table we want within the page. In this case we
select the table that includes the text ‘Member returned’ (a column name).
Within this table we extract the column names as headers and then iterate
through all the remaining rows and elements building a list of lists. These
lists are then loaded into a Pandas dataframe, setting the extracted headers as
dataframe column names.

import pandas as pd

for table in tables:


if 'Member returned' in table.text:
headers = [header.text.strip() for header in
table.find_all('th')]
# To fix - headers returns 7 but only 5 columns
headers = headers[:5]
dfrows = []
table_rows = table.find_all('tr')
for row in table_rows:
td = row.find_all('td')
dfrow = [row.text for row in td if
row.text!='\n']
dfrows.append(dfrow)

df_w = pd.DataFrame(dfrows, columns=headers)

The result is a Pandas dataframe which we can examine using the info()
method:
Figure 2-1. Wikipedia MP Info

We have 652 entries of 5 columns. This looks encouraging as in each column


650 rows have non‑null values which matches the number of UK House of
Commons parliamentary constituencies.

Finally we can simplify our dataset by only retaining the columns we need:

df_w = df_w[['Constituency','Member returned','Notes']]

They Work For You Data

Now we can move on to download our second dataset and load it into a
separate dataframe:

url = "https://www.theyworkforyou.com/mps/?f=csv"
df_t = pd.read_csv(url, header=0)
Figure 2-2. They Work For You MP Info

POST 2024/25 UK GENERAL ELECTION

If you are reading this book after the 2024/25 UK general election then the TheyWorkForYou website
will likely be updated with the new MPs. If you are following along on your own machine then please
use the ‘mps_they_raw.csv’ file supplied in the Github repository that accompanies this book. The raw
Wikipedia data ‘mps_wiki_raw.csv’ is also provided.

If we examine the first few rows of this data we can see what these fields
contain:
Figure 2-3. First five rows of the They Work For You dataset

To discover whether each MP has an associated Facebook account we need


to follow the link in the URI column to lookup their WeWorkForYou
homepage. We’ll need to do this for each row so we define a function that we
can apply along the axis of the dataframe.

Adding Facebook Links

def facelink(url):
website_url = requests.get(url).text
soup = BeautifulSoup(website_url,'html.parser')
flinks = [f"{item['href']}" for item in soup.select
("a[href*='facebook.com']")]
if
flinks[0]!="https://www.facebook.com/TheyWorkForYou":
return(flinks[0])
else:
return("")

The function uses the same BeautifulSoup package we used to parse the
Wikipedia webpage. In this case we extract all the links to facebook.com. We
then examine the first link. If this link is the account of weworkforyou then
the site doesn’t have a Facebook account listed for the MP so we return a nil
string, if it does then we return that link.

We can apply this function to every row in the dataframe using the apply()
method to call the facelink function, passing the URI value as the url. The
value returned from the function is added to a new column Flink appended to
the dataframe.

df_t['Flink'] = df_t.apply(lambda x: facelink(x.URI),


axis=1)

Be patient, this function has to do quite a bit of work so may take a few
minutes to run on your machine. Once this completes we can view our first
few rows again to check if we are getting Facebook links we expect:
Figure 2-4. First five rows of the They Work For You dataset with Facebook links

Finally we can simplify our dataset by only retaining the columns we need:

df_t = df_t[['Constituency','First name','Last


name','Flink']]

Cleansing Data

Now we have our raw datasets we can begin our data cleansing process. We
will perform some initial cleansing on the Wikipedia dataset first and then the
TheyWorkForYou data. We will then attempt to join these datasets together
and see what further inconsistencies that reveals and we need to standardize.

Wikipedia
Let’s have a look at the first and last few rows in the Wikipedia dataset:

Figure 2-5. First and last 5 rows of the Wikipedia data

The first task in our cleansing process is to standardize our column names:

df_w = df_w.rename(columns={ 'Member returned' :


'Fullname'})

We can also see that the output of our parser has a blank row at the start and
the end of our dataframe and it appears we have ‘\n’ characters appended to
each element. These additions would clearly interfere with our match so need
to be removed.

To remove the blank rows we can use:

df = df.dropna()

To remove the trailing '\n’ characters:

df_w['Constituency'] =
df_w['Constituency'].str.rstrip("\n")
df_w['Fullname'] = df_w['Fullname'].str.rstrip("\n")

To be sure we now have a clean Fullname we can check for any other '\n’
characters.

df_w[df_w['Fullname'].astype(str).str.contains('\n')]

This simple checks shows we also have leading values that we need to
remove them:

df_w['Fullname'] = df_w['Fullname'].str.lstrip("\n")

Our next task is to split our Fullname into Firstname and Lastname so we can
match these values independently. For the purposes of this example we are
going to use a simple method, selecting the first substring as the Firstname
and the remaining substrings, separated by spaces, as the Lastname.
df_w['Firstname'] = df_w['Fullname'].str.split().str[0]
df_w['Lastname'] =
df_w['Fullname'].astype(str).apply(lambda x:
' '.join(x.split()[1:]))

We can check how well this basic method has worked by looking for
Lastnames that contain spaces:

Figure 2-6. Check for compound Lastnames in Wikipedia data

We now have a sufficiently clean dataset to attempt a first match so we’ll


move on to our second dataset.

They Work For You

As we saw earlier the weworkforyou data is already pretty clean so at this


stage all we need to do is standardize the column names with the previous
dataframe. This will make our life easier as we attempt to match:

df_t = df_t.rename(columns={'Last name' : 'Lastname',


'First name' :
'Firstname'})

Attribute Comparison

Now we have two similarly formatted dataframes we can experiment with the
next stage of the Entity Resolution process. As our datasets are small we
don’t need to employ record blocking and so we can proceed directly to try a
simple exact match of Firstname, Lastname and Constituency. The merge
method (similar to a database join) does this exact matching for us:

len(df_w.merge(df_t, on=
['Constituency','Firstname','Lastname']))
599

We find 599 of 650 are perfect matches of all three attributes – not bad!!
Matching on just Constituency and Lastname gives us 607 perfect matches so
we clearly have 8 mismatching Firstnames:

len(df_w.merge(df_t, on=['Constituency','Lastname']))
607

Repeating the process for the remaining permutations of Firstname, Lastname


and Constituency gives us the following Venn diagram of match counts:
Figure 2-7. Venn Diagram
A simple join on Firstname gives 2663 matches and the equivalent match on
Lastname has 982 matches. These counts exceed the number of MPs and
arise due to the presence of repeated common names that match more than
once between the two datasets.

We have 599 matches out of 650 so far, but can we do better? Let’s start with
examining the Constituency attribute in our datasets. As a categorical
variable we would expect this should be pretty easy to match.

len(df_w.merge(df_t, on=['Constituency'] ))
623

We have 623 matches, leaving 27 unmatched. Why not? Surely we’d expect
the same Constituencies to be present in both datasets, what is going wrong?

Constituency

Let’s have a look at the first 5 of the unmatched population in both datasets.
To do this we perform an outer join between the dataframes using the
Constituency attribute and then select those records found in either the right
(Wikipedia) or left (Theyworkforyou) dataframe accordingly:
Figure 2-8. Constituency Mismatches

We can see that the first dataset from the TheyWorkForYou website has
commas embedded in the Constituency names whereas the Wikipedia data
does not. This explains why they don’t match. To ensure consistency let’s
remove any commas from both dataframes:

df_t['Constituency'] =
df_t['Constituency'].str.replace(',', '')
df_w['Constituency'] =
df_w['Constituency'].str.replace(',', '')

After applying this cleansing we have have a perfect match on all 650
constituencies.
len(df_w.merge(df_t, on=['Constituency']))
650

CASE SENSITIVITY

In this simple example we have matching case conventions (e.g. initial Capitalization) between the two
datasets. In many situations this won’t be the case and you’ll need to standardize on upper or lower
case characters. We’ll see how this can we done in later chapters.

Repeating our perfect match on all three attributes we can now match 624
records.

len(df_w.merge(df_t, on=
['Constituency','Firstname','Lastname']))
624

What about the other 26?

A little domain knowledge is useful here. As we considered at the start of the


chapter between the election in 2019 and the time of writing a number of by-
elections have taken place. If we look at constituencies where neither the
Firstname nor the Lastname match then, for this simple example at least, we
can we can identify likely candidates:
Figure 2-9. Potential By-elections

Of our 14 by-election candidates we have 13 cases where the names are


entirely different suggesting we are correct to discount them, but the
candidate for Newton Abbot appears to be a potential match as the middle
name ‘Morris’ has been included in the Lastname in one dataset and in the
Firstname in the other, frustrating our exact match on both attributes.

In fact we can verify our conclusion at


https://www.parliament.uk/about/how/elections-and-voting/by-elections/by-
elections-2019/. This confirms that by-elections have been held in the
matching constituencies. So this explains 13 of our 26 unmatched records,
what about the rest? Let’s pick out where either the Firstname or the
Lastname matches but the other doesn’t:
Random documents with unrelated
content Scribd suggests to you:
with him concerning the methods or policy by which such a result is
best attained.
With the example, the experience, the precedents established by
these, my predecessors, I enter upon the duties of the office to which
I have been elected. And if, at the close of my term, I can surrender
to my successor the trusts I now assume, and know that my
administration has been marred by as few faults and failures, and
distinguished by such a record of duties honestly, faithfully and
intelligently discharged, as are the records of my predecessors
generally, I shall certainly feel that I “have kept the faith.”
THE GRAND ARMY OF THE
REPUBLIC.
Speech at the opening of the “Soldiers’ Fair and Festival,” Topeka, January 28,
1885.

“Now abideth Faith, Hope and Charity, these three; but the greatest of these is
Charity.”
In no age, and among no other people, have these virtues been so
signally illustrated as they have been in our own age and by the
people of the United States.
Faith in the Republic, in the grandeur of its power, in the beneficence
of its institutions, and in the freedom, humanity and justice of its
rule—this sentiment animated and inspired the soldiers of the Union
during the long and dreadful years of the late civil war.
The glad picture of a country saved, disenthralled and enfranchised—
this was the hope, imprinted on their hearts, that made their long
marches less wearisome, that shortened the lonely hours of the night
watch, and that nerved their arms amid the smoke of battle.
And the greatest of these virtues has been illustrated, during the two
decades since the war, by the quick, unfailing and generous response
of the people to every appeal made in behalf of those who thus risked
health and life that the Republic might be preserved.
The inspiration that prompts and organizes such a charity as this, in
which you, ladies and gentlemen of Topeka, have engaged, is in every
sense honorable to the Capital City. Kindly consideration of the
needs and sufferings of the poor or unfortunate is always a gracious
sentiment. But it is doubly so when it has for its object the relief of
men who once periled their lives for their country, and I am honored
by the part you have allotted me, to formally open this fair and
festival.
In the bustle, rush and interest of personal and public activities, the
people sometimes forget how immeasurable is the debt of gratitude
the Republic owes to the soldiers. I have, now and then, heard good
citizens bewailing the burden of our pension list, and thoughtlessly
declaring that Congress was extravagantly generous in the pensions
given those who were disabled in the service. It is probably true that
in some instances the generosity of the Government has been
imposed upon. But would any young man in this assemblage consent
to lose an arm for thirteen dollars a month, or a leg for thirty-two
dollars a month, or to go through life blind and helpless for seventy-
two dollars a month? Measure the sacrifice with the pension, and no
true-hearted, right-thinking man or woman will say that the
Government has done more than justice to its disabled soldiers.
Nor should it be forgotten, in considering the obligation of the people
and the Government to the soldiers, that there was a time, not many
years ago, when everything in this country—its Government, its
lands, its money—was absolutely at the mercy of the army. When, at
the close of the late civil war, the men who had followed Grant, and
Sherman, and Thomas, and Meade, marched in review down
Pennsylvania avenue, in Washington, on their bayonets rested all
control, all law, all public authority. They had only to say to
Congress, “These States we have conquered are ours; divide their
territory and give us patents for it,” and it would have been done.
They had only to say to the President, Congress, and people: “We
have each earned pensions of one hundred dollars a month—enact
such a law,” and it would have been enacted. Or if they had declared,
“Give every soldier’s widow or orphan one thousand dollars a year,”
where was the power to say nay? The Government? It was their
strong and steady columns. The Congress? They could have sent a
Corporal with his guard and brushed it away as you would a fly from
your hand. The Constitution? It was a mere faded parchment, as dry
and useless as a last year’s bird’s nest, if these men in faded blue
uniforms, marching with their tattered flags—these men who had
looked death in the face on dozens of battle-fields—had so decreed.
But they used their great power with the chivalry of heroes and the
unselfishness of patriots. They demanded nothing of the country
they had saved. Quietly and modestly they returned to the peaceful
homes and walks they had left, and took up again the broken threads
of their old life.
Thousands of these soldiers contracted, during their service, the
seeds of diseases that were only developed years afterward. The
surgeon of my own Regiment, an old and capable physician, once
told me that every man in the army marching to Atlanta under
Sherman, would sooner or later suffer from the effects of the
exposures and hardships of that trying campaign.
And for unfortunates of this character, whose disabilities were
developed long after the war, the Government provides no pensions.
Death may result, but the widows and orphans of such soldiers can
claim no bounty from the country. For the relief of these soldiers,
their widows and orphans, private benevolence must be appealed to.
And this is the purpose of your organization. It is an object that
should enlist the sympathies of all, and I sincerely trust that the
largest measure of success may reward your efforts, and that a fund,
ample for the purposes indicated, may be provided.
A WAR-TIME PICTURE.
Speech, at a Grand Army Camp-Fire, held in Topeka, February 13, 1885.

Comrades of the Grand Army: The Chairman of your committee


called on me, on Wednesday evening last, and asked me to occupy
five or six minutes, this evening, in a talk to you. I could not well
refuse, though it seemed to me I had nothing of interest to say. But
after he had gone, and the task I had assumed began to press itself
upon my attention, my mind drifted back to the war period, with its
fierce strifes and passionate excitement, and vivid pictures of many
scenes presented themselves, some in keeping with the time, others
more akin to the present era of peaceful prosperity and development.
Then I thought that others who were to address you to-night would
talk of war, and I might entertain you, for a few moments at least,
with a picture of peace and good-will in the midst of war.
As vividly as if it was an event of yesterday, there is photographed on
my memory a scene presented in the early autumn of 1862. Buell’s
army was moving from Louisville to the battle-field of Perryville, and
early one evening our corps went into camp on a beautiful farm in
one of the loveliest regions of Kentucky. A clear, sparkling brook
wound through a charming valley, from the hills to the west, and
blue-grass pastures climbed gentle slopes on either side of the
stream. As a background, south, north and west, were heavy forests
of noble trees, while eastward an extended landscape, embracing a
range of finely cultivated farms, stretched far away.
The evening shadows fell slowly upon the camp; so slowly you could
scarce tell when day ended and the night began. Supper was over,
and the soldiers, lying at full length on the luxuriant grass, or sitting
around in groups, were lazily resting or chatting, after the day’s long
and dusty march. Thousands of smouldering camp-fires dotted the
hillsides and valleys in every direction; the wide firmament,
cloudless and peaceful, glittered with stars; and the air, mild and
balmy, had in it that indefinable and delicate perfume which belongs
alone to trodden pastures or to meadows freshly mown. All the noise
and bustle of the day and evening gradually died away. The camp-
guards paced their posts slowly and noiselessly; the hum of
conversation was faint and low; the rude mirth of the soldiers was
hushed; the jokes, and gibes, and laughter of the camp had faded
into silence; and a peaceful calm, resembling that of a quiet Sabbath,
had fallen like a benediction over all the scene. Save the stacks of
burnished guns, from which the light of the camp-fires fitfully
glinted, and the parked cannon, and the groups of uniformed men,
the picture presented was as peaceful and calm as it had been before
war swept into this pastoral paradise.
But suddenly, from the edge of the woods across the intervening
valley, half a mile away, a band began playing “Home, Sweet Home,”
and as the touching chords of that familiar melody flooded all the
camp, the hush grew deeper, and I know, though the darkness
concealed their emotion, that moisture welled up in all eyes, and
tender thoughts of far-away scenes filled all hearts in that great host
of bronzed and stalwart men. For when the music at last ceased a
silence so deep that it was almost oppressive succeeded; and then a
mighty cheer, echoing and resounding for miles away, went up from
20,000 throats. Those who have heard the Union army hurrah know
what it could do in that line, when it put its heart into its lungs and
throat.
When the cheer ended, another band, far down the valley, made the
hillsides echo with the patriotic strains of the “Star-Spangled
Banner,” and again followed the great shout of applause, like the
mingling roar of many winds. Then from the hill-tops, far off to the
west, was wafted the music, low and sweet, of “Annie Laurie,” and
again the hush of an almost oppressive silence fell upon the camp.
But no cheer followed its rendering. Into the hearts of the listening
soldiers had stolen thoughts of Annies who were christened with all
sorts of names. This Scottish lassie represented all womankind, and
the notes of the song which celebrated her beauty and her virtues
had touched hidden founts of emotion in thousands of men.
The deep silence that followed was broken by the majestic music of
“John Brown.” Then how the camp did cheer, and shout, and howl.
So, for hours, one after another, the bands filled the air with music,
and the soldiers sat, rapt and thrilled, listening and cheering
alternately. The camp-fires faded out, but the concert went on, and it
seems to me I never heard such music, before or since. At least, I
have never so appreciated music; never known it to exercise such a
spell over listeners; never so appreciated its power to thrill and melt
and sway men, as on that far-away autumn night, when the army
rested in the blue-grass meadows of Kentucky, under the silent stars.
Others who speak to-night will, I have no doubt, tell you of marches
and battles, of hardships patiently endured, and of dangers fearlessly
faced. The life of a soldier had many phases. It was not devoid of
pleasure. And this little picture of a delightful camp scene will, I
know, recall memories of hundreds of others, equally entrancing, in
the minds of my auditors.
RESPONSE.
At a banquet to the Press and Modoc Clubs, Topeka, February 28, 1885, in
response to the toast, “Behold how Judicious Advertising has created a great
and prosperous Commonwealth.”

Mr. Chairman: I do not know that the sentiment I am called upon to


respond to, does full justice to Kansas. Judicious advertising is a wise
thing, as the most sagacious and successful business men know. It
draws public attention, and thus multiplies customers. It may even
attract patronage to a humbug, for a brief while. But even advertising
is not able to make a humbug a permanent success.
Kansas has been in the advertising business for thirty years. With
Kansas, everything in the advertising line goes. Kansas, for three
decades past, has been the best advertised spot on the continent. The
border troubles, the civil war, the Price and Quantrill Raids, the
drouths of 1860 and 1874, the grasshopper invasions of the same
years, John Brown, Jim Lane, Indian raids, the Benders, the
Centennial Exposition, prize exhibits at horticultural shows, the
railroads, our flambeaux clubs, the Modocs, Tom Anderson, our
newspapers, cyclones, political and otherwise; the St. John-Legate-
Clarkson controversy; Charley Jones’s banner at Chicago, the
Oklahoma boomers, prohibition, the new judicial districts, the New
Orleans exhibit—all these, and a hundred other things, have
contributed their share toward advertising Kansas.
But behind and above all these inspiring and ephemeral incidents,
wonders, troubles, excitements and personages, there is Kansas,
growing always, not because of these things, but often in spite of
them; prospering, not by their influence entirely, but because Kansas
has nothing that is unsubstantial in her makeup. A fertile soil, a
healthful climate, an intelligent, enterprising and brave people—
these are the enduring foundations on which has been built our great
and prosperous Commonwealth. Kansas is, so to speak, “all wool and
a yard wide.” Kansas is sound in wind and limb. Kansas is the electric
light of the Union. Kansas is the State of great crops, great herds,
great flocks, great railroads, great school-houses, great development
and great prosperity. There is nothing small about Kansas except her
rivers, and these were probably made small because Providence, in
fashioning the State, created a land so rich and goodly that it was
deemed extravagant to waste much of it in big water-courses.
There was a time, years ago, when it was necessary to do a great deal
of advertising for Kansas. But the reputation of the State is now
fixed. First in corn, first in wheat, first in school-houses, and central,
not only in the heart of the continent, but in the hearts of its citizens,
the Kansas man, wheresoever he may wander, is proud of his State,
and advertises, judiciously or in any other way, its attractions and
advantages.
BIRTHDAY OF GENERAL GRANT.
Address, at Topeka, April 27, 1885, at a celebration held in honor of the
birthday of General Grant.

Mr. Chairman, and Fellow-Citizens: The felicitous concurrence of


the birthday of a great American soldier and a great American civic
society at the same date, has, perhaps for the first time, been
generally noted within the past week or so. But hereafter, and
especially in the distant future, it will afford a happy opportunity for
a blending of military and civil celebrations.
The very general and spontaneous celebration of the birthday of a
living man—of a man, too, who occupies no high office, but is simply
one of fifty-five million American citizens—is something unique and
remarkable in this country, if, indeed, it is not in the history of the
civilized world.
But everything in the career of Ulysses S. Grant has been
phenomenal. For years, during the war, thousands doubted whether
he had any military genius. Yet in every position in which he was
placed, he succeeded where others had failed. From Donelson to
Vicksburg, from Vicksburg to Chattanooga, from Chattanooga to the
Potomac, and from the Potomac to Appomattox—everywhere that
this grave, silent, self-controlled man went, he inspired confidence
and organized victory.
He is the only man of our day and generation—perhaps the only man
of any age—who has lived to read the judgment of impartial history
concerning his career and achievements. The receptions given him,
the great honors paid him by princes, potentates and people in every
civilized country during his voyage around the world, voiced the
verdict, not alone of the present, but of the future, concerning
Ulysses S. Grant. What the historian of a hundred years hence may
say of Thomas, or Sherman, or Sheridan, or Meade, we cannot
predict; but what he will say of Grant is determined already by the
universal assent of the civilized world.
I have now and then heard the cynical sneer, “There is nothing so
successful as success,” applied to the achievements of General Grant.
It was fashionable in some quarters, a few years ago, to refer to him
as “an accident of the war.” But I believe that to act with common
sense at all times and under all circumstances, is the very highest
and grandest development of human genius. And this was what
Grant, as a soldier, always did. Read his dispatches, his orders, his
directions to his subordinates, and through them all, in a strong and
steady current, runs the force of an inflexible, well-balanced purpose,
of lofty devotion to duty, of unconquerable courage, of unselfish
patriotism, of dignity without arrogance, of patience, confidence, and
conviction. If this is not greatness, where has there been a clearer
development of the results of greatness?
It is fitting and appropriate, therefore, that this great American
citizen should receive, during his life, such honors and such kindly
remembrance as the celebrations that are taking place to-day
throughout the length and breadth of the land, give expression to. He
has outlived detraction and survived partisan malice and sectional
hate. For weeks the whole country has watched, with moistening
eyes, the bulletins from his sick-room. And now, when a gleam of
hope survives, and there seems to be a chance that the great soldier
may live for years, his countrymen gather by thousands in every
hamlet, town and city throughout the land, and the universal hope
and prayer that goes up from their hearts is: “Long live Ulysses S.
Grant.”
THE STATE UNIVERSITY.
Response to the sentiment, “The University—The Child of the State;”
delivered at the banquet of the Alumni of the State University, Lawrence,
June 9th, 1885.

Ladies and Gentlemen: It probably did not occur to your


Committee, when it selected the sentiment just announced, that the
“Child” has just come of age. But this is the fact. On the 20th of
February, 1863, the Legislature passed an act to establish a State
University, to be located at Lawrence, provided the city gave a site of
forty acres of land and $15,000. In November following, the
Governor issued a proclamation announcing that these conditions
had been complied with. But it was not until the first of March, 1864,
that an act was passed organizing the State University. Hence, as I
have said, this “Child of the State” has just come of age.
In the long, exciting and momentous contest waged by two
civilizations for the fair Territory of Kansas, four Constitutions were
framed—three by the champions of Free Soil; one by the advocates of
Slavery. If the students of the University will examine that admirable
compendium of Kansas history, “Wilder’s Annals,” they can read
these old organic laws, on each of which, for a brief season,
“Humanity with all its fears,
With all the hopes of future years,”

was hanging. And I think a reading of just one article of each—that


on education—will largely explain why the one civilization triumphed
over the other, first in Kansas and then throughout the Union. In
each of the three Constitutions which represent the aspirations, ideas
and purposes of the Free-State men, the Legislature is required to
make the most ample provisions for public education. The old
Topeka Constitution, framed in 1855, declared that “the Legislature
shall secure a thorough and efficient system of common schools, and
establish a University.” The Leavenworth Constitution, framed in
1858, makes it the duty of the State to establish “a system of free
schools, in which every child of the State shall receive a good
common-school education,” and also educational institutions of
higher grade, including a University. And the Wyandotte
Constitution, framed in 1859, makes it the duty of the Legislature to
establish “a uniform system of common schools, and schools of
higher grade, embracing normal, preparatory, collegiate and
university departments;” and, in another section, requires the
establishment of a State University “for the promotion of literature
and the arts and sciences.”
It is noticeable, too, that these three Constitutions indicate a growing
sentiment in favor of public education, that of 1858 embodying far
more definite and mandatory requirements than the one framed in
1855, and that of 1859 being even more specific, exacting and
peremptory than the Constitution of 1858. The educational article of
the Topeka Constitution includes four sections, and occupies only
fifteen lines in the “Annals;” the same article in the Leavenworth
Constitution embraces nine sections, occupying thirty-three lines;
and in the Wyandotte Constitution the educational article includes
nine sections, occupying forty-seven lines.
On the other hand, the article on education in the Lecompton
Constitution—the only organic law framed by the advocates of
Slavery—is ambiguous in language and feeble in direction. It is
permissive rather than mandatory. Its five sections occupy but
seventeen lines, and require only that “schools and the means of
education” shall be “encouraged by the State,” and that the
Legislature shall establish “one common school in each township”—
that is, one for every 23,240 acres of land! This would give the
county of Douglas fourteen schools! It now has nearly one hundred.
No requirement for schools of higher grade, nor for a University, is
embodied in the article.
It is not strange that the contest between these two civilizations
resulted as it did. Although the one was sustained by all the power
and authority of the National Government, the other had Education
as its ally, and made Intelligence the most important stone in the
foundation of the State. The men who brought Freedom to Kansas
brought in her train the school and the printing press. Fighting
Slavery, they fought Ignorance also; upholding Liberty, they upheld
her true friend and ally, Learning.
The crowning glory of Kansas, from that day to this, has been her
schools, embracing those of every grade, from the rude dug-out on
the lonely frontier to the stately buildings on Mount Oread. These
bright children of the State are her jewels, and she can point to them
with a pride equaling that of the Roman mother. For they are worthy
of her, as she is of them—worthy of her love and fostering care, as
well as of her pride.
There is, occasionally, complaint that the State is not liberal in the
appropriations made for the University. But the figures, I think, will
not justify this assertion. In 1866 they amounted to $7,000; in 1876
they aggregated $22,519; while for the year 1886 they reach a total of
$63,000. Kansas is young, and has not yet accumulated vast wealth.
But surely such allowances as these do not indicate indifference to
the welfare of her Child. It is not yet nineteen years since the first
building for the University was completed, and the Institution, at
that time, had only four students enrolled. Less than thirteen years
ago the present main building was occupied, and 239 students were
in attendance. During the year just closed, 521 students were
enrolled. The growth of the University, it will thus be seen, has kept
pace with that of the State. So it will continue in the future. And as
Kansas is destined to be the greatest of American States, the
University, her Child, will in time rank first among American
institutions of learning.
I can fairly and truly say, too, that this Child of the State has a pretty
large family of bright, intelligent children-young men and women
who proudly hail it as their Alma Mater. One meets them, now, in
nearly every section of the State, engaged in almost every honorable
calling—the law, journalism, medicine, commerce, education. One of
the graduates of the University is, for the first time, a member of its
Board of Regents. During a rather extended tour I made through the
State, last year, I found them scattered far and wide, and I am glad to
say that wherever I met them I heard good reports of their conduct.
The air on Mount Oread is pure; the winds here are strong and free;
and the young Kansans who have marched down from these heights
to engage in the battle of life are active, stirring citizens, not only
doing honor to their Alma Mater, but contributing their full share to
the good work of making Kansas a strong, pure, liberty-loving, law-
respecting, and preeminently intelligent American commonwealth.
If this good record is maintained as the years go by, no friend of the
University need fear that it will not continue to grow in the helpful
esteem and confidence of a generous people. For after all, the rank
and value of this Institution will be measured, not by the size of its
buildings, nor by its collection of books and apparatus, nor even by
the eminence of its Faculty, but by the conduct and careers of those
whose intellects and characters have been trained and formed under
its direction and discipline. And if each year adds to the number of
young men and women who, going from these halls into the every-
day walks and ways of human endeavor and duty, win for themselves
honorable and respected names, the reflected lustre of their
usefulness and exaltation will shine upon this building as does the
sun in his daily journey—the glad morning of their triumphs bathing
it with brightness, the full noontide of their worth and renown
flooding it with warmth and splendor, and the majesty of their
declining years shedding upon it the gratitude of a reverent
benediction.
THE STATE NORMAL SCHOOL.
Address to the graduating class of the State Normal School, delivered at
Emporia, June 11, 1885.

Mr. President, and Ladies and Gentlemen: In one sense, at least,


the State Normal School is the most important of our higher
educational institutions. The others educate, each year, a number of
individuals, and necessarily a limited number, who are, individually,
to fill various positions on life’s battle-field. The State Normal
educates the educators, and thus by its influence, its system, its
method and thought, reaches and shapes the minds of many
thousands. There were, last year, 8,342 teachers in the public schools
of Kansas, and they controlled and instructed an army of 308,600
children—an army larger than Grant, or Napoleon, or Wellington
ever commanded; an army far more difficult to direct than were
theirs; an army whose drill, discipline and instruction will exercise,
through all the coming years, a larger and a far more important
influence over the material and intellectual well-being of humanity
than did the victories of these great commanders.
The office of teacher has not, until late years, been regarded as other
vocations are. Men were educated in law, or medicine, or theology, or
learned the trades of craftsmen, because they expected to make
practical use, during their life-time, of the knowledge and skill they
acquired. But men and women drifted into the school-room as
teachers—and in too many cases still do so—not because they
expected to make teaching their business, but because, for the time
being, they could find nothing else to do. Many of these teachers
were and are, undoubtedly, well qualified for educational work;
many of them have achieved marked success in this work, and,
growing to like it, have continued in it. But many others, and far the
largest number, I fear, of those who engage in teaching as a mere
temporary make-shift, do not fairly earn even the poor salaries they
are paid. No one can succeed at anything if he does not put his heart
and mind into his work. “Whatsoever thy hand findeth to do, do it
with thy might,” is a lesson which the teacher must take to heart, or
his or her teaching will come to naught.
And surely there can be no more important work than that of an
educator in the schools. Year by year this fact is strengthening in the
public mind, and as a result the teacher is growing in public
appreciation and pecuniary value.
The underlying spirit, the clear purpose of the State Normal, is not to
educate lawyers, or doctors, or ministers, or tradesmen, but to
educate, train and fit men and women for the profession of public
educators. They who enter this Institution with any other purpose in
view, are guilty of a fraud on the generosity of the State. The General
Government educates young men, at West Point and Annapolis, for
the army and navy. There is no law which compels them, after
graduation, to enter either branch of the service. But there is an
unwritten code which, appealing to their personal honor, is stronger
than any statute, and which compels these graduates of the Nation’s
schools to serve two years in its army or navy. They may then resign,
but in the event of war, they must promptly tender their services to
the Government.
Some such code of ethics should govern graduates of the State
Normal. They are educated by the State, as teachers, for the purpose
of elevating the standard and qualifications of its public educators,
and they should feel in honor bound to fulfill this implied personal
obligation.
And surely there can be no nobler ambition than to be a really great
teacher—such a teacher, for example, as Arnold of Rugby, or Horace
Mann. To rule and shape human minds, to mould and fashion
children and youth for the highest and noblest duties of life—is not
this a work which should enlist in its service the best heart and brain
of all the land?
Last year, in a quiet hamlet in Pennsylvania, an old man died. For
more than sixty years he had been a teacher. He had taught in nearly
every district of the county where his long and useful life was spent,
and half the men of that county, under sixty years of age, have been
his pupils. More fully than any other person I have ever known, he
was my ideal of what a school master should be—the controlling
spirit of a school; its master literally, as well as in name; a firm,
strong, just man, encouraging the diffident, punishing the vicious,
and inspiring all. Fully six feet in stature, angular, with immense
reach of arms, large hands, a noble height and breadth of forehead,
and steel-gray eyes sparkling under bristling eye-brows, the heaviest
that ever adorned a human face—he was, in the school-room, a
formidable figure. Even the later-day “hoodlum,” with his reckless
impudence, would have regarded him with awe. He was a strict
disciplinarian. He had no mawkish sentimentality about corporal
punishment. He delighted, I think, to deal with a vicious, disobedient
boy—one of the half-animal and wholly perverse kind, as full of
cruelty and meanness as an egg is of meat. When one of this class
was enrolled among his pupils, it was wonderful how soon all the
perversity of his nature was reduced to subjection.
Yet this old master was not a school-room tyrant. The well-disposed
among his pupils held him in affectionate regard, and even the
turbulent respected the justice of his decisions and the firmness and
sincerity of his rule. He did not take pleasure in inflicting pain. He
“trounced” a bad or unruly boy because he regarded trouncing as a
necessary and wholesome discipline, which would make him a better
man and a better citizen. And the punishments he inflicted were
rarely, if ever, undeserved. He was as just as he was stern.
As an instructor, he had mastered the branches he taught. He rarely
held a book in his hand while hearing a class. With the range of text-
books then in use, he was thoroughly familiar. Every rule or principle
or fact they contained was at his tongue’s end. He had a real love for
his work, and an affectionate interest in the progress of his pupils.
The old, weather-beaten brick school house on the “Commons,” with
its rude pine desks and benches, whittled by the jack-knives of more
than one generation of boys, and its painted black-board on the wall,
was the soul of his earthly interests and ambition.
Amid such surroundings he lived for more than sixty years, engaged
in a laborious, often perplexing and wearisome, but always useful
work. He sent out into the world thousands of men, disciplined,
instructed and moulded by his firm but kindly hands—men who are
scattered, to-day, from ocean to ocean, and many of whom have
achieved the most distinguished success in life. For among his pupils
were James G. Blaine, Senator McMillan, of Minnesota, ex-
Congressman Townsend, of Ohio, and a host of others eminent in
law, in medicine, in literature, and in business.
He reached a venerable age, dying at eighty-four. And I am sure that
his pupils, wheresoever they had wandered, received the news of his
death with profound sorrow. For the mention of his name would call
up a thousand recollections of him—of his tall, athletic person, of his
massive head and shaggy eye-brows, of his homely but intellectual
face and his keen and kindly eyes, of his quick, firm, dominating
voice, and of his relish for every physical as well as mental
enjoyment. For the stern master of the school-room was, on the
“Commons,” a boy with the boys—the surest catch, the strongest
hand at the bat, and the swiftest runner of them all. Remembering
Master Joshua V. Gibbons thus, is it strange that his old pupils,
grown to manhood and scattered far and wide, should hold his
memory in reverent and tender recollection?
I sincerely hope and trust that the Normal will send out hundreds of
teachers who, though they may lack the ample physical powers of
Master Gibbons, will possess, in full measure, his strong will and just
judgment, his admirable perspicuity and precision as an instructor,
his wide range of information, and, above all, his ardent, inspiring,
never-flagging love for his work. The influence of even a dozen such
teachers, scattered throughout Kansas, would amply repay the State
for all the expenditures it has ever made in behalf of this Institution,
and spread far and wide the reputation of the Normal as a deserving
and useful training school for educators.
GENERAL GRANT—MEMORIAL
ADDRESS.
[At Atchison, Kansas, on Saturday, August 8, 1885, the memorial exercises in
honor of General Grant were participated in by all the civic societies,
including the Grand Army of the Republic, Knights of Pythias, Ancient
Order of United Workmen, Catholic Knights of America, Independent
Order of Odd Fellows, Knights of Labor, Irish Benevolent Society, and
others. After the funeral parade, fully five thousand people gathered at
Turner Hall Garden. Mayor Samuel H. Kelsey presided, and addresses were
delivered by Gov. John A. Martin, and Col. Aaron S. Averest. The address of
Gov. Martin is as follows:]

Mr. Chairman, and Ladies and Gentlemen: I appear before this


audience with more than ordinary distrust and solicitude. Keenly
sensible, at all times, of my deficiencies as a speaker, this
consciousness is intensified by the reflection that I am to speak, to-
day, of one who is enshrined in the hearts of the American people as
no other man, except Washington or Lincoln, ever was; of one whose
fame, like the sunlight, flooded all the world, and whose example will
warm patriotic hearts and stimulate noble ambitions until the end of
recorded time.
And how can I describe, as all men knew him, the great soldier who
was to-day borne to his last resting-place with a great Nation as his
sorrowful mourners, and the funeral bells of the civilized world
tolling the universal sympathy of the brotherhood of men? How can I
fittingly testify the tender affection, the reverent respect in which the
loyal people of Kansas held Ulysses S. Grant? How can I give
expression to the feeling of bereavement which shadows every home
and hearth in this great Commonwealth, where live a hundred
thousand men who, during the dark days of the civil war, gladly and
proudly hailed him as their commander, and made him heir to the
honor and glory their valor and patriotism, directed by his
consummate ability, had won for the Nation?
The North, at the outbreak of the civil war, was like a blind giant. Its
strength was at once revealed. Never before, in any age or country,
had there been such a magnificent uprising as was that following the
attack on Sumter. From country fields and city workshops, from
schools, offices, and marts of commerce, a great host—the very
blossom and flower of the youth and manhood of the land—swarmed
to the recruiting stations, eager to dare and suffer all things for the
cause of the Republic. But leaders were lacking. Engrossed in
business, and devoting all its energies to the arts and industries of
peace, the loyal North had drawn many of its trained soldiers into
civil pursuits, where they had been swallowed up in the rush and
clangor of commerce. The South had kept many of its brightest
intellects in the army, where such men as Albert Sidney Johnson,
Robert E. Lee, Joseph E. Johnston, and many others equally
brilliant, held high positions. These men at once cast their lot against
the Nation that had educated them. And the Republic, thus deserted
by the soldiers it had trained, groped blindly through many months
of sore disaster, waiting for the leaders who were to direct its heroic
armies to final victory.
How slow and torturing the waiting was. How many popular heroes
were discovered, and worshipped with passionate devotion for a brief
time, only to be revealed, at last, as common clay. But through all
these dreadful days, the men who were to lead the Nation to
complete triumph were making their way, slowly but surely, to their
destined places. At Belmont, in November, 1861, a silent, modest
man, just promoted to a Brigadier-Generalship, had fought a battle
which gave confidence and courage to the troubled country. At Mill
Springs, two months later, another quiet, manly soldier, had won a
signal victory over a superior force. In Kentucky, still another soldier
was winning confidence and respect by the energy and sagacity of his
operations; and a fourth, unknown and unnoted, was looking after
the commissary wagons of an army in Arkansas.
It is a notable fact that these four men, who were destined, at the
close of the war, to be its recognized leaders, began their service in
the West, and that they severally represented the cosmopolitan blood
of the American people—Grant being of Scotch ancestry, Sherman of
Saxon origin, Thomas springing from the Welsh race, and Sheridan
coming of Irish stock. Differing widely in characteristics and
temperaments, they not only supplemented each other admirably,
but each had the firmest confidence in the resources, skill and
courage of all the others. Envy or jealousy never distracted them. The
same resolute purpose, the same ardent patriotism, the same
devotion to duty, animated them all, and each could confidently rely
on the support of all the others.
I do not intend, however, to draw comparisons of their several
careers, nor of their personal characteristics. I mention their
association because it happened that he who was the chief of this
group of great soldiers was, perhaps, the first to clearly recognize the
greatness of his associates, and to assign them to the positions in
which they filled the continent with the splendor of their
achievements. For it was Ulysses S. Grant who designated William T.
Sherman as commander of the Army of the Tennessee, placed
George H. Thomas at the head of the Army of the Cumberland, and
selected Philip H. Sheridan as chief of cavalry of the Army of the
Potomac.
Two of these great soldiers yet survive; two have answered their last
roll-call on earth. And here, as in every city, town and hamlet
throughout the land, the people have assembled to honor the
memory of the most distinguished of this group—Ulysses S. Grant.
“There are a few characters,” says Macaulay, “which have stood the
closest scrutiny and the severest tests; which have been tried in the
furnace and have proved pure; which have been weighed in the
balance and not found wanting; which have been declared sterling by
the general consent of mankind, and which are visibly stamped with
the image and superscription of the Most High.” Such a character, it
seems to me, was Ulysses S. Grant. From the day he won his first
victory at Belmont until he sank to rest at Mt. McGregor, he lived in a
light as fierce as that which beats upon a throne. For eight years, he
was a soldier; for eight years, the President; and ever since, until the
day of his death, the First Citizen of the Republic. What he said or
left unsaid, what he did or left undone, during all those years, was
noted by busy tongues and pens, many of them envious, many of
them hostile, and many more, inspired by that strange perversity of
human nature which rejoices to find some weakness, or flaw, or stain
in a great man, anxious and eager to catch him doing something
mean or unworthy.
And through it all—through the fierce and dangerous fields of war,
through the still more perplexing and dangerous fields of politics,
and through the trials and temptations of a citizenship so elevated
that its very height was dazzling—he moved on, serene, patient,
inflexible, unstained. He disarmed partisan malice at last as he had
disarmed Pemberton at Vicksburg; he triumphed over the rancor and
enmity of civil life as he had routed Bragg at Mission Ridge; and
finally, and before his death, all the warring factions of the land,
North and South, East and West, surrendered to him their willing
allegiance, as did Lee at Appomattox.
The changes in the popular estimate of Grant’s character and
abilities were as remarkable as everything else in his wonderful
career. It was years before the carping military critics of the world
would concede that he was a great soldier. He won his victories by
accident, they said; he was a butcher; he was a drunkard; he was a
figure-head for Sherman, Thomas, and Sheridan, who planned his
campaigns. All this they said, as he swung across the continent from
Donelson to Vicksburg, from Vicksburg to Chattanooga, from
Chattanooga to Appomattox, conquering, in turn, every great soldier
of the Confederacy; leaving behind him, everywhere, campaigns and
victories as brilliant and complete as any Napoleon ever planned or
won; always equal to the greatest emergencies, always ready for any
contingency, and always master of every occasion.
Suddenly, from the army he was transferred to another and an
untried field, and became the head of the civil government of the
country. The critics derided, the cavilers sneered, the weeping
Jeremiahs of politics bewailed. This was monstrous, they said. This
“sashed Sphinx” knew nothing of civil affairs; this “man on
horseback” was dangerous to the liberties of the country; this
“ambitious Cæsar” meditated an empire. But the people trusted
Grant in civil life, as his army had trusted him in war. Their faith in
his integrity, in his patriotism, in the strong, clean fiber of his sturdy
manhood and his sterling honesty, never for one moment hesitated
or wavered. And it was never disappointed. He justified their faith by
his works. The triumphs he won in the field of political economy
were as conspicuous and complete as those he won in war. Upon the
civil history of the country he left a record as brilliant and as lasting
as was the record of his services as a soldier.
I know that there are some who still insist that he was not a
statesman. But statesmanship, I take it, is nothing more or less than
the genius of common sense applied in civil government. It is
illustrated by what the Americans call “level-headedness” in
emergencies; by the judicial quality of seeing both sides, or all sides,
of any question, and doing the right and the just thing in dealing with
it; by clear comprehension of the ultimate effects of any policy; by
courage in withstanding popular clamor, and even in braving public
distrust and denunciation, when such clamor, distrust or
denunciation is inspired by ill-regulated zeal for a good cause, or
unreasoning devotion to a bad one, or by the arts of selfish and
ambitious demagogues.
And surely Grant was endowed, in full measure, with these qualities
of statesmanship. He was called to the Presidency during one of the
stormiest and most perplexing epochs in the history of our
government. The honest payment of the public debt; that strange but
contagious delusion, the inflation of our paper currency; the
settlement of the claims of this country on Great Britain, for damages
inflicted by privateers sent out from English ports during the war;
the enfranchisement of the Freedmen, and their protection in the
enjoyment of the rights conferred upon them by the Constitution; the
reorganization of the States lately in the Rebellion; the policy of
Indian control and management; the resumption of specie payments
—all these great questions, vitally affecting not only the peace and
prosperity of the Nation, but the happiness and welfare of all classes
of its citizens, Grant was called upon, as the Executive head of the
civil government, to discuss and to decide.
Did he falter, or fail, or blunder in dealing with any of them? Read
his messages to Congress, and his State papers, in the light of
subsequent results, and make answer. His opinions were not only
maintained with vigor and courage, but they were defended with
logical directness. His insight was as penetrating and his judgment as
comprehensive, as his courage was exalted; and time and events have
demonstrated not only the honesty and purity of his purposes, but
the clearness and sagacity of his mind.
Retiring from the Presidency, he made a tour around the world, and
was received everywhere with such honors and enthusiasm as had
never before greeted a private citizen. Emperors and kings, great
statesmen and great soldiers, were proud to do him homage, and the
peoples of every race and tongue, thronging to see him, testified their
appreciation of his exalted services in behalf of human liberty and
popular government. And in every presence, under all circumstances,
he remained the same unostentatious, sincere and modest man, as
undazzled by his eminence as he had been patient in his obscurity.
But the firm fiber of his manhood, it seems to me, had never been so
clearly revealed as it was during the last year of his life. Suddenly,
and in his old age, his competency was swept away, and an insidious
disease fastened upon him. Trusting, with characteristic confidence
—for he was so incapable of guile or hypocrisy that he never
suspected it in others—he was betrayed, and reduced to penury.
Without a murmur he gave up everything, not even reserving the
trophies and mementoes presented to him by the people of this and
other countries. Then, slowly dying, and knowing that death was
inevitable, he calmly measured every moment of his ebbing life, and
set about his last work. Like Sir Walter Scott, but under many more
and far greater difficulties, he became an author in order to repair
the wreck of his fortune, and has left behind him a book which will
be read by more people than any other volume, except the Bible, that
has ever been printed. That his Memoirs will be worthy of his fame,
the brief extracts already published conclusively prove. In the field of
literature as well as in those of war and of statecraft, he was
unconsciously great. He wrote pure, compact, direct and vigorous
English. He had the rare faculty of condensing a volume of meaning
in a sentence, and of presenting scenes and events with masterly
completeness of detail and richness of color.
His book completed, he calmly and patiently awaited the inevitable
hour. His last days were as serene as those of his most prosperous
years. His courage never faltered. He was patient, gentle, thoughtful
of others. “Let no one be distressed on my account,” seemed to be the
burden of his thoughts, as it was of the last words his feeble fingers
traced on paper. He sent messages of thankfulness and good-will to
all. He looked death in the face and did not quail. And so, preserving
to the end the simple manhood of his life, his brain unclouded and
his heart filled only with loving-kindness and serene content, he
drifted away, quietly and peacefully, into the unknown sea that flows
round all the world.
The lesson of his life is a lesson for all the generations of men, for it is
a lesson of encouragement to the poor, of hope to the unknown, of
comfort to the despairing, and of inspiration to the brave, the loyal,
the honest and the true-hearted. He had risen from obscurity to the
sun-bright heights of fame. He knew the bitterness of want, and the
despair of friendlessness. He became the commander of the greatest
army ever mustered on the earth, the executive head of the Nation,
the familiar associate of the great and powerful of every land. But he
never lost his poise, his self-control, his modest dignity, or his manly
worth. He lived down, during his lifetime, every calumny and every
hate. The party that had denounced, assailed and opposed him,
became at last his eulogist. The foemen he had conquered in war
became his friends and mourners. And to-day, with reverent sorrow,
the civilized world stands uncovered around his grave.
The impress he left upon the age in which he lived can never be
effaced. He wrought, during his life, without a thought of dramatic
effect, yet his career was crowded with the most dramatic events.
There was little of romantic feeling in his nature, yet his life was so
wonderful that the story of it will have all the charm of a romance.
His bulletins and orders, as a soldier, were never rhetorical, yet they
have in them the thunder of cannon and the shouting of the captains.
He was never noisily self-assertive; he accepted his appointed place,
whether high or low, with equal complacency, and there did his
whole duty. In the purity of his life, in the unselfishness of his
patriotism, and in the firmness of his action, he resembled George H.
Thomas, and to these qualities he added the prompt, bold and
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like