100% found this document useful (3 votes)
84 views

Clojure Data Analysis Cookbook Second Edition Rochester Eric 2024 scribd download

Clojure

Uploaded by

joresmeztli
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
84 views

Clojure Data Analysis Cookbook Second Edition Rochester Eric 2024 scribd download

Clojure

Uploaded by

joresmeztli
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Get ebook downloads in full at ebookmeta.

com

Clojure Data Analysis Cookbook Second Edition


Rochester Eric

https://ebookmeta.com/product/clojure-data-analysis-
cookbook-second-edition-rochester-eric/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Clojure Data Structures and Algorithms Cookbook 25 recipes


to deeply understand and implement advanced algorithms in
Clojure 1st Edition Rafik Naccache
https://ebookmeta.com/product/clojure-data-structures-and-algorithms-
cookbook-25-recipes-to-deeply-understand-and-implement-advanced-
algorithms-in-clojure-1st-edition-rafik-naccache/
ebookmeta.com

Python Data Analysis Second Edition Armando Fandango

https://ebookmeta.com/product/python-data-analysis-second-edition-
armando-fandango/

ebookmeta.com

Think Stats Exploratory Data Analysis Second Edition Allen


B Downey

https://ebookmeta.com/product/think-stats-exploratory-data-analysis-
second-edition-allen-b-downey/

ebookmeta.com

Coins of England and the United Kingdom 2020 Pre decimal


Issues 55th Edition Emma Howard

https://ebookmeta.com/product/coins-of-england-and-the-united-
kingdom-2020-pre-decimal-issues-55th-edition-emma-howard/

ebookmeta.com
Computer Vision Projects with PyTorch: Design and Develop
Production-Grade Models 1st Edition Akshay Kulkarni

https://ebookmeta.com/product/computer-vision-projects-with-pytorch-
design-and-develop-production-grade-models-1st-edition-akshay-
kulkarni/
ebookmeta.com

SQL and NoSQL Databases Modeling Languages Security and


Architectures for Big Data Management 2nd Edition Michael
Kaufmann
https://ebookmeta.com/product/sql-and-nosql-databases-modeling-
languages-security-and-architectures-for-big-data-management-2nd-
edition-michael-kaufmann/
ebookmeta.com

Tensor Computation for Data Analysis Yipeng Liu

https://ebookmeta.com/product/tensor-computation-for-data-analysis-
yipeng-liu/

ebookmeta.com

Ode To The Greats A Philosophy Lesson In Verse 1st Edition


Valerie Stephens

https://ebookmeta.com/product/ode-to-the-greats-a-philosophy-lesson-
in-verse-1st-edition-valerie-stephens/

ebookmeta.com

Fundamental Kotlin revised Third Edition Milosvasic

https://ebookmeta.com/product/fundamental-kotlin-revised-third-
edition-milosvasic/

ebookmeta.com
The Resentment 1st Edition Ashlee Rose

https://ebookmeta.com/product/the-resentment-1st-edition-ashlee-rose/

ebookmeta.com
Clojure Data Analysis
Cookbook

Second Edition

Dive into data analysis with Clojure through over 100

practical recipes for every stage of the analysis and

collection process

Eric Rochester

BIRMINGHAM - MUMBAI

Clojure Data Analysis Cookbook

Second Edition

Copyright © 2015 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in


a retrieval system, or transmitted in any form or by any means,
without the prior written permission of the publisher, except in the
case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure
the accuracy of the information presented. However, the information
contained in this book is sold without warranty, either express or
implied. Neither the author, nor Packt Publishing, and its dealers and
distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information


about all of the companies and products mentioned in this book by
the appropriate use of capitals.

However, Packt Publishing cannot guarantee the accuracy of this


information.
First published: March 2013

Second edition: January 2015

Production reference: 1220115

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78439-029-7

www.packtpub.com

Credits

Author

Project Coordinator

Eric Rochester

Neha Thakur

Reviewers

Proofreaders

Vitomir Kovanovic

Ameesha Green

Muktabh Mayank Srivastava

Joel T. Johnson
Federico Tomassetti

Samantha Lyon

Commissioning Editor

Indexer

Ashwin Nair

Priya Sane

Acquisition Editor

Graphics

Sam Wood

Sheetal Aute

Disha Haria

Content Development Editor

Parita Khedekar

Production Coordinator

Nitesh Thakur

Technical Editor

Ryan Kochery

Cover Work

