Data Visualization with Python and JavaScript Scrape Clean Explore Transform Your Data 1st Edition Kyran Dale pdf download
Data Visualization with Python and JavaScript Scrape Clean Explore Transform Your Data 1st Edition Kyran Dale pdf download
https://ebookname.com/product/data-visualization-with-python-and-
javascript-scrape-clean-explore-transform-your-data-1st-edition-
kyran-dale/
https://ebookname.com/product/python-data-visualization-cookbook-
milovanovic/
https://ebookname.com/product/managing-your-biological-data-with-
python-1st-edition-via/
https://ebookname.com/product/pro-data-visualization-using-r-and-
javascript-1st-edition-tom-barker/
https://ebookname.com/product/god-fearing-and-free-1st-edition-
jason-w-stevens/
The Encyclopedia of Ghosts and Spirits 3rd ed Edition
Rosemary Guiley
https://ebookname.com/product/the-encyclopedia-of-ghosts-and-
spirits-3rd-ed-edition-rosemary-guiley/
https://ebookname.com/product/project-procurement-management-
contracting-subcontracting-teaming-1st-edition-quentin-fleming/
https://ebookname.com/product/nationalism-ethnicity-and-
boundaries-conceptualising-and-understanding-identity-through-
boundary-approaches-1st-edition-jennifer-jackson/
https://ebookname.com/product/oiling-the-urban-economy-land-
labour-capital-and-the-state-in-sekondi-takoradi-ghana-1st-
edition-franklin-obeng-odoom/
https://ebookname.com/product/visual-dysfunction-in-diabetes-the-
science-of-patient-impairment-and-health-care-1st-edition-
heather-stuckey-auth/
Mixture Toxicity Linking Approaches from Ecological and
Human Toxicology Society of Environmental Toxicology
and Chemistry Setac 1st Edition Cornelis A. M. Van
Gestel
https://ebookname.com/product/mixture-toxicity-linking-
approaches-from-ecological-and-human-toxicology-society-of-
environmental-toxicology-and-chemistry-setac-1st-edition-
cornelis-a-m-van-gestel/
Data Visualization with
Python and JavaScript
Scrape, Clean, Explore &
Transform Your Data
Kyran Dale
Data Visualization with Python and JavaScript
by Kyran Dale
Copyright © 2016 Kyran Dale. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway
North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business,
or sales promotional use. Online editions are also available
for most titles (http://oreilly.com/safari). For more
information, contact our corporate/institutional sales
department: 800-998-9938 or [email protected].
Editors: Dawn Schanafelt and
Meghan Blanchette
See http://oreilly.com/catalog/errata.csp?
isbn=9781491920510 for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media,
Inc. Data Visualization with Python and JavaScript, the cover
image, and related trade dress are trademarks of O’Reilly
Media, Inc.
While the publisher and the author have used good faith
efforts to ensure that the information and instructions
contained in this work are accurate, the publisher and the
author disclaim all responsibility for errors or omissions,
including without limitation responsibility for damages
resulting from the use of or reliance on this work. Use of the
information and instructions contained in this work is at
your own risk. If any code samples or other technology this
work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is
your responsibility to ensure that your use thereof complies
with such licenses and/or rights.
978-1-491-92051-0
[LSI]
Preface
Italic
Indicates new terms, URLs, email addresses, filenames,
and file extensions.
Constant width
Used for program listings, as well as within paragraphs
to refer to program elements such as variable or
function names, databases, datatypes, environment
variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed
literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied
values or by values determined by context.
TIP
This element signifies a tip or suggestion.
NOTE
This element signifies a general note.
WARNING
This element indicates a warning or caution.
Using Code Examples
Supplemental material (code examples, exercises, etc.) is
available for download at https://github.com/Kyrand/dataviz-
with-python-and-js.
This book is here to help you get your job done. In general,
if example code is offered with this book, you may use it in
your programs and documentation. You do not need to
contact us for permission unless you’re reproducing a
significant portion of the code. For example, writing a
program that uses several chunks of code from this book
does not require permission. Selling or distributing a CD-
ROM of examples from O’Reilly books does require
permission. Answering a question by citing this book and
quoting example code does not require permission.
Incorporating a significant amount of example code from
this book into your product’s documentation does require
permission.
We appreciate, but do not require, attribution. An attribution
usually includes the title, author, publisher, and ISBN. For
example: “Data Visualization with Python and JavaScript by
Kyran Dale (O’Reilly). Copyright 2016 Kyran Dale, 978-1-
491-92051-0.”
If you feel your use of code examples falls outside fair use
or the permission given above, feel free to contact us at
[email protected].
O’Reilly Safari
NOTE
Safari (formerly Safari Books Online) is a membership-based
training and reference platform for enterprise, government,
educators, and individuals.
Members have access to thousands of books, training
videos, Learning Paths, interactive tutorials, and curated
playlists from over 250 publishers, including O’Reilly Media,
Harvard Business Review, Prentice Hall Professional,
Addison-Wesley Professional, Microsoft Press, Sams, Que,
Peachpit Press, Adobe, Focal Press, Cisco Press, John Wiley &
Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt,
Adobe Press, FT Press, Apress, Manning, New Riders,
McGraw-Hill, Jones & Bartlett, and Course Technology,
among others.
For more information, please visit http://oreilly.com/safari.
How to Contact Us
Please address comments and questions concerning this
book to the publisher:
O’Reilly Media, Inc.
Sebastopol, CA 95472
707-829-0104 (fax)
NOTE
If you’re reading this, I’d love to hear any feedback you have. Please
post it to [email protected]. Thanks a lot.
You’ll also find a working copy of the Nobel visualization the book
literally and figuratively builds toward at
http://kyrandale.com/static/pyjsdataviz/index.html.
Java
Among the other main, general-purpose programming
languages, only Java offers anything like the rich ecosystem
of libraries that Python does, with considerably more native
speed too. But while Java is a lot easier to program in than
languages like C++, it isn’t, in my opinion, a particularly
nice language to program in, having rather too much in the
way of tedious boilerplate code and excessive verbiage. This
sort of thing starts to weigh heavily after a while and makes
for a hard slog at the code face. As for speed, Python’s
default interpreter is slow, but Python is a great glue
language that plays nicely with other languages. This ability
is demonstrated by the big Python data-processing libraries
like NumPy (and its dependent, Pandas), Scipy, and the like,
which use C++ and Fortran libraries to do the heavy lifting
while providing the ease of use of a simple, scripting
language.
R
The venerable R has, until recently, been the tool of choice
for many data scientists and is probably Python’s main
competitor in the space. Like Python, R benefits from a very
active community, some great tools like the plotting library
ggplot, and a syntax specially crafted for data science and
statistics. But this specialism is a double-edged sword.
Another Random Document on
Scribd Without Any Related Topics
with their bold looks, and hair falling to their breasts in curly locks as
they laid aside their weapons, were the admiration of all. Even the
gloomy Kulkhan seemed cheerful: he introduced his son to us, and
after Hadji Bilal had bestowed his benediction upon him, we
separated. The next morning we were to proceed from Gömüshtepe,
accompanied by Kulkhan, his son, and stolen horses, to Etrek.
{70}
CHAPTER VI.
Our path was north-easterly, departing more and more from the sea-
shore, in the direction of the two great mounds, of which one bears
the name of Köresofi, the other that of Altin Tokmak. Besides these
mounds, one discovers here and there numerous Joszka (Turkoman
barrows); with these exceptions, the district is one boundless flat.
Scarcely a quarter of a league from Gömüshtepe, we found ourselves
proceeding through splendid meadows, where the grass was as high
as the knee, and of a delicious odour. It all withers away without
being of service to any one, for the inhabitants of Gömüshtepe are
Tchomru (that is, not cattle-breeders). What lovely villages might
flourish in this well-watered district; what animated life might here
reign, instead of the stillness of death! Our small karavan, consisting
of the camels belonging to Ilias and of six horses, kept close
together, for Kulkhan affirmed that there were hereabouts Karaktchis
who were not under his orders, and who would assail him if they felt
themselves strong enough to do so. Ilias, this once, was pleased to
spare me my ride upon the camel; he took from Kulkhan one of the
stolen horses, upon which I was to ride as far as Etrek. Unfortunately,
as it happened, Emir Mehemmed, the Afghan opium-eater from
Karatepe, who had already fastened himself upon our karavan, had
remained on foot, and whenever we had to traverse any puddle or
other wet ground, I could not refuse to take him on my saddle, and
then he grasped my clothes so tightly that I often {72} thought I
should be thrown down. This partnership ride made me run much
risk when we were obliged to cut our way through the great
marshes, covered with reeds, which swarmed with herds of wild
boars, numerous beyond conception. Kulkhan and Ilias rode before,
to find a circuitous way, to enable us to avoid hundreds of these
animals, whose proximity we perceived, not only by their incessant
grunting, but more especially by the cracking sound caused by their
movements amongst the reeds. Whilst I was riding on with attentive
ear, my horse suddenly shied and took a great bound sideways. I had
hardly time to look round to ascertain the cause, when I and my
comrade lay stretched upon the ground. The loud laughter of my
companions, who were a few paces from us, mingled with a strange
howling. I turned myself round, and found that I had been thrown
upon two wild boars of tender age; it was their mother that had
caused our horse to shy, but now, rendered savage by the cry of her
young ones, she stood showing her tusks at no great distance from
us, and would most certainly have charged us, had not Shirdjan, the
cousin of Ilias, come to our aid, and barred the way with his
extended lance. Whether it was owing to the bravery of the young
Turkoman, or the silence of the young pigs--now liberated from their
constrained position--I cannot say, but the incensed mother beat a
retreat, and, with her face still to the foe, hastened back to her lair,
which we had not been slow to abandon. Kulkhan's son had in the
meantime secured our horse, that had escaped. He restored him to
me with the remark that 'I might regard myself as lucky, for that a
death by the wound of a wild boar would send even the most pious
Musselman nedjis (unclean) {73} into the next world, where a
hundred years' burning in purgatorial fire would not purge away his
uncleanness.'
After having continued our way for about four hours in the above-
named direction, amidst marshes and meadows, I noticed that we
had gained the sloping sides of the plateau that extends north from
Gömüshtepe, for not only the elevations, but the Persian mountains
on the frontiers themselves, began gradually to disappear; only a few
groups of tents, in the vicinity of which camels were grazing, were
visible at a great distance, and although, on all the four sides, the
most lovely verdure enchanted the eye, the eastern district which I
had visited before with Kizil Akhond, is far more thickly peopled.
There being no river like the Görghen, the well-water, of which the
people make use, is exhausted by the time the rich meadows have
sufficiently fattened their sheep. Tents, consequently, are only to be
seen here in May and in June. One of these groups of tents, peopled
by the dependents of Kulkhan, was to give us shelter this night, as
Etrek was still six miles [Footnote 17] distant--a whole day's journey
for our heavily-laden camels. Due notice had been given of our
approach, and my hungry fellow-travellers soon saw in the rising
smoke the prospect of a good supper. Although Gömüshtepe is only
four miles distant from this spot, the journey took us nearly eight
hours, and this first ride had tolerably wearied both man and beast.
The young nephew of Kulkhan advanced ten paces before the tents
to welcome us; and, whilst Ilias and the Afghan were the special
guests of Kulkhan, I was quartered with the Hadjis in the small tent
of Allah Nazr. {74} This old Turkoman was beside himself from joy
that heaven had sent him guests; the recollection of that scene will
never pass from my mind. In spite of our protestations to the
contrary, he killed a goat, the only one which he possessed, to
contribute to our entertainment. At a second meal, which we partook
with him next day, he found means to procure bread also, an article
that had not been seen for weeks in his dwelling. Whilst we attacked
the dish of meat, he seated himself opposite to us, and wept, in the
exactest sense of the expression, tears of joy. Allah Nazr would not
retain any part of the goat he had killed in honour of us. The horns
and hoofs, which were burned to ashes, and were to be employed for
the galled places on the camels, he gave to Ilias; but the skin,
stripped off in one piece, he destined to serve as my water-vessel,
and after having well rubbed it with salt, and dried it in the sun, he
handed it over to me.
[Persian Slave]
The arrival of a slave, one of the five of whom I spoke in the last
chapter, who had fallen into the snare so treacherously laid for them,
detained Kulkhan and our party a day. This poor Persian was
transferred, for chastisement, to Kulkhan, who had the peculiar
reputation of being able most easily to ascertain from a captive
whether he possessed sufficient means to enable his relatives to
ransom him, or whether, being without relatives or property, he ought
to be sent on to Khiva for sale.
This day I took my seat for the first time in my wooden basket on the
camel, having, however, some sacks of flour for my equipoise, as
Hadji Bilal wished on this occasion to deprive himself of the pleasure.
Our route was always in a northerly direction, and we had scarcely
advanced two leagues, when the verdure ceased, and for the first
time we found ourselves in the dismal strong-smelling salt ground of
the wilderness. What our eyes encountered here was a good
specimen; a low foreland called Kara Sengher (black wall) elevated
itself at a distance of about eight miles to the north of Gömüshtepe.
The nearer we approached this hill, the looser the soil became; near
to its foot we fell upon a real morass, and our march was attended by
increasing difficulties in the slippery mud, in which the camels, with
their spongy feet, slid at each step--indeed, mine threatened to upset
both myself and my basket into the dirt. I preferred dismounting
proprio motu, and after tramping an hour and a half through the
mud, arrived at last at {76} Kara Sengher, whence we soon reached
the Ova of Kulkhan.
{77}
[A Turkoman Wife and Slave]
{81}
1. The first, close along the shore of the Caspian, behind the greater
Balkan, which direction it follows for a two days' journey towards the
north from these mountains, and then, after proceeding ten days, the
traveller has to turn to the east, in which quarter Khiva lies. This way
is only accessible for the smaller karavans, as it affords but little
water, but presents as little danger from attacks, except in times of
extraordinary revolutions, when the Kasaks (Kirghis) or the
Karakalpaks send hither their Alaman.
3. The third is the straight route and the shortest; for while we
require twenty-four days for the first, and twenty for the second, this
one may be performed in fourteen. Immediately on leaving Etrek one
takes a north-easterly direction, through the Göklen and Tekke
Turkomans. At every station wells of sweet drinkable water occur. Of
course a karavan must be on good terms with the tribes above
named, and must count from two to three thousand men, otherwise
the passage is impossible. How great then was my joy, when one
evening a messenger from Ata-bay brought us the intelligence that
the Kervanbashi would leave his encampment early the following
morning, and would give us rendezvous the day after at noon, on the
opposite bank of the Etrek, whence we were to proceed all together
upon our great journey through the desert! Ilias issued orders for us
all to complete our preparations as speedily as possible. We therefore
that very same evening got our bread ready; we once more salted
our large pieces of camel-flesh, which we had received from the
nomads in payment for the benedictions we had lavished on them.
Who then was {82} happier than I, when the next day I mounted the
kedjeve with Hadji Bilal, and in my creaking seat slowly left Etrek,
borne forwards by the wave-like pace of the camel?
[Tribe Kem]
{84}
The hill above named, which is but a sort of promontory jutting out
from a long chain of inconsiderable hills stretching to the south-east,
affords an extensive and fine view. To the west we discover the
Caspian Sea like a range of blue clouds; the mountains of Persia are
also distinguishable: but the greatest interest attaches to the
mountain plain to our south, whose limit the eye cannot discern, on
which the scattered groups of tents in many places have the
appearance of mole-hills. Almost the whole of Etrek, with the river
flowing through it, lies before us, and the places where the river
spreads over both banks produce upon the eye the effect of lakes. As
we were near the encampment of the Kem, we were counselled by
Kulkhan, who thought proper to tarry with us this one more night, to
keep a sharp look-out; and evening had not closed in before we
posted watches, which, relieved from time to time, observed every
movement around us.
Understanding that this station formed the last outpost towards the
Great Desert, I profited by the opportunity which the return of our
escort afforded, and spent the afternoon in writing letters whilst my
companions were sleeping. Besides the small pieces of paper
concealed in the wool of my Bokhariot dress for the purpose of notes,
I had two sheets of blank paper in the Koran which was suspended
from my neck in a little bag: upon these I wrote two letters, one to
Haydar Effendi, addressed to Teheran, and the second to Khandjan,
requesting him to forward the former. [Footnote 19]
{85}
The next morning a four hours' march brought us to the banks of the
Etrek, properly so called. A good deal of time was devoted to finding
the shallowest points where the river could be most readily forded, a
task by no means easy, for although the usual breadth of the river is
only from twelve to fifteen paces, this was now doubled by the water
having overflowed its banks, and the softened loamy ground caused
a real martyrdom to the poor camels, so that our Turkomans were
justified in their long hesitation. The current, indeed, was not very
strong, still the water came up to the bellies of the camels; and the
uncertain wavering steps of our labouring, wading animals dipped our
kedjeve now on the right side, now on the left, into the troubled
waters of the Etrek: one false step and I should have been plunged
into mud and dirt, and at no small risk have had to make my way by
swimming to the opposite bank. Happily all crossed in good order,
and scarcely had we come to a halt when the anxiously-expected
karavan of the Kervanbashi came in sight, having in its van three
buffaloes (two cows and a bull), to whose health-promising advent
the sick Lord of Khiva could hardly look forward with greater
impatience than we had done.
The reader will remember that Hadji Bilal, Yusuf, some foot travellers
and myself, had been obliged to separate from the main body of our
Dervish karavan, because the others had found greater difficulties
than myself in finding camels to hire. As we had heard no tidings of
them in Etrek, we began to be anxious lest these poor people might
have no opportunity of following us. We were, therefore, greatly
rejoiced to see them all coming up in good condition in the karavan
that now joined us. We kissed and hugged one another with the
heartiness of brethren who meet {86} after a long separation. My
emotion was great when I once more saw around me the Hadji Salih
and Sultan Mahmoud, and all the others too; yes, all my mendicant
companions; for, although I regarded Hadji Bilal as my dearest friend,
I was compelled to avow to myself my warm attachment to them all,
without distinction.
[Adieu to Etrek]
{87}
About two hours after this occurrence, the Kervanbashi, who now
assumed the command over the whole karavan, pointed out to us
that everyone ought to fill his water-skin with water, as we should not
come to another well for three days. I therefore took my goat-skin
and went with the rest to the stream. Never having hitherto suffered
much from the torment of thirst, I was filling it carelessly, when my
colleagues repaired my error with the remark that in the desert every
drop of water had life in it, and that this fount of existence should be
kept by everyone as the 'apple of his eye.' The preparations
completed, the camels were packed, the Kervanbashi had them
counted, and we found that we possessed eighty camels, that we
were forty travellers in all, amongst whom twenty-six were Hadjis
without weapons, and the rest tolerably armed Turkomans of the
tribe Yomut, with one Özbeg and one Afghan. Consequently we
formed one of those small karavans, that set out on their way in right
Oriental fashion, leaving everything to fate.
When we had all seated ourselves, we had still to take leave of our
Turkoman escort, who had led us to the margin of the desert. The
Fatiha of the farewell was intoned on the one side by Hadji Bilal, and
on the other by Kulkhan.
{89}
After the last Amen had been said, and had been followed by the
inseparable stroking of the beard, the two parties divided in contrary
directions; and when our late escort had recrossed the Etrek and lost
sight of us, they sent a few shots after us as a farewell. From this
point we proceeded in a straight direction towards the north. For
further information on the political and social relations of the
Turkomans, I beg to refer the reader to the Second Part of this
volume.
{90}
CHAPTER VII.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com