Download Complete Data Storytelling with Generative AI using Python and Altair MEAP V05 Angelica Lo Duca PDF for All Chapters
Download Complete Data Storytelling with Generative AI using Python and Altair MEAP V05 Angelica Lo Duca PDF for All Chapters
com
https://ebookgate.com/product/data-storytelling-with-
generative-ai-using-python-and-altair-meap-v05-angelica-lo-
duca/
OR CLICK HERE
DOWLOAD NOW
https://ebookgate.com/product/scylladb-in-action-meap-v05-bo-ingram/
ebookgate.com
https://ebookgate.com/product/storytelling-with-data-1st-edition-cole-
nussbaumer-knaflic/
ebookgate.com
How Machine Learning Works MEAP V05 Mostafa Samir Abd El-
Fattah
https://ebookgate.com/product/how-machine-learning-works-
meap-v05-mostafa-samir-abd-el-fattah/
ebookgate.com
https://ebookgate.com/product/data-science-fundamentals-with-r-python-
and-open-data-1st-edition-marco-cremonini/
ebookgate.com
The Complete Obsolete Guide to Generative AI 1st Edition
David Clinton
https://ebookgate.com/product/the-complete-obsolete-guide-to-
generative-ai-1st-edition-david-clinton/
ebookgate.com
https://ebookgate.com/product/data-mining-with-python-theory-
application-and-case-studies-1st-edition-di-wu/
ebookgate.com
https://ebookgate.com/product/practical-sql-a-beginner-s-guide-to-
storytelling-with-data-2-converted-edition-anthony-debarros/
ebookgate.com
https://ebookgate.com/product/prompt-engineering-for-generative-ai-
future-proof-inputs-for-reliable-al-outputs-1st-edition-james-phoenix/
ebookgate.com
Data Storytelling with Generative AI
1. welcome
2. 1_Introducing_Data_Storytelling
3. 2_Running_your_first_data_story_in_Altair_and_GitHub_Copilot
4. 3_Reviewing_the_basic_concepts_of_Altair
5. 4_Generative_AI_Tools_for_Data_Storytelling
6. 5_Crafting_a_data_story_through_the_DIKW_Pyramid
7. 6_From_Data_to_Information:_Extracting_insights
8. 7_From_Information_to_Knowledge:_Building_textual_context
9. 8_From_Information_to_Knowledge:_Building_the_visual_context
10. 9_From_Knowledge_to_Wisdom:_Adding_Next_Steps
11. 10_Publishing_the_Data_Story
12. Appendix_A._Technical_Requirements
13. Appendix_B._Python_Pandas_DataFrame
welcome
Thank you for purchasing the MEAP for AI-Powered Data Storytelling. This
book combines three fundamental elements: Data Storytelling, Python, and
Generative AI to guide you toward building engaging data stories.
Data Storytelling is the main focus of this book. Many good books exist on
the market about this topic, especially focusing on the theory of data
storytelling. This book, instead, describes a practical approach to elevate your
basic data visualization skills and transform you into a data storyteller. In this
book, you will use the Data-Information-Knowledge-Wisdom (DIKW)
pyramid as a practical method to transform simple data visualization into data
stories. When I met the DIKW pyramid some years ago, I fell in love with it,
and since then, I have been using it as a teaching method for my students.
Last but not least, you’ll learn how to use Generative AI tools for data
storytelling. This book won’t focus on Generative AI concepts and theory.
Instead, you will learn how to apply Generative AI tools, including GitHub
Copilot, ChatGPT, and DALL-E, to data storytelling.
To benefit most from this book, you’ll want to have some basic experience in
Python and basic knowledge about Pandas and data visualization. Even if you
don’t have such basic knowledge, you can still read this book, assimilating
the basic concepts of data storytelling and then using them with other tools or
programming languages.
I hope you find it as useful to read as I did to write it. Please be sure to post
any questions, comments, or suggestions you have about the book in the
liveBook discussion forum. Your feedback is essential in developing the best
book possible.
—Angelica Lo Duca
In this book
Figure 1.1 The data science flow from the data scientist’s perspective (on the left) and the
audience’s perspective (on the right)
Data storytelling can help data scientists and analysts to present and
communicate data to an audience. You can think of data storytelling as the
grand finale of the data science life cycle. It entails taking the results of the
previous phases and transforming them into a narrative that effectively
communicates the results of data analysis to the audience. Rather than relying
on dull graphs and charts, data storytelling enables you to bring your data to
life and communicate insights compellingly and persuasively.
More formally, data storytelling builds compelling stories supported by data,
allowing analysts and data scientists to present and share their insights
interestingly and interactively. The ultimate goal of data storytelling is to
engage the audience and inspire them to make decisions. In some cases,
including business scenarios, you do not start from data but from a narrative
or a hypothesis you have in mind and then search for data that confirm or
negate it. In this case, you can still have data storytelling, but you must pay
attention not to alter your data to support your hypothesis. Brent Dykes, a
well-known consultant in storytelling training, suggests: Whenever you start
with the narrative and not the data, it requires discipline and open-
mindedness. In these scenarios, one source of risk will be confirmation bias.
You will be tempted to cherry-pick data that confirms your viewpoint and
ignore conflicting data that doesn’t (Dykes 2023). Remember to build your
data stories on accurate and unbiased data analysis. In addition, always
consider the data you are analyzing.
Some time ago, I had the opportunity to work on a cultural heritage project
where I had to automatically extract entities from the transcripts of a registry
of names dating back to around 1700-1800. The goal was to build a database
with information about the people in the register, such as name, surname,
date of birth, date of death, etc. Sitting at my computer, I implemented my
software, built the table with all the names, and calculated and visualized data
statistics, such as the most frequent names, the number of births per year, etc.
The project also involved linking these people to their graves to build an
interactive cemetery map. At some point in the project, I had the opportunity
to visit the cemetery. As I walked through the cemetery, the rows upon rows
of headstones made me stop. It hit me like a ton of bricks - every name
etched into those stones represented a life. Suddenly, the numbers and
statistics I had been poring over in my data sets became more than just data
points - they were the stories of real people. It was a powerful realization that
changed the way I approached my work. That's when I discovered the true
power of data storytelling. It's not just about creating fancy graphs and charts
- it's about bringing the people behind the data to life. We have a mission to
give these people a voice, to ensure that their stories are heard. And that's
exactly what data storytelling does - it gives a voice to people often buried
deep within the numbers. Our mission as data storytellers is to bring these
stories to the forefront and ensure they are heard loud and clear.
In this book, you’ll learn two technologies to transform data into stories:
Python Altair and Generative AI tools. Python Altair is a Python library for
data visualization. Unlike the most known Python libraries, such as
Matplotlib and Seaborn, Altair is a declarative library where you specify only
what you want to see in your visualization. This aspect is beneficial for
quickly building data stories without caring about how to build a
visualization. Altair also supports chart interactivity so that users can explore
data and interact with it directly.
Generative AI is the second technology you’ll use to build data stories in this
book. We will focus on ChatGPT to generate text, DALL-E to generate
images, and GitHub Copilot to generate the Altair code automatically. We
chose to use GitHub Copilot to generate code and not ChatGPT because
Copilot was trained with domain-specific texts, including GitHub and
StackOverflow codes. Instead, ChatGPT is more general purpose. At the time
of writing, Generative AI is a very recent technology, still in progress, that
translates a description of specifications or actions into text.1.2 Why Data
Visualization Alone Is Not Enough
Data storytelling is about more than just communicating data. It's about
inspiring your audience and inviting them to take action. Good data
storytelling requires a mix of art and science. Art comes in finding the right
story, while science understands how to use data to support that story. When
done well, data storytelling can be a potent tool for change. In this section,
we’ll briefly cover three fundamental questions about data storytelling.
Data Storytelling allows you to fill the gap between simply visualizing data
and communicating it to an audience. Data storytelling improves your
communication skills and standardizes and simplifies the process of
communicating results, making it easier for people to understand and
remember information. Data storytelling also helps you learn to communicate
more effectively with others, improving personal and professional
relationships.
Focus on the message you want to communicate and make data more
understandable and relatable
Communicate your findings to others in a way that is clear and
convincing
Connect with your audience on an emotional level, which makes them
more likely to take action
Make better decisions by helping you understand your data more deeply.
Writing Reports
Imagine you must write a sales report for a retail company. Instead of
presenting raw numbers and figures, you can weave a data story around the
performance of different product categories. Start by identifying the most
crucial aspects of the data, such as the top-selling products, emerging trends,
or seasonal fluctuations. Then, use a combination of visualizations,
anecdotes, and a logical narrative flow to present the information.
You can build a story around your data, such as introducing a problem,
building suspense, and concluding with actionable recommendations.
When writing reports, use data storytelling to highlight the most important
parts of your data and make your reports more engaging and easier to
understand.
Doing Presentations
When doing presentations, use data storytelling to engage your audience and
help them understand your message better.
Building Dashboards
Let's imagine you are developing a sales performance dashboard for a retail
company. Instead of presenting a cluttered interface with overwhelming data,
focus on guiding users through a narrative highlighting key insights.
Having covered the questions of when to use data storytelling, what problems
it can solve, and what makes it unique, we're now ready to consider questions
relating to our two tools: Python Altair and Generative AI tools. We will do
that in the next section.
The challenges of creating data stories involve two key factors: time and
teamwork. Investing in these areas is crucial to captivate audiences and
effectively communicate insights.
For example, to plot a line chart using Matplotlib, you must specify explicitly
the x and y coordinates, set the plot title, labels, and customize the
appearance, as shown in Listing 1.1.
plt.plot(x, y)
plt.title('Square Numbers')
plt.xlabel('X')
plt.ylabel('Y')
plt.show()
The chart builds a line chart in Matplotlib. You must define the single steps
to build the chart: 1) set the title, 2) set the x-axis, 3) set the y-axis.
chart = alt.Chart(df).mark_line().encode(
x='x',
y='y'
).properties(
title='Square Numbers'
)
The chart builds a line chart in Altair. You must define the chart type
(mark_line), the variables, and the title.
Combining Python Altair and Generative AI tools will enable you to write
compelling data stories more quickly directly in Python. For example, we can
use Copilot to assist us in generating the necessary code snippets, such as
importing the required libraries, setting up the plot, and labeling the axes. In
addition, Copilot's contextual understanding helps it propose relevant
customization options, such as adding a legend or changing the color scheme,
saving us time and effort in searching for documentation or examples.
While generative AI tools are still at their early stages, some promising
statistics reveal they increase workers' productivity. A study by Duolingo,
one of the largest language learning apps, reveals that the use of Copilot in
their company has increased developers’ speed of 25% (Duolingo and
GitHub Enterprise 2022). Compass UOL, a digital media and technology
company, run another study by asking experienced developers to measure the
time it took to complete the use-case task (analysis, design, implementation,
testing, and deployment) during three distinct periods: before AI, utilizing AI
tools available until 2022, and employing new generative AI tools such as
ChatGPT (Compass UOL 2023). Results demonstrated that developers
completed the tasks in 78 hours before AI; 56 hours with the AI used through
2022, and 36 hours with the new Generative AI. Compared to the Pre-AI era,
there is an increase in speed of 53.85% with the new Generative AI (Figure
1.4).
1.2.1 The Benefits of Using Python in All the Steps of the Data
Science Project Life Cycle
Many data scientists and analysts use Python to analyze their data. Thus it
should be natural to build the final report on the analyzed data still in Python.
However, data scientists and analysts often use Python only during the
central phases of the data science project life cycle. Then they move to other
tools, such as Tableau and Power BI, to build the final report, as shown in
Figure 1.5. This means adding other work, which includes exporting data
from Python and importing them into the external application. This
export/import operation in itself is not expensive, but if, while building the
report, you realize that you have made a mistake, you need to modify the data
in Python and then export the data again. If this process is repeated many
times, there is a risk of significantly increasing the overhead until it becomes
unmanageable.
Figure 1.5 In the traditional approach, data scientists use different technologies during the phases
of the data science project life cycle
This book enables data scientists and analysts to run each step of the data
science project life cycle in Python, filling the gap of exporting data to an
external tool or framework in the last phase of the project life cycle, as shown
in Figure 1.6.
Figure 1.6 In the approach proposed in this book, data scientists use the same technology during
all the phases of the data science project life cycle
The advantage of using Python Altair and Generative AI for data storytelling
is that programmers can build their reports even during the intermediate
stages of their experiments without wasting time transferring data to other
tools such as Tableau or Power BI.
Figure 1.7 Introducing Generative AI in the data presentation phase helps you to build better
charts in less time, enabling the audience to understand your message
Having discussed the benefits of the tools of choice in this book, we should
also briefly discuss contexts in which these tools are not as effective.
Altair enables you to build charts with datasets with 5,000 rows at maximum
quickly. If the number of rows exceeds 5,000, Altair still builds the chart, but
it’s slower.
For complex data analytics, use more sophisticated analytics platforms, such
as Tableau and Power BI.
In addition, consider that you should pay a fee to use Generative AI tools, so
do not use them if you do not have a sufficient budget.
The DIKW pyramid provides macro steps to transform data into knowledge,
following other intermediate steps, which include information and
knowledge.
Figure 1.8 The DIKW pyramid
This book describes how to use the elements of the DIKW pyramid as
progressive steps to transform your data into compelling data stories. This
idea is not new in data storytelling; Berengueres et al. proposed this approach
(Berengueres 2019). The novelty of this book is the combination of the use of
the DIKW pyramid, Python Altair, and Generative AI. In this section, we will
introduce the fundamentals of DIKW that will be applied throughout this
book, and we’ll see how to climb each level of the pyramid.”
The organizers of an event dedicated to pets are collecting the type of pets
that will participate. For each pet category, the organizers advertise the event
on specific websites dedicated to that category. The organizers ask you to
build a quick report about the current situation. The following table shows the
number of participants and the number of advertised websites divided by
type.
Dog 130 28
Other 17 147
First, you focus on the number of participants. and build the following bar
chart.
Figure 1.9 A bar chart showing the number of pets participating in the event
With respect to Table 1.1, Figure 1.9 does not add any meaning. It’s simply a
visual representation of the table. For some aspects, the table is even clearer
than the bar chart.
To turn data into information, start understanding data. Ask the following
questions:
Let’s answer those questions. The organizers of the event are the audience for
our story. They want to know the current situation of animals involved in the
event. We could suppose that they want to elaborate a promotion plan to
increase the number of pets participating in the event.
Looking at the raw data in the table, you notice that the cat category has the
highest number of participants by some margin, followed by a relatively low
number of dogs. It seems that owners of other pets, judging by the almost
total lack of participants, are not interested in the event.
You may focus on one of the following options:
Let’s focus on the first possible course of action, removing the Other
category. Now, calculate the percentage of participants for each category, as
shown in the following table:
Table 1.2 Data related to pets involved in the event, with a focus on the percentage of the number
of participants
Notice that 88.56% of pets are cats and 10.12% are dogs. Usually, the final
audience may not be interested in the details of numbers, so approximate cats
at 90% and dogs at 10%. The extracted information is that one pet out of 10
is a dog, and 9 out of 10 is a cat. This is the meaning of your data.
Figure 1.10 A stacked bar chart showing the current percentage of pets participating in the event
The figure is self-explanatory because the audience can understand the
situation immediately. You have extracted information (and thus, meaning)
from the data.
Consider the previous example of dogs and cats. You already know that the
percentage of cats is greater than that of dogs. For example, adding context
means describing the events and situations in which motivated dog owners do
not participate. Let’s focus on the third column of the dataset described back
in Table 1.1, and which is recalled in Table 1.3: the number of advertised
websites. The number of advertised websites for cats is 150, and for dogs, 28.
This information is the context because it helps the audience to understand
why the number of cats is higher than the number of dogs.
Calculate the ratio between the number of participants and the number of
advertised websites to understand the participant's rate. Table 1.3 shows the
calculated values.
Table 1.3 Data related to pets involved in the event, with a focus on the participant's rate
Participant’s
rate
Number of Number of advertised
Pet participants Percentage websites #participants
#websites
The following figure shows the stacked bar chart of Figure 1.10 enriched
with context.
Figure 1.11 A stacked bar chart showing the current percentage of pets participating in the event,
enriched with context
A call to action is a very effective way to help drive conversions. Here are
some examples:
Your audience often needs the opportunity to voice their opinion and make
suggestions. Sometimes they may even have one or more questions.
Consider again the cats and dogs example. To add a call to action, change the
title from 9 pets out of 10 are cats to Increase the advertising campaign on
dog-related websites! Figure 1.12 shows the resulting chart, which adds the
call to action in the title.
Figure 1.12 A stacked bar chart showing the current percentage of pets participating in the event,
enriched with a call to action
The pets’ scenario demonstrated how to turn data into wisdom. Firstly, we
took data that contained the raw number of participants in the event. Then,
we extracted information that told us that 1 participant out of 10 is a dog and
the remaining 9 are cats. Next, we added a context that explained why dogs
were not interested in the event. The motivation was that the advertising
campaign for dogs was poor. Finally, we added a call to action that invited
the audience to increase the dog advertising campaign.
In this chapter, you have learned the basic concepts behind data storytelling
and how to transform data into stories using the DIKW pyramid. In the next
chapter, you’ll see how to use Python Altair and Generative AI to implement
the DIKW pyramid approach.
1.5 Summary
Data storytelling is a powerful tool that helps you communicate your
data more effectively. Data storytelling makes complex data more
relatable and easier to understand when used correctly.
Python Altair and Generative AI are great tools for creating stunning
data stories.
Do complex exploratory data analysis: exploratory data analysis helps
data analysts summarize a dataset's main features, identify relationships
between variables, and detect outliers. This approach is often used when
working with large datasets or datasets with many variables.
Don’t use Python Altair and Generative AI if you want to perform big
data analytics or write complex reports that summarize big data.
Use the DIKW pyramid to turn your data into wisdom.
1.6 References
Berengueres, J. and Sandell, M. (2019) Introduction to Data Visualization &
Storytelling: A Guide For The Data Scientist. Independently published.
In this chapter, we will look at the basic concepts behind Altair, and then we
will implement a practical use case, which will allow us to transform a raw
dataset into a story. We will progressively apply the Data, Information,
Knowledge, Wisdom (DIKW) pyramid principles in Altair and see the results
achieved step by step. In the second part of the chapter, we will use Copilot
to automate some steps of the story creation process. We will focus only on
Copilot as a Generative-AI tool to keep the chapter simple and the flow
understandable. In the next chapters, we will introduce ChatGPT and DALL-
E to the DIKW pyramid.
Altair is a declarative library because you can describe the intended chart
outcome rather than manually programming every step, defining a concise
and intuitive syntax for creating interactive visualizations. We use declarative
libraries to specify what we want to see in a chart. We can specify the data
and the type of visualization we want, and the library creates the visualization
for us automatically. Declarative libraries stand in contrast to imperative
libraries, which instead focus on building a visualization manually, for
example specifying the desired axis, size, legend, and labels. Matplotlib is an
example of an imperative library.
Every Altair chart has at least three main elements: Chart, mark, and
encodings. We will cover each of these briefly in the following pages. Refer
to Appendix A to install Altair and the other Python libraries described in this
chapter. Refer to Appendix B for more details on the Pandas DataFrame
methods used in this chapter.
2.1.1 Chart
A Chart in Altair is an object acting as a starting point for constructing and
customizing interactive visualizations in Altair.. Use it to input the dataset
you would like to represent visually:
Chart
First, import the required libraries, then build the DataFrame containing your
data. Finally, pass the DataFrame to, alt.Chart(). The example does not
create any visualization yet because we have not specified what we want to
represent.
2.1.2 Mark
A mark defines how to represent data. Examples of marks include bar charts,
line charts, area charts, and many more. To specify a mark, append it to the
Altair Chart. For example, in the listing below, we will specify that we want
to use a bar chart.
chart = alt.Chart(df).mark_bar()
Mark
Use mark_bar() to create a bar chartin Altair. If we run the code as it is, it
raises the following remarks: 1. from config import * 2.
configure_layout(chart) is required to display the diagram 3. This is because
we have not defined which dataset columns we want to represent.
2.1.3 Encodings
Encodings specify the mapping between the DataFrame columns and their
visual representation in the Altair chart. In practice, encodings define where
to represent data in the chart, such as their position, size, and color. We call
channel every visual representation of data in the chart. Examples of channels
are axes, color, size, and so on. For example, in the listing below, we use
encodings to specify which columns of the DataFrame we must use in the x
and y axes:
Listing 2.3 Encodings in Altair
import pandas as pd
import altair as alt
chart.save('chart.html')
Encodings
Figure 2.4 shows the chart produced by the code contained in Listing 2.3.
You can practice with basic charts in Altair through the examples provided in
the GitHub repository of the book. Start by cloning the GitHub repository of
the book, available at the following link: https://github.com/alod83/Data-
Storytelling-with-Python-Altair-and-Generative-AI[1]. To get started with
GitHub, follow the procedure described in Appendix A of the book or the
GitHub official documentation. Find the examples under 02/Basic
Chart.ipynb of the GitHub repository.
Now that you have learned the basic concepts behind Altair, we will review
the prerequisites for implementing a practical scenario in Altair and Copilot.
You start your searches and find a dataset about arrivals at tourist
accommodation establishments[2], released as open data by Eurostat. For
simplicity, in this chapter, you consider only one dataset, but in a real use-
case scenario, you should consider more data, including the popularity of
swimming pools among tourists visiting Portugal, the cost of building a new
swimming pool at the hotel, and the potential revenue that the new swimming
pool could generate for the hotel.
Find the code described in this chapter in folder 02 of the GitHub repository
and the dataset in folder 02/source of the same repository.
Date IT FR DE PT ES UK
1990-
2.543.920 3.185.877 325.138 1723786 1.776.000
01-01
1990-
2.871.632 3.588.879 381.539 1885718 2.250.000
02-01
1990-
3.774.702 4.272.437 493.957 2337847 2.662.000
03-01
… … … … … … …
2019-
11.649.500 13.692.822 14.570.339 2.531.809 12893366 8.889.049
08-01
2019-
9.888.817 11.684.845 14.373.815 2.263.748 5.858.984
09-01
2019-
7.692.388 10.401.793 13.780.441 1.995.942 7.455.781
10-01
The table contains some missing values for some countries. Load the dataset
as a Pandas DataFrame:
import pandas as pd
df = pd.read_csv('source/tourist_arrivals_countries.csv', parse_dates=['Date
Dataset loading
eda = ProfileReport(df)
eda.to_file(output_file='eda.html')
Dataset exploration
In our case, the missing value section describes the presence of missing
values for some countries (France, Spain, and the United Kingdom), as
shown in the following figure:
Figure 2.6 The report highlights missing values for France, Spain, and the United Kingdom
Now that we have quickly explored the dataset, you are ready to build a data
story from that dataset. Let’s start with the first approach: using Altair.
Let’s start with the first step of the DIKW pyramid, turning data into
information.
chart = alt.Chart(df2).mark_line().encode(
x = 'Date:T', #A
y = 'Tourist Arrivals:Q', #B
color=alt.Color('Country:N') #C
)
chart.save(‘chart.html)
Use the melt() function to unpivot the dataset, i.e., transform data rows into
columns. Then, build the chart. The chart uses three channels: x and y, to
describe the axes, and color, to group by countries. For each channel, specify
the column in the dataset (for example, Date for the x channel) and the data
type (T for temporal data, Q for quantitative data, and N for nominal data). The
following figure shows the produced chart:
Figure 2.7 The raw chart produced in Altair without any manipulation
The chart is difficult to read because all countries overlap. However, we can
extract the following highlight: all the trend lines have increased since 1990.
This is a positive message to communicate to our boss. From 1990 until
2019, there has been a progressive increase in the arrival of tourists. Let's
focus more on this information.
In all cases, we are not interested in knowing the intermediate data, as there
are no outliers, only the starting point (1990) and the final point of the time
series (2019). However, we note that for some countries, there is no data for
1990, and 2019 is incomplete (the data goes up to October). In this case, the
question is: what to do in the presence of missing values? The answer is: it
depends. In our case, we are dealing with a time series that grows
progressively (seasonality excluded), so we can restrict the analysis range
only to the dates for which we have data. Thus, we narrow our search to the
range 1994-2018.
Use the isnull() method to build a mask that selects missing values. Then
use the mask to filter missing values in the original dataset.
Then, group data by year and calculate the average value. Also, select only
data for 1994 (the first in the dataset) and 2018 (the penultimate in the
dataset).
df2 = df.copy()
df2.loc[:, 'Year'] = df['Date'].dt.year
df2 = df.groupby(by='Year').mean(numeric_only=True)
df2 = df2.iloc[[0, -2]]
df2.reset_index(inplace=True)
Extracting the first and the last year from the dataset
First, extract the year from the Date field, then group data by year and
calculate the average value. Next, select only the first year (1994) and the
penultimate year (2018). Finally, reset the index to retrieve the year.
Use loc to access a group of rows and columns by labels and iloc to access
group rows and columns by numerical indices. Use the reset_index()
function to create a new index column starting from 0 and move the current
index values to a new column.
chart = alt.Chart(df3).mark_line(point=alt.OverlayMarkDef()).encode(
x = alt.X('Year:O', title='', axis=alt.Axis(labelAngle=0)), #A
y = 'Tourist Arrivals:Q',
color=alt.Color('Country:N')
).properties(
width=400,
height=300,
title='Countries Trend in Arrivals'
)
chart.save(‘chart.html’)
To encode the x channel, we have used the alt.X() object and not a simple
string as we did for the other channels. When we want to specify the channel
details, we can use the channel object instead of a simple string. For example,
we can use alt.Y() to set the properties of the y channel, alt.Color() for
the color channel, and so on. Within a channel object, you can set different
properties that depend on the channel. For example, for the x and y channels,
you can set the axis property. For each property within a channel, you can
define a value or an additional object. In practice, the same strategy of
channels applies to the channel properties. For example, axis is a property of
the x and y channels. We can use alt.Axis() to set additional properties of
the axis. In the example, we have set the labelAngle property of the axis.
To build the chart, we have also used the properties() function, which
configures the chart's general properties, such as the width, the height, and
the title.
Figure 2.8 The produced chart after calculating the average value for each year and removing
intermediate years
The chart is clearer than that in Figure 2.7: you can easily distinguish the
trendline for each country. However, the presence of too many colors and
countries does not transmit the message. Our objective is to focus on
Portugal, which is the country about which our boss has asked for
information. In addition, we calculate the average number of tourist arrivals
to the other countriesfor comparison. The following listing describes how to
prepare the DataFrame for the chart:
Listing 2.10 Preparing the DataFrame
Build a new DataFrame with two countries: Portugal and the average value
for the other countries.
1994 PT 563,354.83
2018 PT 1703,339.0
chart = alt.Chart(df5).mark_line(point=alt.OverlayMarkDef()).encode(
x = alt.X('Year:O', title='', axis=alt.Axis(labelAngle=0)),
y = 'Tourist Arrivals:Q',
color=alt.Color('Country:N')
).properties(
width=400,
height=300,
title='Countries Trend in Arrivals'
)
chart.save('chart.html')
The following figure shows the resulting chart after selecting only Portugal
and the average value for the other countries.
Figure 2.9 The produced chart after selecting only Portugal and Germany
The increase in the number of tourists over time in the other countriesis
greater than that of Portugal. However, we are not interested in knowing the
absolute values, but rather the percentage increase of each country over time.
If we use absolute values, instead, we can’t answer the following questions
immediately:
For each country, what is the percentage increase since 1994?
Which of the two nations experiences the greater percentage increase?
If we use the percentage increases, we can put the two countries on a more
comparable level and we can answer the previous questions. Let’s calculate
the percentage increase since 1994 for each country and then plot the chart of
percentage increases instead of that of absolute values.
In our case, calculate the percentage increase for each country as follows:
Percentage increase
First, build two masks, one for each year and for each country. Then calculate
the percentage increase for each country. Use df[field].values[0] to get
the value of the first row of a field.
df_pi = pd.DataFrame({
'Date' : [1994,2018,1994,2018],
Discovering Diverse Content Through
Random Scribd Documents
“Don’t you hear something?” she said, “come in, come in, don’t lose a
minute. What if he should lock the kitchen door? Harry, promise me you’ll
not stop to say a word, but run up to your bed.”
She was hurrying while she spoke, through the series of outbuildings,
dragging him with her, breathless, and speaking in gasps. But as they went
on from one to another there could be no longer any doubt as to what had
happened. The kitchen door, which opened from these offices, was shut
with a loud jar, and the key turned.
“I dunno’ who’s out and about at this hour of the night,” Joscelyn was
heard within, “but whoever it is they’ll stay there: some o’ the women out
like the cats, dash them, or may be a good-for-nothing lad. I’ll teach them
what it is to roam the country o’ nights. You’ll stay there whoever you are.”
Joan lost all her self-command in the emergency. She dropped Harry’s
hand and threw herself against the door.
“Oh, father, father, open! do you hear me? It’s me, Joan. Open! will you
let me bide out in the cold, in the dead of night? Father! let me in, let me in!
you wouldn’t have the heart to shut me out all night. It’s me, me, Joan!”
There was no reply; his steps were heard going away mounting the
stairs, and a faint outcry in the distance as of the mother weeping and
protesting. Joan, who was a very simple person, though so self-commanded
in emergencies which her mother could not face, was altogether taken by
surprise by this. She flung herself against the door with a burst of weeping.
“Oh, open, open!” she said, beating upon it with her hands. Then she
called out the names of the servants one after another. “I’ll not be left here
all the night; open, open! do you hear! I’ll not be left here all the night. I’ll
die if I am left out in the dark. I’ll not be left!” she cried with a shriek.
Harry was silenced by this loud and sudden passion so close to him. It
alarmed him, for Joan was the impersonation of strength and calm; but the
situation was uncomfortable enough, however it could be taken. The
consciousness that he had some one else to think for, some one who for the
present had lost her head, and all power to think for herself, changed his
own position. He caught his sister by the arm.
“Don’t make such a row,” he said, “Joan, you! that was always against a
fuss.”
“Oh,” cried Joan half wild, “did I ever think that I’d be shut out like a
bad woman out of the house at the dead of night—me! that was always the
most respectable, that never stirred a step even in the evening times, or said
a word to a man. Open! it isn’t the cold, it’s the character: me! me!”
But all her beating and knocking, and all her prayers were in vain. The
maids slept soundly, all but one trembling girl who heard the voice without
knowing whose it was, and dared not get up to see what was the matter,
especially as she heard mysterious steps going up and down stairs. And the
mistress of the house sobbed in her chamber in the dark, wringing her
hands. She had come almost to the length of personal conflict with her
husband for the first time in her life; but poor Mrs. Joscelyn even in her
despair was no sort of match for the man who lifted her, swearing and
laughing, into her bed, and locked the door upon her when he went
downstairs. He came up and fiercely ordered her to be silent.
“Dash you, hold your blanked tongue. I’ve taken it into my own hands,
and if you venture to interfere I’ll pitch you out of window as soon as look
at you,” he said, “a deal sooner for that matter—for you’re not tempting to
look at, you dashed white-faced ——”
“Yes, do,” she cried, “throw me out of the window, throw me out to my
children. I’d rather be dead with my children than living here.” And she
rushed to the window and threw it open; but he caught her before she could
throw herself out, and perhaps, poor woman, she would not have thrown
herself out; for “I dare not” very often waits upon “I would” in such
circumstances. He carried her back crying and struggling to her bed.
Though he had not hesitated to turn the key upon his son and daughter, he
had no desire to have it whispered in the country side that his wife had
thrown herself out of window, because of his cruelty; but he could not resist
giving her a shake as he threw her upon her bed.
“I’d never have had any fuss in my family if it hadn’t been for you; just
you budge at your peril,” he said, threatening her with his fist. And there
she lay with the cry of her daughter in her ears, and the sound of the
knocking that seemed to be upon her heart. To tell the truth she was not
very anxious about Joan. Joan would have a bad cold, that would be all the
damage she would take; but Harry, Harry! what would Harry do?
When Joan had beat the door and her knuckles almost to a jelly, she
came to a sudden pause. In a moment her mood changed; her passion
wrought itself out almost as suddenly as it began.
“Well, if I can’t have the door opened I’d best give up trying,” she said
all at once. Her hands were fatigued with knocking, and her feet with
kicking. She was hoarse, and her eyes ached with the hot tears that had
poured from them. She came to herself with a sudden sense of shame—she
who was so strenuous in her opposition to a fuss. She had no sense of cold
now, her shawl hung off her shoulders with the fervour of her efforts. “My
word, but I’ll give it to those lasses,” was the next thing Joan said: and then
she laughed at herself to carry off her sense of shame.
“We’re both in the same box, Harry,” she said, “well! two together isn’t
so bad as one alone; come back to the washhouse. I’m glad I told them to
light that copper—if it wasn’t a providence! we’ll sit us down there and
keep warm; and don’t you take on, my lad. It’s not so very long to day.”
When she recovered, however, it was Harry’s turn. He followed her back
to the copper without a word. He even pulled the bench on which the tubs
stood close to that centre of warmth for her, and got her something on
which to put her feet. By this time a certain pleasure in the novelty of the
situation had arisen in Joan’s mind. “My word, I made a fine noise. Mother
will be in a terrible way, that’s the worst of it. As for father I’ll pay him out.
Don’t you be afraid; he’ll repent the night he meddled with Joan; and I’ll
give it to the maids. Just as likely as not he’s taken away the key; but bless
us all, what’s the good of being a woman if you can’t find out a way? I’d
have done it if he’d stood over me with a drawn sword. But, Harry, you
never speak a word. Are you cold? come and sit here by me on the warmest
side. ’Twill be as cosy here as if you were in a pie; and I’ll give you a bit of
my shawl. Come, lad! pluck up a heart: I’ve nigh cried my eyes out; but that
does no good. I can’t see you, Harry; but I know you’re down, though I
can’t see.”
“Down!” he said, “Can a fellow be anything but down with a raging wild
beast for a father, and shut out of every shelter through a cold spring night.”
“That’s very true,” said Joan, “and I’m no example, as you’ve seen; but
still I’m in the same box if that’s any consolation.”
“No, it is no consolation,” said Harry; “it makes it worse; for if you are
here perishing of cold it’s all on my account.”
“I’m not perishing of cold. I’m as hearty as a cricket. If he thinks he’ll
break my spirit he’s much mistaken; and that’s all about it. It did touch me
the first minute. I feel that I was just a big baby. But after all, Harry, if you
will stay out till all the hours of the night, and go to that ‘Red Lion,’ which
is known to have ruined many a lad——”
“Oh, hold your tongue about the ‘Red Lion!’—you are as bad as old
Isaac. Where am I to go?”
“What’s to prevent you biding at home?” said Joan. “Dear me, you’re
not such a deal better than I am, Harry Joscelyn. Where do I ever go? I’ve
been as young as you once upon a time, and what diversion was ever given
to me? and I’m not to say so dreadful old yet. Can you not put up for a
week with what I have put up with all my life?”
“You don’t understand—it’s quite different,” said Harry, hotly; “you’re a
woman, you’re an old—Good Lord, can’t you see the difference? Where
should you be but at home? but what would you have me do, stuck between
two women and that—that father of mine?—” Harry here menaced the dark
world with his fist, and burst, in his turn, into an outcry of passion. “I’ll
neither sleep under his roof nor call him father, nor reckon myself to belong
to him more! You hear what I say, Joan; you can bear witness. Not if I were
to starve; not if I were to die; not if I were to cadge about the streets!—
White House has seen the last of me. You can tell my mother I think upon
her: but she must not expect ever to see me again.”
“Tut, tut,” said Joan, tranquilly; “to be sure you must have your fling. Ay,
ay, say away, my lad; it’s always a relief: and we’ll not keep you to it when
you come to yourself.”
“That’s well for you, Joan,” said her brother; “but for me, I don’t mean
to come to myself. He’s done it, I can tell you. What did he ever do for me?
but if he had been the best father in the world now he’s made an end of it.
Am I to be treated like this, home on a visit and I cannot put my affairs
before him, and ask for my share to buy me into the business, but I’m met
with abuse: and when I go out for a little peace the door’s shut upon me.
You can do what you please, but I’ll not stand it. We’ve all lived a wretched
life, but I’ll make an end of it. Don’t you think it’s all a flash-in-the-pan,
and that I don’t mean what I say.”
“Well, well, lad—if it keeps your spirits up a bit. Are you not sleepy?
Let’s make the best of it. Harry: after all it’s but one night. Though this is
not to call an easy seat. I’m that sleepy I shall go off, I know I shall. If you
see me tumbling be sure you catch me. I cannot keep awake another minute.
Good night, lad, good night.”
This was half real, on Joan’s part, and half put on to calm her brother
down; but in that part of her intention she was not very successful. After a
while she really did as she had threatened, and fell into a sound, if uneasy,
sleep. But Harry had no inclination that way. He sat and pondered over all
his wrongs, and as he mused the fire burned. What was home to him?—
nothing. A place where there was no peace—a pandemonium—and when
there was either quarrelling or dulness—dulness beyond description; either
a fight with his father or a drowse by his mother’s side—that was all the
comfort he had of his home. And after all, when he put the question to
himself, and nobody else interfered, he was obliged to allow that the
entertainment at the “Red Lion” was not of a very exciting character. There
was not much in that to make up for the want of everything else. He sat
upon the edge of the copper dangling his legs, and, notwithstanding that
warmth, the chill of the night got into his heart. He had no overcoat, as his
mother had remembered, when he went out; and as the slow moments
passed on, the night became intolerable to Harry, and the sense that his
enemy, his father, was chuckling in the warmth upstairs over his outcast
condition, distracted him with impotent rage. Never again would he subject
himself to such a shame. He clenched his fist and made a vow within
himself, while Joan, leaning her head against him, slumbered uneasily.
After a while Joan had a little shock in her sleep, half woke, and felt her
pillow displaced, and dreaming, not knowing where she was, threw herself
back against the copper and settled down somehow again. She dreamt there
had been an earthquake, and that the copper itself was a volcano and had
made an eruption and tumbled down upon her, catching her fast by the feet.
A little after, poor Mrs. Joscelyn, lying awake crying silently and saying her
prayers over and over again, heard a handful of gravel flung violently
against her window and the sound of footsteps. What did it mean? The
tyrant had gone to sleep a few minutes before, and he slept heavily. She
crept out of bed with a sinking heart, and after a great deal of alarmed
searching found the keys, of her own room first, and then of the doors
below. She did not even turn to find something to cover her, but fled
downstairs, like a ghost, with her naked feet and a wild flutter in her heart.
When she made her way with some difficulty to the place where her
children had found refuge, she came just in time to deliver Joan, who had
almost broken her neck in her struggles to get out of the way of the
earthquake, and was lying, with her head back and her mouth open, among
the tubs. Though she was conscious of being in some convulsion of nature it
was not easy to wake Joan, and there was no one else to be seen. Mrs.
Joscelyn, with her candle in her hand, went searching into every corner
while her daughter picked herself up. “Harry,” she cried, “Harry! oh where
is my boy?” There was not a trace of him about; not even an impromptu
couch, like Joan’s, made up of benches and washing tubs. The mother
flitted about into all the offices, while Joan roused herself with many
yawns, rubbing her stiff neck and knotting up her straggling locks, and
gathering her shawl round her shoulders. “Oh that copper,” Joan was
saying, “it’s been the saving of my life.”
“But where is my boy? Oh! Joan, what have you done with him? Where
is my boy?”
“I have not got him in my pocket,” Joan said, with a sleepy smile. Then
as she roused herself quite up, “To be sure, mother, the lad’s not a fool
though we give him the credit of it. He’s gone back to his blessed ‘Red
Lion,’ and is safe in his bed, as I would like to be. And if I had let him alone
and not poked in where I wasn’t wanted, there’s where he would have been
from the first. You see that’s just your way. I have a little bit of it in me, if
not much; and, instead of letting him be, I must meddle. But he’s safe in his
bed at the ‘Red Lion;’ and you’d better go back to yours, and let me go to
mine, and make the best of a bad night.”
“I cannot think he has gone to the ‘Red Lion,’ ” said Mrs. Joscelyn,
standing in her white nightdress, with her glaring candle, against the great
darkness of the night in the doorway, and investigating the gloom by that
poor assistance with her anxious eyes.
“Then where else would he go to?” Joan said.
CHAPTER VI.
A NIGHT WALK.
T HE moon had set when Harry Joscelyn left the White House; and the
night was very dark, as it is so often after the setting of the moon. The
sky was cloudy, and scarcely a star was visible. The wind blew cold in
his face when he got beyond the shelter of the walls. He looked up at the
house as he passed it with a sensation of rage and contempt which it is only
possible to reach when the object we thus hate and despise is one that ought
to be beloved. He lifted a handful of gravel and threw it violently at his
mother’s window. There was no softening of feeling, no wish to say a
farewell, even if an angry one in this. It was done in boyish rage, with a
simple desire to strike. He was glad to think the stones struck sharply, and
might, perhaps, have broken a pane and fallen like shot upon the floor. This
was what he would have wished. When he had discharged that parting
volley, he pulled down his hat over his ears, and put up his coat-collar. It
was all he could do against the wind, which blew through and through him.
Not even an overcoat! They were determined that he should have nothing;
that he should be expelled without even the poorest covering; that he should
be exposed to everything dangerous, everything disagreeable. To be sure,
that was what they wanted! Revenge filled the young fellow’s heart as he
went along in the dark, shivering at first, till his rapid progress set his blood
in motion. Not only without a home, without a roof to shelter him, or a bed
to lie upon, but without even a coat. He turned his back upon his father’s
house with a bitterness that was indescribable. He could remember the time
when it was delightful to him to go home; but that was long ago, when he
was a boy and knew no better. Even then, what had his father been to him?
a terror even in his lighter moods, which might turn into fury at any
moment. His mother? oh, his mother had been kind enough, poor soul! For
a woman she had done what she could; but at the best what could a woman
do? Poor thing! yes she had been kind. But it is very difficult for the young
to see anyone, even when dear to them, systematically undervalued without
getting to share the sentiment in one shape or another. Sometimes it rouses
a generous mind to hot partizanship; but Harry had never got that length.
He had been indignant sometimes and conscious, with a little pride, that he
was the one who stood up for his mother—but he had not gone further. And
now he could not help despising her as everybody else did. Just when it was
essential she should stand by him, she had failed him. Call this the
consequence of force which she could not resist, of natural bodily weakness
—all that was very well to say; but a mother worth anything will never run
the risk of bodily force in such an emergency. She will find some way of
getting out of it. She will stand by her son when he needs her, whatever
happens. And Harry’s mother had not done so—just at the critical moment
when he had been driven wild by opposition, when his future career had
been to all appearance cut short and his path shut in before him, she had
failed him! She was as weak as water; there was no faith to be put in her. A
woman like that, Harry reflected, is almost as bad as if she were not a good
woman. Oh, yes; she was a good woman! but what advantage was it to
anyone? What did it matter being good if you were of no use to those
belonging to you? Being good just for yourself, selfishly, that was a poor
sort of business. For her children she was no good. What had she ever done
for any of them? Made a fuss, as Joan said. She was very good at doing
that, was mother! But what more? These were the angry thoughts that were
surging through his mind as he turned his back upon his home. His father’s
image swept across him now and then, raising his angry despair into
momentary rage; but it was not his father, who had always been hard upon
him, but his mother, who had always been so tender to him, whom Harry
assailed with all these bitter thoughts. In her silly dislike to the only poor
little amusement he had, she had turned against him at the decisive moment.
It was just like a woman! Because he would not tie himself to her apron-
strings; because he would not spend his evenings sitting with her and Joan
—a pretty sort of position for a young man, Harry said to himself, with a
curl of his lip.
He went on shivering, straight before him as he happened to have turned
his face when he came round the corner of the house. He was not aware that
there was more choice in it than this, though all the while there was a
dormant intention in his mind of going to Wyburgh after all, and trying, one
last effort, what Uncle Henry would do for him. Uncle Henry had been kind
to him, as kind as he knew how. He was only an old bachelor, not much
good, a selfish old fellow, thinking most of his own comfort; but still he had
been kind; and perhaps if he knew fully the state of the case, and how the
people at White House had treated his pupil and godson—This was lying
underneath as it were the current of Harry’s thoughts, and turned over and
came uppermost for a moment now and then; but it did not become at all a
principal idea until he had walked a long way, and had got warm with
walking, and the sense of absolute misery, physical and mental, had been
slightly modified. At first he kept to the side of the Fells, which was rough
walking, and where now and then there was a dyke to jump over or a beck
to cross; but by and by got down to the high road, almost groping the way
with his feet, if not with his hands, so black lay the night over the irregular
broken ground. He knew the road, every inch, he would have said; but
when that darkness comes down like a pall, confounding everything in one
gloom, there is little advantage in knowledge. Sometimes he found himself
right up against the grey uncemented stones of a dyke before he was aware
of any obstacle, and sometimes had almost plunged into an invisible hill-
side stream, before the little warning trickle it made among the stones
caught his ear. By the side of one of these little streams he made his way to
the road, and there for the first time asked himself where he was going.
What a strange walk it was, all blank about him, sometimes a lonely tree
rustling, betraying itself in the dark by the wind in its spare branches,
sometimes a cottage suggested on the roadside, or away among the fields,
by the cry of a child or the bark of a dog. He knew he had passed through
the first hamlet on his way, because the dogs all woke at the unusual sound
of a footstep, and barked at him lustily. He was not a youth of much
imagination, and yet this incident had the most curious effect upon him. He
was more startled, more shocked and annoyed by it than by anything else
that had happened to him. The very dogs! was he already to them a tramp, a
wandering vagrant? At the very end of the “town” some one opened a
window, and Harry heard a querulous question, not addressed to himself,
but to some one inside, “Wha’s that wandering on the road in the dead o’
the night?” Harry slunk by, trying to keep his steps from making so much
noise. A sense of disreputableness suddenly came over him, a recollection
of what people would think. Nobody would believe he had been turned out
of his home for no fault of his. And then in the midst of his fury and desire
for vengeance, there suddenly came over Harry that family pride which so
seldom abandons a Northcountryman. Was he going to let everybody know
what disgrace there was in the White House, and how his father had turned
him out of doors? Were all the tongues in the country-side to be set wagging
on this subject? The Joscelyns—people so well known! Harry felt as if
some one had struck him sharply with his hand in the darkness. It would be
all over the country in twenty-four hours. Joscelyn of White House had
turned his youngest son out of doors. There was no second family of the
name to confuse gossip. Harry felt as if the barking of the dogs was but a
foretaste of what was going to happen to him. He felt as if some one had
grasped him, choked him, tried to strangle him in the dark.
Fortunately Wyburgh by this time showed, a long way off with its little
lights twinkling. They were but four little rustic lights, not many of them—
for when the moon shone the corporation felt itself at liberty to dispense
with lamps; and but for the lights at the railway-station, and two or three
which were indispensable, the little town would have been invisible in the
darkness, like those sleeping villages which Harry had stumbled through
almost without knowing. When he caught sight of the first of these lights, it
gave him a keen pleasure; it seemed to deliver him from that world of
blackness in which the only conscious and living thing was himself and the
sea of thoughts which surged up and down within him, one wave sweeping
over another, in a confusion and tumult indescribable. Harry’s soul caught
at the glow of that tall solitary lamp, the first which marked the line of the
railway, as at a guiding light directing him into a known country, to solid
ground and a familiar shore. The darkness and the little inward world of
thought were alike strange to him, and he had no guide to direct him
through them; but now here was “kent ground,” a place which would be
visible, where the dogs would not bark at him in the dark, where there were
all the safeguards of an inhabited place. He was relieved beyond measure
when he saw the lights, and said to himself what they were. That was the
tall light on the line, that other lower one the lamp at the station, that the
faint little flare seen over the housetops of the market square, and yonder
the well-known lamp at the corner, which he had seen lit so often as he left
the Grammar-school. It made his heart light to count them at a distance. But
when he got to the outskirts of the town he was less happy. It was still quite
dark, between three and four o’clock, and he could not go to Uncle Harry’s,
or to any other house in which he was known at such an hour. Nobody was
stirring in Wyburgh, nor would be for hours yet. As he went into the silent
streets the sense of his desolate position came over him more strongly than
ever. All the houses were shut up and silent, blinds drawn over the
windows, feeble lamps burning here and there like night-lights in a sick-
chamber, the whole place breathing low and noiselessly in its sleep. He met
a policeman, the only one, making his rounds with steady tramp, and the
policeman looked at Harry with suspicion, throwing the light of his dark
lantern upon him as he passed. He knew John Armstrong very well, and had
played him many a trick as a schoolboy; but he shrank from making himself
known now; and John looked with suspicion at the wayfarer, without even
an overcoat, buttoned up to the neck, and with his hat drawn over his eyes,
who thus invaded the town in the middle of the night. Harry knew that he
was but a tramp, all the more dangerous because better dressed than usual,
in John’s eyes. He felt the light of the lantern come after him, making a long
trail of light upon the pavement. And he did not know where to go. If he
went wandering about, which was the only thing he could think of, no doubt
he would meet John Armstrong again, and almost certainly be questioned as
to what he was doing, and who he was. And then the story would run over
Wyburgh, how young Harry Joscelyn, one of the Joscelyns of the White
House, had come in to Wyburgh before four o’clock in the morning,
walking like a vagrant, and was recognized by the policeman, roaming
about the street without any place to go to. He might almost be taken up as
a rogue and vagabond, Harry thought, with that exaggeration which
misfortune delights in. If he were called upon to give an account of himself
he could not do it, nor had he any place to go to, any home waiting for him.
The Wyburgh folk might form their own conclusions, and so they would,
could anyone doubt.
He walked straight through the town to the other end of it, as if he were
going on somewhere else, ashamed of himself, though he had nothing to be
ashamed of, avoiding the spots of feeble light round the lamps, and walking
as softly as he could not to make so much noise upon the pavement. He had
not felt this so much in the country, in the darkness, but here, where
everybody knew him, he became suddenly ashamed and afraid of being
seen. When the clock struck it made him jump as if it had been some one
calling his name. “Harry Joscelyn is roaming about the country without a
home to go to;” did he think that was what it was going to say? Alas! it was
but four o’clock that struck; four o’clock! the night seemed to have been
already twelve hours long; and here were two hours more at the least that he
must get through somehow before he could hope that even Mrs. Eadie,
Uncle Henry’s old housekeeper, would be astir. He would not mind
presenting himself to her; and the thought of the kind unquestioning
welcome she would give, the cheerful fire, the breakfast, the warm room in
which he could sit down, gave him sudden encouragement. For it was very
cold; those long, long hours of night, which pass so quickly in sleep, sliding
out of consciousness altogether, how much goes on in them to those who
are homeless! Harry had never thought of anything of the kind before; a
night without rest, even, far less a night out of doors, had been unknown to
him. The wretches who wander about the roads, and sleep under a hedge,
and have no home, were out of his ken; they were poor wretches, and in all
likelihood it was “their own fault.” People would think the same of him. To
be ashamed of the position in which you find yourself, and yet to be quite
innocent, is a curious misery, but it is very poignant. He had done nothing
wrong; but the light of John Armstrong’s lantern made him shrink, and even
those pale little prying lamps, each making a hole in the darkness. He went
straight through Wyburgh, coming out at the further side. He walked till he
was quite clear of the houses, and then he turned and looked back upon the
spots of light which had cheered him so much when he first caught sight of
them. How cold it was! nobody would believe that a spring morning could
be so cold. It was like December. There was the clock again, like some one
shouting in his ear—but only sounding the half after four; would the night
never come to an end? He walked up and down on this bit of quiet road, just
outside the town, to keep himself warm, pausing now and then to lean upon
the wall and look at the lights; though he dared not go back to them lest
they should betray him to the gossips, yet it was a kind of consolation to
look at them still. They delivered him a little from that close presence and
wretched company of himself.
An early cart from one of the neighbouring farms with vegetables for the
market, lumbering along the road just as the day began to break, was the
next thing that disturbed him. He fled from that too, wondering what the
carter would think to see him standing there like a ghost in the dim dawn—
and got over the wall into a field, to be out of the way, yet could not help
feeling, as he listened, holding his breath, to the sound of the slow, jogging
horses and the man’s heavy tread, that the carter must have spied him, and
must be peeping over the wall and wondering who he could be. By this time
Harry had got to feel very like a criminal. He felt sure that everybody would
think he was a criminal and had done something desperate, to see him there
in this guise. And how he was to get courage to go back to Wyburgh again
in full daylight, in the sight of everybody, and knock at his uncle’s door, he
did not know.
“Lord bless us! Master Harry!” the housekeeper cried. He came upon her
suddenly as she opened the door to go out and feed her chickens, which was
the first thing she did every morning. She was so scared that she let fall her
apronful of seed, and held up her hands half to protect herself, for this worn,
pale, wearied apparition, with coat-collar up to its ears, and hat drawn down
over its brow, was like the ghost of Harry, not himself. “Lord bless us!
Master Harry! it’s never you?”
“It is me, though: and dreadfully tired, and so cold I don’t know what to
do with myself,” said Harry, with chattering teeth. “Let me come in and
look at a fire.”
“Let you come in, my bonny boy! you shall come in, and welcome; and
the kettle’s on, and I’ll soon make you some tea. Come into the kitchen, it’s
the warmest place. Bless the lad! What hour did ye start at to get here so
early? or has anything happened? You’ve not come for the doctor? I’m that
surprised you might blow me over with a puff of your breath.”
“I shall not try,” said Harry, recovering himself a little as he felt the
warmth of the fire. “There’s nothing wrong, Mrs. Eadie, they’re all well
enough; but I want to see Uncle Henry, and I’m going back to Liverpool to-
day.”
“Bless my heart! I thought you had come for a real holiday, and its no’
above a week; but whisht! laddie, dinna chatter with your teeth like that;
come nearer to the fire. Dear, dear me, but you must be cold; not a great-
coat upon your back, nor a comforter, nor one thing to keep the heat in ye. I
hope you havena’ just gotten your death,” cried the housekeeper, pouring
the steaming water, which it was good even to see, into her teapot; and in
her anxiety to get him a comfortable meal she forgot to ask any more
questions.
Mrs. Eadie’s help, who was a young girl, did not live in the house, and
her late arrival in the mornings was one of the grievances of the
housekeeper’s life. There was nobody, therefore, but this good woman, in
whom Harry had perfect confidence, to witness his worn-out condition: and
by-and-by he got thawed and comfortable. Once within this legitimate
shelter too, his spirits came back to him. He forgot the painful miseries he
had conjured up, or, at least, he did not forget them, but they went to his
father’s account to swell his wrath. There were still several hours to wait
before he could see Uncle Henry, and Harry lay down upon the bed where
he had slept when he was a schoolboy, and returned to common life and
respectable usages through the medium of a long sleep. It was a sort of
moral bath to him, restoring him to creditable ways. To think that he should
have feared John Armstrong’s lantern, and hid himself from the carter with
his early vegetables! But all that, and a great deal more, went to his father’s
account. His rage revived as the misery of the night ended. For those latter
hours he had been too much occupied by his personal feelings to dwell
upon the cause of them; now that he was comfortable once more the insult
and the cruelty that had been inflicted upon him came back with double
force. Turned from his father’s door, the key turned upon him, the house he
was born in shut up against him; himself disowned, like a beggar, left to
wander where he pleased, to die on the moors, if he liked, to get his death,
as Mrs. Eadie had suggested; and all this his father’s doing! Harry clenched
his fist with wild excitement, with a desire for vengeance which startled
himself. He thought he would almost consent to have “got his death” if
Joscelyn could be tried for manslaughter. He would have almost liked to
punish, to convict his father by dying, so that the whole country might have
pointed at him as the man who had killed his son. But then he reflected that
probably his father would not care. “But I’ll make him care,” Harry said to
himself. Few people venture to express such vindictiveness; but Harry
Joscelyn’s heart was full of it; it was natural to his race.
CHAPTER VII.
UNCLE HENRY.
ebookgate.com