Nitesh Thakur

Copy Editors
Dipti Kapadia

Puja Lalwani

Vikrant Phadke

About the Author

Eric Rochester enjoys reading, writing, and spending time with his
wife and kids. When he’s not doing these things, he programs in a
variety of languages and platforms, including websites and systems in
Python, and libraries for linguistics and statistics in C#. Currently, he
is exploring functional programming languages, including Clojure and
Haskell. He works at Scholars’ Lab in the library at the University of
Virginia, helping humanities professors and graduate students realize
their digitally informed research agendas. He is also the author of
Mastering Clojure Data Analysis, Packt Publishing.

I’d like to thank everyone. My technical reviewers proved invaluable.

Also, thank you to the editorial staff at Packt Publishing. This book is

much stronger because of all of their feedback, and any remaining

deficiencies are mine alone.

A special thanks to Jackie, Melina, and Micah. They’ve been patient


and

supportive while I worked on this project. It is, in every way, for


them.

About the Reviewers

Vitomir Kovanovic is a PhD student at the School of Informatics,


University of Edinburgh, Edinburgh, UK. He received an MSc degree
in computer science and software engineering in 2011, and BSc in
information systems and business administration in 2009 from the
University of Belgrade, Serbia. His research interests include learning
analytics, educational data mining, and online education. He is a
member of the Society for Learning Analytics Research and a
member of program committees of several conferences and journals
in technology-enhanced learning. In his PhD research, he focuses on
the use of trace data for understanding the effects of technology use
on the quality of the social learning process and learning outcomes.
For more information, visit http://vitomir.kovanovic.info/

Muktabh Mayank Srivastava is a data scientist and the cofounder of


ParallelDots.com.

Previously, he helped in solving many complex data analysis and


machine learning problems for clients from different domains such as
healthcare, retail, procurement, automation, Bitcoin, social
recommendation engines, geolocation fact-finding, customer
profiling, and so on.

His new venture is ParallelDots. It is a tool that allows any content


archive to be presented in a story using advanced techniques of NLP
and machine learning. For publishers and bloggers, it automatically
creates a timeline of any event using their archive and presents it in
an interactive, intuitive, and easy-to-navigate interface on their
webpage. You can find him on LinkedIn at
http://in.linkedin.com/in/muktabh/ and on Twitter at

@muktabh / @ParallelDots.

Federico Tomassetti has been programming since he was a child and


has a PhD

in software engineering. He works as a consultant on model-driven


development and domain-specific languages, writes technical articles,
teaches programming, and works as a full-stack software engineer.

He has experience working in Italy, Germany, and Ireland, and he is


currently working at Groupon International.
You can read about his projects on http://federico-tomassetti.it/ or

https://github.com/ftomassetti/.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit
www.PacktPub.com.

Did you know that Packt offers eBook versions of every book
published, with PDF and ePub files available? You can upgrade to the
eBook version at www.PacktPub.com and as a print

book customer, you are entitled to a discount on the eBook copy. Get
in touch with us at service@packtpub.com for more details.

At www.PacktPub.com, you can also read a collection of free


technical articles, sign up for a range of free newsletters and receive
exclusive discounts and offers on Packt books and eBooks.

TM

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is


Packt’s online digital book library. Here, you can search, access, and
read Packt’s entire library of books.

Why subscribe?

Fully searchable across every book published by Packt

f
Copy and paste, print, and bookmark content

On demand and accessible via a web browser

Free access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can


use this to access PacktLib today and view 9 entirely free books.
Simply use your login credentials for immediate access.

Table of Contents

Preface 1

Chapter 1: Importing Data for Analysis

Introduction 7

Creating a new project

Reading CSV data into Incanter datasets

Reading JSON data into Incanter datasets

12

Reading data from Excel with Incanter

14

Reading data from JDBC databases


15

Reading XML data into Incanter datasets

18

Scraping data from tables in web pages

21

Scraping textual data from web pages

25

Reading RDF data

29

Querying RDF data with SPARQL

33

Aggregating data from different formats

38

Chapter 2: Cleaning and Validating Data

45

Introduction 45

Cleaning data with regular expressions

46

Maintaining consistency with synonym maps

48
Identifying and removing duplicate data

50

Regularizing numbers

53

Calculating relative values

55

Parsing dates and times

57

Lazily processing very large data sets

59

Sampling from very large data sets

61

Fixing spelling errors

64

Parsing custom data formats

68

Validating data with Valip

70

Table of Contents

Chapter 3: Managing Complexity with Concurrent Programming


73

Introduction 74

Managing program complexity with STM

75

Managing program complexity with agents

79

Getting better performance with commute

82

Combining agents and STM

83

Maintaining consistency with ensure

85

Introducing safe side effects into the STM

88

Maintaining data consistency with validators

91

Monitoring processing with watchers

94

Debugging concurrent programs with watchers

96
Recovering from errors in agents

98

Managing large inputs with sized queues

100

Chapter 4: Improving Performance with Parallel Programming

101

Introduction 102

Parallelizing processing with pmap

102

Parallelizing processing with Incanter

106

Partitioning Monte Carlo simulations for better pmap performance

107

Finding the optimal partition size with simulated annealing

112

Combining function calls with reducers

116

Parallelizing with reducers

118

Generating online summary statistics for data streams with reducers


121

Using type hints

124

Benchmarking with Criterium

127

Chapter 5: Distributed Data Processing with Cascalog

131

Introduction 131

Initializing Cascalog and Hadoop for distributed processing

133

Querying data with Cascalog

137

Distributing data with Apache HDFS

138

Parsing CSV files with Cascalog

141

Executing complex queries with Cascalog

143

Aggregating data with Cascalog

146
Defining new Cascalog operators

148

Composing Cascalog queries

151

Transforming data with Cascalog

153

ii

Table of Contents

Chapter 6: Working with Incanter Datasets

155

Introduction 156

Loading Incanter's sample datasets

156

Loading Clojure data structures into datasets

157

Viewing datasets interactively with view

159

Converting datasets to matrices

161

Using infix formulas in Incanter


Other documents randomly have
different content
And he made it unmistakably plain that what he meant was:
‘Do you think I’m such a fool as to let you go? I’ll see you damned
first!’
Thus it was that Pickersdyke, a disillusioned and a baffled man,
stared out of the window with wrath and bitterness in his heart. For
he wanted to go back to ‘the old troop’; he was obsessed with the
idea almost to the exclusion of everything else. He craved for the old
faces and the old familiar atmosphere as a drug-maniac craves for
morphia. It was his right, he had earned it by nine months of
drudgery—and who the devil, anyway, he felt, was this old fool to
thwart him?
Extravagant plans for vengeance flitted through his mind.
Supposing he were to lose half a dozen wagons or thousands of
rounds of howitzer ammunition, would his colonel get sent home?
Not he—he’d blame his adjutant, and the latter would quite possibly
be court-martialled. Should he hide all the colonel’s clothes and only
reveal their whereabouts when the application had been forwarded?
Should he steal his whisky (without which it was doubtful if he could
exist), put poison in his tea, or write an anonymous letter to
headquarters accusing him of espionage? He sighed—ingenuity, his
valuable ally on many a doubtful occasion, failed him now. Then it
occurred to him to appeal to one Lorrison, who was the captain of his
old battery, and whom he had known for years as one of his
subalterns.

‘Dear Lorrison,’ he wrote, ‘I’ve just had an interview with


my old man and he won’t agree to my transfer. I’m afraid it’s a
wash-out unless something can be done quickly, as I suppose
Jordan will be promoted very soon.’ (Jordan was the senior
subaltern.) ‘You know how much I want to get back in time for
the big show. Can you do anything? Sorry to trouble you, and
now I must close.
‘Yours,
‘W. Pickersdyke.’
Then he summoned his servant. Gunner Scupham was an elderly
individual with grey hair, a dignified deportment, and a countenance
which suggested extreme honesty of soul but no intelligence
whatsoever. Which fact was of great assistance to him in the
perpetration of his more complicated villainies. He had not been
Pickersdyke’s storeman for many years for nothing. His devotion
was a by-word, but his familiarity was sometimes a little startling.
‘’E won’t let us go,’ announced Pickersdyke.
‘Strafe the blighter!’ replied Scupham feelingly. ‘I’m proper fed up
with this ’ere column job.’
‘Get the office bike, take this note to Captain Lorrison, and bring
back an answer. Here’s a pass.’
Scupham departed, grumbling audibly. It meant a fifteen-mile ride,
the day was warm, and he disliked physical exertion. He returned
late that evening with the answer, which was as follows:

‘Dear Pickers,—Curse your fool colonel. Jordan may go


any day, and if we don’t get you we’ll probably be stuck with
some child who knows nothing. Besides, we want you to
come. The preliminary bombardment is well under way, so
there’s not much time. Meet me at the B.A.C.[7] headquarters
to-morrow evening at 8 and we’ll fix up something. In haste,
‘Yours ever,
‘T. Lorrison.’

There are people who do not believe in luck. But if it was not luck
which assisted Pickersdyke by producing the events which followed
his receipt of that note, then it was Providence in a genial and most
considerate mood. He spent a long time trying to think of a
reasonable excuse for going to see Lorrison, but he might have
saved himself the trouble. Some light-hearted fool had sent up
shrapnel instead of high explosive to the very B.A.C. that
Pickersdyke wanted to visit. Angry telephone messages were
coming through, and the colonel at once sent his adjutant up to offer
plausible explanations.
Pickersdyke covered a lot of ground that afternoon. It was
necessary to find an infuriated artillery brigadier and persuade him
that the error was not likely to occur again, and was in any case not
really the fault of the D.A.C. section commander. It was then
necessary to find this latter and make it clear to him that he was
without doubt the most incompetent officer in the allied forces, and
that the error was entirely due to his carelessness. And it was
essential to arrange for forwarding what was required.
Lorrison arrived punctually and evidently rather excited.
‘What price the news?’ he said at once.
Pickersdyke had heard none. He had been far too busy.
‘We’re for it at last—going to bombard all night till 4.30 a.m.—every
bally gun in the army as far as I can see. And we’ve got orders to be
ready to move in close support of the infantry if they get through. To
move! Just think of that after all these months.’
Pickersdyke swore as he had not done since he was a rough-
riding bombardier.
‘And that’s boxed my chances,’ he ended up.
‘Wait a bit,’ said Lorrison. ‘There’s a vacancy waiting for you if
you’ll take it. We got pretty badly “crumped”[8] last night. The
Bosches put some big “hows” and a couple of “pip-squeak” batteries
on to us just when we were replenishing. They smashed up several
wagons and did a lot of damage. Poor old Jordan got the devil of a
shaking—he was thrown about ten yards. Lucky not to be blown to
bits, though. Anyway, he’s been sent to hospital.’
He looked inquiringly at Pickersdyke. The latter’s face portrayed
an unholy joy.
‘Will I take his place?’ he cried. ‘Lummy! I should think I would.
Don’t care what the colonel says afterwards. When can I join? Now?’
‘As soon as I’ve seen about getting some more wagons from the
B.A.C. we’ll go up together,’ answered Lorrison.
Pickersdyke, who had no conscience whatever on occasions such
as this, sent a message to his colonel to say that he was staying up
for the night (he omitted to say precisely where!), as there would be
much to arrange in the morning. To Scupham he wrote:

‘Collect all the kit you can and come up to the battery at
once. Say nothing.’

He was perfectly aware that he was doing a wildly illegal thing. He


felt like an escaped convict breathing the air of freedom and making
for his home and family. Forty colonels would not have stopped him
at that moment.

II.

The major commanding the ⸺th Battery sat in his dug-out


examining a large-scale trench map. His watch, carefully
synchronised with those of the staff, lay on the table in front of him.
Outside, his six guns were firing steadily, each concussion (and
there were twelve a minute) shaking everything that was not a fixture
in the little room. Hundreds of guns along miles of front and miles of
depth were taking part in the most stupendous bombardment yet
attempted by the army. From ‘Granny,’ the enormous howitzer that
fired six times an hour at a range of seventeen thousand yards, to
machine guns in the front line trenches, every available piece of
ordnance was adding its quota to what constituted a veritable hell of
noise.
The major had been ordered to cut the wire entanglements
between two given points and to stop firing at 4.30 a.m. precisely. He
had no certain means of knowing whether he had completed his task
or not. He only knew that his ‘lines of fire,’ his range, and his ‘height
of burst’ as previously registered in daylight were correct, that his
layers could be depended upon, and that he had put about a
thousand rounds of shrapnel into a hundred and fifty yards of front.
At 4.29 he rose and stood, watch in hand, in the doorway of his dug-
out. A man with a megaphone waited at his elbow. The major, war-
worn though he was, was still young enough in spirit to be thrilled by
the mechanical regularity of his battery’s fire. This perfection of drill
was his work, the result of months and months of practice, of loving
care, and of minute attention to detail.
Dawn was beginning to creep into the sky, and he could just
distinguish the silhouettes of the two right-hand guns. The flash as
one of them fired revealed momentarily the figures of the gunners
grouped round the breech like demons round some spectral engine
of destruction. Precisely five seconds afterwards a second flash
denoted that the next gun had fired—and so on in sequence from
right to left until it was the turn of Number One again.
‘Stop,’ said the major when the minute hand of his watch was
exactly over the half-hour.
‘Stop!’ roared the man with the megaphone.
It was as if the order had been heard all along the entire front. The
bombardment ceased almost abruptly, and rifle and machine-gun fire
became audible again. On a colossal scale the effect was that of the
throttling down of a powerful motor-car whose engine had been
allowed to race. Then, not many moments afterwards, from far away
to the eastward there came faint, confused sounds of shouts and
cheering. It was the infantry, the long-suffering, tenacious, wonderful
infantry charging valiantly into the cold grey dawn along the avenues
prepared by the guns....
For Pickersdyke it had been a night of pure joy, unspoilt by any
qualms of conscience. He had been welcomed at the battery as a
kind of returned wanderer and given a section of guns at once. The
major—who feared no man’s wrath, least of all that of a dug-out
D.A.C. commander—had promised to back him up if awkward
questions were asked. Pickersdyke had only one cause for
disappointment—the whole thing had gone too smoothly. He was
bursting with technical knowledge, he could have repaired almost
any breakdown, and had kept a keen look-out for all ordinary
mistakes. But nothing went wrong and no mistakes were made. In
this battery the liability of human error had been reduced to a
negligible minimum. Pickersdyke had had nothing further to do than
to pass orders and see that they were duly received. Nevertheless
he had loved every moment of it, for he had come into his own—he
was back in the old troop, taking part in a ‘big show.’ As he observed
to the major whilst they were drinking hot coffee in the dug-out
afterwards:
‘Even if I do get court-martialled for desertion, sir, that last little lot
was worth it!’
And he grinned as does a man well pleased with the success of
his schemes. To complete his satisfaction, Scupham appeared soon
afterwards bringing up a large bundle of kit and a few luxuries in the
way of food. It transpired that he had presented himself to the last-
joined subaltern of the D.A.C. and had bluffed that perplexed and
inexperienced officer into turning out a cart to drive him as far as the
battery wagon line, whence he had come up on an ammunition
wagon.
It was almost daylight when the battery opened fire again, taking
its orders by telephone now from the F.O.O.,[9] who was in close
touch with the infantry and could see what was happening. The rate
of fire was slow at first; then it suddenly quickened, and the range
was increased by a hundred yards. Some thirty shells went shrieking
on their mission and then another fifty yards were added. The
infantry was advancing steadily, and just as steadily, sixty or seventy
yards in front of their line, the curtain of protecting shrapnel crept
forward after the retiring enemy. At one point the attack was
evidently held up for a while; the battery changed to high explosive
and worked up to its maximum speed, causing Lorrison to telephone
imploring messages for more and still more ammunition....
The long-expected order to advance, when at last it came, nearly
broke the major’s heart.
‘Send forward one section,’ it said, ‘in close support of the 2nd
Battalion ⸺shire Regiment, to the advanced position previously
prepared in J. 12.’
One section was only a third of his battery; he would have to stay
behind, and he had been dreaming nightly of this dash forward with
the infantry into the middle of things; he had had visions of that
promised land, the open country beyond the German lines, of an end
to siege warfare and a return to the varying excitement of a running
fight. But orders were orders, so he sent for Pickersdyke.
‘I’m going to send you,’ he said after showing him the order,
‘although you haven’t seen the position before. But the other lad is
too young for this job. Look here.’
He pointed out the exact route to be followed, showed him where
bridges for crossing the trenches had been prepared, and explained
everything in his usual lucid manner. Then he held out his hand.
‘Good-bye and good luck,’ he said. Their eyes met for a moment in
a steady gaze of mutual esteem and affection. For they knew each
other well, these two men—the gentleman born to lead and to
inspire, and his ranker subordinate (a gentleman too in all that
matters) highly trained, thoroughly efficient, utterly devoted....
There was not a prouder man in the army than Pickersdyke at the
moment when he led his section out from the battery position amid
the cheers of those left behind. His luck, so he felt, was indeed
amazing. He had about a mile to go along a road that was congested
with troops and vehicles of all sorts. He blasphemed his way through
(there is no other adequate means of expressing his progress) with
his two guns and four wagons until he reached the point where he
had to turn off to make for his new position. This latter had been
carefully prepared beforehand by fatigue parties sent out from the
battery at night. Gun-pits had been dug, access made easy, ranges
and angles noted down in daylight by an officer left behind expressly
for the purpose; and the whole had been neatly screened from aerial
observation. It lay a few hundred yards behind what had been the
advanced British trenches. But it was not a good place for guns; it
was only one in which they might be put if, as now, circumstances
demanded the taking of heavy risks.
Pickersdyke halted his little command behind the remains of a
spinney and went forward to reconnoitre. He was still half a mile from
his goal, which lay on a gentle rise on the opposite side of a little
valley. Allowing for rough ground and deviations from the direct route
owing to the network of trenches which ran in all directions, he
calculated that it would take him at least ten minutes to get across.
Incidentally he noticed that quite a number of shells were falling in
the area he was about to enter. For the first time he began to
appreciate the exact nature of his task. He returned to the section
and addressed his men thus:
‘Now, you chaps, it’s good driving what’s wanted here. We must
get the guns there whatever happens—we’ll let down the infantry
else. Follow me and take it steady, ... Terr-ot.’
The teams and carriages jingled and rattled along behind him as
he led them forward. Smooth going, the signal to gallop, and a dash
for it would have been his choice, but that was impossible.
Constantly he was forced to slow down to a walk and dismount the
detachments to haul on the drag-ropes. The manœuvre developed
into a kind of obstacle race, with death on every side. But his luck
stood by him. He reached the position with the loss only of a gunner,
two drivers, and a pair of lead horses.
As soon as he had got his guns into action and his teams away (all
of which was done quietly, quickly, and without confusion—‘as per
book’ as he expressed it) Pickersdyke crawled up a communication
trench, followed by a telephonist laying a wire, until he reached a
place where he could see. It was the first time that he had been so
close up to the firing line, and he experienced the sensations of a
man who looks down into the crater of a live volcano. Somewhere in
the midst of the awful chaos in front of him was, if it still existed at all,
the infantry battalion he was supposed to have been sent to support.
But how to know where or when to shoot was altogether beyond him.
He poked his glasses cautiously through a loophole and peered into
the smoke in the vain hope of distinguishing friend from foe.
‘What the hell shall I do now?’ he muttered. ‘Can’t see no bloomin’
target in this lot.... Crikey! yes, I can, though,’ he added. ‘Both guns
two degrees more left, fuze two, eight hundred....’ He rattled off his
orders as if to the manner born. The telephonist, a man who had
spent months in the society of forward observing officers, repeated
word for word into his instrument, speaking as carefully as the
operator in the public call office at Piccadilly Circus.
The guns behind blazed and roared. A second afterwards two
fleecy balls of white smoke, out of which there darted a tongue of
flame, appeared in front of the solid grey wall of men which
Pickersdyke had seen rise as if from the earth itself and surge
forward. A strong enemy counter-attack was being launched, and he,
with the luck of the tyro, had got his guns right on to it. Methodically
he switched his fire up and down the line. Great gaps appeared in it,
only to be quickly filled. It wavered, sagged, and then came on
again. Back at the guns the detachments worked till the sweat
streamed from them; their drill was perfect, their rate of fire the
maximum. But the task was beyond their powers. Two guns were not
enough. Nevertheless the rush, though not definitely stopped, had
lost its full driving force. It reached the captured trenches (which the
infantry had had no time to consolidate), it got to close quarters, but
it did not break through. The wall of shrapnel had acted like a
breakwater—the strength of the wave was spent ere it reached its
mark—and like a wave it began to ebb back again. In pursuit,
cheering, yelling, stabbing, mad with the terrible lust to kill and kill
and kill, came crowds of khaki figures.
Pickersdyke, who had stopped his fire to avoid hitting his own side
and was watching the fight with an excitement such as he had never
hoped to know, saw that the critical moment was past; the issue was
decided, and his infantry were gaining ground again. He opened fire
once more, lengthening his range so as to clear the mêlée and yet
hinder the arrival of hostile reserves, which was a principle he had
learnt from a constant study of ‘the book.’
Suddenly there were four ear-splitting cracks over his head, and a
shower of earth and stones rattled down off the parapet a few yards
from him.
‘We’re for it now,’ he exclaimed.
He was. This first salvo was the prelude to a storm of shrapnel
from some concealed German battery which had at last picked up
the section’s position. But Pickersdyke continued to support his
advancing infantry....
‘Wire’s cut, sir,’ said the telephonist suddenly.
It was fatal. It was the one thing Pickersdyke had prayed would not
happen, for it meant the temporary silencing of his guns.
‘Mend it and let me know when you’re through again,’ he ordered.
‘I’m going down to the section.’ And, stooping low, he raced back
along the trench.
At the guns it had been an unequal contest, and they had suffered
heavily. The detachments were reduced to half their strength, and
one wagon, which had received a direct hit, had been blown to
pieces.
‘Stick it, boys,’ said Pickersdyke after a quick look round. He saw
that if he was to continue shooting it would be necessary to stand on
the top of the remaining wagon in order to observe his fire. And he
was determined to continue. He climbed up and found that the
additional four feet or so which he gained in height just enabled him
to see the burst of his shells. But he had no protection whatever.
‘Add a hundred, two rounds gun-fire,’ he shouted—and the guns
flashed and banged in answer to his call. But it was a question of
time only. Miraculously, for almost five minutes he remained where
he was, untouched. Then, just as the telephonist reported ‘through’
again the inevitable happened. An invisible hand, so it seemed to
Pickersdyke, endowed with the strength of twenty blacksmiths, hit
him a smashing blow with a red-hot sledge-hammer on the left
shoulder. He collapsed on to the ground behind his wagon with the
one word ‘Hell!’ And then he fainted....
At 8 p.m. that night the ⸺th Battery received orders to join up
with its advanced section and occupy the position permanently. It
was after nine when Lorrison, stumbling along a communication
trench and beginning to think that he was lost, came upon the
remnants of Pickersdyke’s command. They were crouching in one of
the gun-pits—a bombardier and three gunners, very cold and very
miserable. Two of them were wounded. Lorrison questioned them
hastily and learnt that Pickersdyke was at his observing station, that
Scupham and the telephonist were with him, and that there were two
more wounded men in the next pit.
‘The battery will be here soon,’ said Lorrison cheerily, ‘and you’ll all
get fixed up. Meanwhile here’s my flask and some sandwiches.’
‘Beg pardon, sir,’ said the bombardier, ‘but Mr. Pickersdyke ’ll need
that flask. ’E’s pretty bad, sir, I believe.’
Lorrison found Pickersdyke lying wrapped in some blankets which
Scupham had fetched from the wagon, twisting from side to side and
muttering a confused string of delirious phrases. ‘Fuze two—more
right I said—damn them, they’re still advancing—what price the old
⸺th now?...’ and then a groan and he began again.
Scupham, in a husky whisper, was trying to soothe him. ‘Lie still
for Gawd’s sake and don’t worry yourself,’ he implored.
By the time Lorrison had examined the bandages on
Pickersdyke’s shoulder and administered morphia (without a supply
of which he now never moved) the battery arrived, and with it some
stretcher-bearers. Pickersdyke, just before he was carried off,
recovered consciousness and recognised Lorrison, who was close
beside him.
‘Hullo!’ he said in a weak voice. ‘Nice box-up here, isn’t it? But I
reckon we got a bit of our own back ’fore we was knocked out. Tell
the major the men were just grand. Oh! and before I forget, amongst
my kit there’s a few “spares” I’ve collected; they might come in handy
for the battery. I shan’t be away long, I hope.... Wonder what the old
colonel will say....’ His voice trailed off into a drowsy murmur—the
morphia had begun to take effect....
Lorrison detained Scupham in order to glean more information.
‘After ’e got ’it, sir,’ said Scupham, ‘’e lay still for a bit, ’arf an hour
pr’aps, and ’ardly seemed to know what was ’appening. Then ’e
suddenly calls out: “Is that there telephone workin’ yet?” “Yes, sir,” I
says—and with that ’e made for to stand up, but ’e couldn’t. So wot
does ’e do then but makes me bloomin’ well carry ’im up the trench
to the observin’ station. “Now then, Scupham,” ’e says, “prop me up
by that loophole so I can see wot’s comin’ off.” And I ’ad to ’old ’im
there pretty near all the afternoon while ’e kep’ sending orders down
the telephone and firing away like ’ell. We finished our ammunition
about five o’clock, and then ’e lay down where ’e was to rest for a bit.
’Ow ’e’d stuck it all that time with a wound like that Gawd only
knows. ’E went queer in ’is ’ead soon after and we thought ’e was a
goner—and then nothin’ much ’appened till you came up, sir, ’cept
that we was gettin’ a tidy few shells round about. D’you reckon ’e’ll
get orl right, sir?’
It was evident that the unemotional Scupham was consumed with
anxiety.
‘Oh! he must!’ cried Lorrison. ‘It would be too cruel if he didn’t pull
through after all he’s done. He’s a man if ever there was one.’
‘And that’s a fact,’ said Scupham, preparing to follow his idol to the
dressing station. As he moved away Lorrison heard him mutter,
‘There ain’t no one on Gawd’s earth like old Pickers—fancy ’im
rememberin’ them there “spares.” ‘Strewth! ’e is a one!’ Which was a
very high compliment indeed....

Official correspondence, even when it is marked ‘Pressing and


Confidential’ in red ink and enclosed in a sealed envelope, takes a
considerable time to pass through the official channels and come
back again. It was some days before the colonel commanding a
certain divisional ammunition column received an answer to his
report upon the inexplicable absence of his adjutant. He was a
vindictive man who felt that he had been left in the lurch, and he had
taken pains to draft a letter which would emphasise the
shortcomings of his subordinate. The answer, when it did come,
positively shocked him. It was as follows:

‘With reference to your report upon the absence without


leave of Second Lieutenant Pickersdyke, the Major-General
Commanding directs me to say that as this officer was
severely wounded on September 25 whilst commanding a
section of the ⸺th Battery R.F.A. with conspicuous courage
and ability, for which he has been specially recommended for
distinction by the G.O.C.R.A., and as he is now in hospital in
England, no further action will be taken in the matter.’

To be snubbed by the Staff because he had reported upon the


scandalous conduct of a mere ‘ranker’ was not at all the colonel’s
idea of the fitness of things. His fury, which vented itself chiefly upon
his office clerk, would have been greater still if he could have seen
his late adjutant comfortably ensconced in a cosy ward in one of the
largest houses of fashionable London, waited upon by ladies of title,
and showing an admiring circle of relations the jagged piece of steel
which a very famous surgeon had extracted from his shoulder free of
charge!
For, in spite of his colonel, the progress of Pickersdyke on the
chosen path of his ambition was now quite definitely assured.
Jeffery E. Jeffery.

FOOTNOTES
[7] Brigade Ammunition Column.
[8] Shelled.
[9] Forward Observing Officer.
BALLIOL MEMORIES.
a note by the hon. a. e. gathorne-hardy.
My article in the October number has brought me many kind
letters from old Balliol friends for which I am grateful, and one or two
errors have been called to my attention, which I should like to
correct. Sir Courtenay Ilbert points out that I am mistaken in claiming
the present Speaker as a member of Balliol College, ‘he was of
Trinity, Cambridge.’
Francis Le Marchant points out that ‘Dick Webster,’ the late Lord
Alverstone, and not Lawes as stated, beat Jersey in the mile race in
the first Inter-University Sports held at Cambridge; ‘believe an
eyewitness.’ Sneyd Kynnersley contributes an amusing anecdote
about the latter’s trophies. Count Karolyi was admiring his display of
racing cups, and noticing one in particular, asked what horse won it.
‘Oh,’ answered his host, ‘I won that one myself in a three-mile race.’
‘Do you mean to say, Lord Jersey,’ said the Count, ‘that you ran
three miles without sitting down!’
I should like also to correct a careless error in my quotation of
Tennyson’s metrical compliment to Katherine Bradshaw. The first two
lines should read:

Because she bore the iron name


Of him who doomed ‘his’ King to die,

instead of, as printed, ‘the’ King. I am sure the exquisite ear of the
author would attach importance to the correction; he would never
have allowed the cadence and stress to fall on such an insignificant
word and sound as ‘the.’
*** END OF THE PROJECT GUTENBERG EBOOK THE CORNHILL
MAGAZINE (VOL. XLI, NO. 245 NEW SERIES, NOVEMBER 1916)
***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright
in these works, so the Foundation (and you!) can copy and
distribute it in the United States without permission and without
paying copyright royalties. Special rules, set forth in the General
Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree to
abide by all the terms of this agreement, you must cease using
and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project
Gutenberg™ works in compliance with the terms of this
agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms
of this agreement by keeping this work in the same format with
its attached full Project Gutenberg™ License when you share it
without charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it
away or re-use it under the terms of the Project Gutenberg
License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country where
you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of the
copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.
1.E.5. Do not copy, display, perform, distribute or redistribute
this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information

You might also like