Data Analysis from Scratch with Python Peters
Morgan install download
https://textbookfull.com/product/data-analysis-from-scratch-with-
python-peters-morgan/
Download more ebook instantly today - get yours now at textbookfull.com
We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!
Data Science from Scratch First Principles with Python
2nd Edition Joel Grus
https://textbookfull.com/product/data-science-from-scratch-first-
principles-with-python-2nd-edition-joel-grus/
Data Science from Scratch First Principles with Python
2nd Edition Grus Joel
https://textbookfull.com/product/data-science-from-scratch-first-
principles-with-python-2nd-edition-grus-joel/
Data Analysis with Python and PySpark (MEAP V07)
Jonathan Rioux
https://textbookfull.com/product/data-analysis-with-python-and-
pyspark-meap-v07-jonathan-rioux/
A Python Data Analyst’s Toolkit: Learn Python and
Python-based Libraries with Applications in Data
Analysis and Statistics Gayathri Rajagopalan
https://textbookfull.com/product/a-python-data-analysts-toolkit-
learn-python-and-python-based-libraries-with-applications-in-
data-analysis-and-statistics-gayathri-rajagopalan/
Python for Data Analysis Data Wrangling with Pandas
NumPy and IPython Wes Mckinney
https://textbookfull.com/product/python-for-data-analysis-data-
wrangling-with-pandas-numpy-and-ipython-wes-mckinney/
Python for Data Analysis Data Wrangling with pandas
NumPy and Jupyter 3rd Edition Wes Mckinney
https://textbookfull.com/product/python-for-data-analysis-data-
wrangling-with-pandas-numpy-and-jupyter-3rd-edition-wes-mckinney/
Learning Data Mining with Python Layton
https://textbookfull.com/product/learning-data-mining-with-
python-layton/
Applied Text Analysis with Python Enabling Language
Aware Data Products with Machine Learning 1st Edition
Benjamin Bengfort
https://textbookfull.com/product/applied-text-analysis-with-
python-enabling-language-aware-data-products-with-machine-
learning-1st-edition-benjamin-bengfort/
Web Scraping with Python: Data Extraction from the
Modern Web 3rd Edition Mitchell
https://textbookfull.com/product/web-scraping-with-python-data-
extraction-from-the-modern-web-3rd-edition-mitchell/
D ATA A N A LY S I S F R O M S C R AT C H W I T H P Y T H O N
Step By Step Guide
Peters Morgan
How to contact us
If you find any damage, editing issues or any other issues in this book contain
please immediately notify our customer service by email at:
contact@aiscicences.com
Our goal is to provide high-quality books for your technical learning in
computer science subjects.
Thank you so much for buying this book.
Preface
“Humanity is on the verge of digital slavery at the hands of AI and biometric technologies. One way to
prevent that is to develop inbuilt modules of deep feelings of love and compassion in the learning
algorithms.”
― Amit Ray, Compassionate Artificial Superintelligence AI 5.0 - AI with Blockchain, BMI, Drone, IOT,
and Biometric Technologies
If you are looking for a complete guide to the Python language and its library
that will help you to become an effective data analyst, this book is for you.
This book contains the Python programming you need for Data Analysis.
Why the AI Sciences Books are different?
The AI Sciences Books explore every aspect of Artificial Intelligence and Data
Science using computer Science programming language such as Python and R.
Our books may be the best one for beginners; it's a step-by-step guide for any
person who wants to start learning Artificial Intelligence and Data Science from
scratch. It will help you in preparing a solid foundation and learn any other high-
level courses will be easy to you.
Step By Step Guide and Visual Illustrations and Examples
The Book give complete instructions for manipulating, processing, cleaning,
modeling and crunching datasets in Python. This is a hands-on guide with
practical case studies of data analysis problems effectively. You will learn
pandas, NumPy, IPython, and Jupiter in the Process.
Who Should Read This?
This book is a practical introduction to data science tools in Python. It is ideal
for analyst’s beginners to Python and for Python programmers new to data
science and computer science. Instead of tough math formulas, this book
contains several graphs and images.
© Copyright 2016 by AI Sciences LLC
All rights reserved.
First Printing, 2016
Edited by Davies Company
Ebook Converted and Cover by Pixels Studio Publised by AI Sciences LLC
ISBN-13: 978-1721942817
ISBN-10: 1721942815
The contents of this book may not be reproduced, duplicated or transmitted without the direct written
permission of the author.
Under no circumstances will any legal responsibility or blame be held against the publisher for any
reparation, damages, or monetary loss due to the information herein, either directly or indirectly.
Legal Notice:
You cannot amend, distribute, sell, use, quote or paraphrase any part or the content within this book without
the consent of the author.
Disclaimer Notice:
Please note the information contained within this document is for educational and entertainment purposes
only. No warranties of any kind are expressed or implied. Readers acknowledge that the author is not
engaging in the rendering of legal, financial, medical or professional advice. Please consult a licensed
professional before attempting any techniques outlined in this book.
By reading this document, the reader agrees that under no circumstances is the author responsible for any
losses, direct or indirect, which are incurred as a result of the use of information contained within this
document, including, but not limited to, errors, omissions, or inaccuracies.
From AI Sciences Publisher
To my wife Melania
and my children Tanner and Daniel
without whom this book would have
been completed.
Author Biography
Peters Morgan is a long-time user and developer of the Python. He is one of the
core developers of some data science libraries in Python. Currently, Peter works
as Machine Learning Scientist at Google.
Table of Contents
Preface
Why the AI Sciences Books are different?
Step By Step Guide and Visual Illustrations and Examples
Who Should Read This?
From AI Sciences Publisher
Author Biography
Table of Contents
Introduction
2. Why Choose Python for Data Science & Machine Learning
Python vs R
Widespread Use of Python in Data Analysis
Clarity
3. Prerequisites & Reminders
Python & Programming Knowledge
Installation & Setup
Is Mathematical Expertise Necessary?
4. Python Quick Review
Tips for Faster Learning
5. Overview & Objectives
Data Analysis vs Data Science vs Machine Learning
Possibilities
Limitations of Data Analysis & Machine Learning
Accuracy & Performance
6. A Quick Example
Iris Dataset
Potential & Implications
7. Getting & Processing Data
CSV Files
Feature Selection
Online Data Sources
Internal Data Source
8. Data Visualization
Goal of Visualization
Importing & Using Matplotlib
9. Supervised & Unsupervised Learning
What is Supervised Learning?
What is Unsupervised Learning?
How to Approach a Problem
10. Regression
Simple Linear Regression
Multiple Linear Regression
Decision Tree
Random Forest
11. Classification
Logistic Regression
K-Nearest Neighbors
Decision Tree Classification
Random Forest Classification
12. Clustering
Goals & Uses of Clustering
K-Means Clustering
Anomaly Detection
13. Association Rule Learning
Explanation
Apriori
14. Reinforcement Learning
What is Reinforcement Learning?
Comparison with Supervised & Unsupervised Learning
Applying Reinforcement Learning
15. Artificial Neural Networks
An Idea of How the Brain Works
Potential & Constraints
Here’s an Example
16. Natural Language Processing
Analyzing Words & Sentiments
Using NLTK
Thank you !
Sources & References
Software, libraries, & programming language
Datasets
Online books, tutorials, & other references
Thank you !
Introduction
Why read on? First, you’ll learn how to use Python in data analysis (which is a
bit cooler and a bit more advanced than using Microsoft Excel). Second, you’ll
also learn how to gain the mindset of a real data analyst (computational
thinking).
More importantly, you’ll learn how Python and machine learning applies to real
world problems (business, science, market research, technology, manufacturing,
retail, financial). We’ll provide several examples on how modern methods of
data analysis fit in with approaching and solving modern problems.
This is important because the massive influx of data provides us with more
opportunities to gain insights and make an impact in almost any field. This
recent phenomenon also provides new challenges that require new technologies
and approaches. In addition, this also requires new skills and mindsets to
successfully navigate through the challenges and successfully tap the fullest
potential of the opportunities being presented to us.
For now, forget about getting the “sexiest job of the 21st century” (data scientist,
machine learning engineer, etc.). Forget about the fears about artificial
intelligence eradicating jobs and the entire human race. This is all about learning
(in the truest sense of the word) and solving real world problems.
We are here to create solutions and take advantage of new technologies to make
better decisions and hopefully make our lives easier. And this starts at building a
strong foundation so we can better face the challenges and master advanced
concepts.
2. Why Choose Python for Data Science & Machine Learning
Python is said to be a simple, clear and intuitive programming language. That’s
why many engineers and scientists choose Python for many scientific and
numeric applications. Perhaps they prefer getting into the core task quickly (e.g.
finding out the effect or correlation of a variable with an output) instead of
spending hundreds of hours learning the nuances of a “complex” programming
language.
This allows scientists, engineers, researchers and analysts to get into the project
more quickly, thereby gaining valuable insights in the least amount of time and
resources. It doesn’t mean though that Python is perfect and the ideal
programming language on where to do data analysis and machine learning.
Other languages such as R may have advantages and features Python has not.
But still, Python is a good starting point and you may get a better understanding
of data analysis if you use it for your study and future projects.
Python vs R
You might have already encountered this in Stack Overflow, Reddit, Quora, and
other forums and websites. You might have also searched for other programming
languages because after all, learning Python or R (or any other programming
language) requires several weeks and months. It’s a huge time investment and
you don’t want to make a mistake.
To get this out of the way, just start with Python because the general skills and
concepts are easily transferable to other languages. Well, in some cases you
might have to adopt an entirely new way of thinking. But in general, knowing
how to use Python in data analysis will bring you a long way towards solving
many interesting problems.
Many say that R is specifically designed for statisticians (especially when it
comes to easy and strong data visualization capabilities). It’s also relatively easy
to learn especially if you’ll be using it mainly for data analysis. On the other
hand, Python is somewhat flexible because it goes beyond data analysis. Many
data scientists and machine learning practitioners may have chosen Python
because the code they wrote can be integrated into a live and dynamic web
application.
Although it’s all debatable, Python is still a popular choice especially among
beginners or anyone who wants to get their feet wet fast with data analysis and
machine learning. It’s relatively easy to learn and you can dive into full time
programming later on if you decide this suits you more.
Widespread Use of Python in Data Analysis
There are now many packages and tools that make the use of Python in data
analysis and machine learning much easier. TensorFlow (from Google), Theano,
scikit-learn, numpy, and pandas are just some of the things that make data
science faster and easier.
Also, university graduates can quickly get into data science because many
universities now teach introductory computer science using Python as the main
programming language. The shift from computer programming and software
development can occur quickly because many people already have the right
foundations to start learning and applying programming to real world data
challenges.
Another reason for Python’s widespread use is there are countless resources that
will tell you how to do almost anything. If you have any question, it’s very likely
that someone else has already asked that and another that solved it for you
(Google and Stack Overflow are your friends). This makes Python even more
popular because of the availability of resources online.
Clarity
Due to the ease of learning and using Python (partly due to the clarity of its
syntax), professionals are able to focus on the more important aspects of their
projects and problems. For example, they could just use numpy, scikit-learn, and
TensorFlow to quickly gain insights instead of building everything from scratch.
This provides another level of clarity because professionals can focus more on
the nature of the problem and its implications. They could also come up with
more efficient ways of dealing with the problem instead of getting buried with
the ton of info a certain programming language presents.
The focus should always be on the problem and the opportunities it might
introduce. It only takes one breakthrough to change our entire way of thinking
about a certain challenge and Python might be able to help accomplish that
because of its clarity and ease.
3. Prerequisites & Reminders
Python & Programming Knowledge
By now you should understand the Python syntax including things about
variables, comparison operators, Boolean operators, functions, loops, and lists.
You don’t have to be an expert but it really helps to have the essential knowledge
so the rest becomes smoother.
You don’t have to make it complicated because programming is only about
telling the computer what needs to be done. The computer should then be able to
understand and successfully execute your instructions. You might just need to
write few lines of code (or modify existing ones a bit) to suit your application.
Also, many of the things that you’ll do in Python for data analysis are already
routine or pre-built for you. In many cases you might just have to copy and
execute the code (with a few modifications). But don’t get lazy because
understanding Python and programming is still essential. This way, you can spot
and troubleshoot problems in case an error message appears. This will also give
you confidence because you know how something works.
Installation & Setup
If you want to follow along with our code and execution, you should have
Anaconda downloaded and installed in your computer. It’s free and available for
Windows, macOS, and Linux. To download and install, go to
https://www.anaconda.com/download/ and follow the succeeding instructions
from there.
The tool we’ll be mostly using is Jupyter Notebook (already comes with
Anaconda installation). It’s literally a notebook wherein you can type and
execute your code as well as add text and notes (which is why many online
instructors use it).
If you’ve successfully installed Anaconda, you should be able to launch
Anaconda Prompt and type jupyter notebook on the blinking underscore. This
will then launch Jupyter Notebook using your default browser. You can then
create a new notebook (or edit it later) and run the code for outputs and
visualizations (graphs, histograms, etc.).
These are convenient tools you can use to make studying and analyzing easier
and faster. This also makes it easier to know which went wrong and how to fix
them (there are easy to understand error messages in case you mess up).
Is Mathematical Expertise Necessary?
Data analysis often means working with numbers and extracting valuable
insights from them. But do you really have to be expert on numbers and
mathematics?
Successful data analysis using Python often requires having decent skills and
knowledge in math, programming, and the domain you’re working on. This
means you don’t have to be an expert in any of them (unless you’re planning to
present a paper at international scientific conferences).
Don’t let many “experts” fool you because many of them are fakes or just plain
inexperienced. What you need to know is what’s the next thing to do so you can
successfully finish your projects. You won’t be an expert in anything after you
read all the chapters here. But this is enough to give you a better understanding
about Python and data analysis.
Back to mathematical expertise. It’s very likely you’re already familiar with
mean, standard deviation, and other common terms in statistics. While going
deeper into data analysis you might encounter calculus and linear algebra. If you
have the time and interest to study them, you can always do anytime or later.
This may or may not give you an edge on the particular data analysis project
you’re working on.
Again, it’s about solving problems. The focus should be on how to take a
challenge and successfully overcome it. This applies to all fields especially in
business and science. Don’t let the hype or myths to distract you. Focus on the
core concepts and you’ll do fine.
4. Python Quick Review
Here’s a quick Python review you can use as reference. If you’re stuck or need
help with something, you can always use Google or Stack Overflow.
To have Python (and other data analysis tools and packages) in your computer,
download and install Anaconda.
Python Data Types are strings (“You are awesome.”), integers (-3, 0, 1), and
floats (3.0, 12.5, 7.77).
You can do mathematical operations in Python such as: 3 + 3
print(3+3) 7 -1
5*2
20 / 5
9 % 2 #modulo operation, returns the remainder of the division 2 ** 3 #exponentiation, 2 to the 3rd
power Assigning values to variables: myName = “Thor”
print(myName) #output is “Thor”
x=5
y=6
print(x + y) #result is 11
print(x*3) #result is 15
Working on strings and variables: myName = “Thor”
age = 25
hobby = “programming”
print('Hi, my name is ' + myname + ' and my age is ' + str(age) + '. Anyway, my hobby is ' + hobby +
'.') Result is Hi, my name is Thon and my age is 25. Anyway, my hobby is programming.
Comments # Everything after the hashtag in this line is a comment.
# This is to keep your sanity.
# Make it understandable to you, learners, and other programmers.
Comparison Operators >>>8 == 8
True
>>>8 > 4
True
>>>8 < 4
False
>>>8 != 4
True
>>>8 != 8
False
>>>8 >= 2
True
>>>8 <= 2
False
>>>’hello’ == ‘hello’
True
>>>’cat’ != ‘dog’
True
Boolean Operators (and, or, not) >>>8 > 3 and 8 > 4
True
>>>8 > 3 and 8 > 9
False
>>>8 > 9 and 8 > 10
False
>>>8 > 3 or 8 > 800
True
>>>’hello’ == ‘hello’ or ‘cat’ == ‘dog’
True
If, Elif, and Else Statements (for Flow Control) print(“What’s your email?”)
myEmail = input()
print(“Type in your password.”)
typedPassword = input()
if typedPassword == savedPassword:
print(“Congratulations! You’re now logged in.”)
else:
print(“Your password is incorrect. Please try again.”)
While loop inbox = 0
while inbox < 10:
print(“You have a message.”)
inbox = inbox + 1
Result is this: You have a message.
You have a message.
You have a message.
You have a message.
You have a message.
You have a message.
You have a message.
You have a message.
You have a message.
You have a message.
Loop doesn’t exit until you typed ‘Casanova’
name = ''
while name != 'Casanova':
print('Please type your name.')
name = input()
print('Congratulations!')
For loop for i in range(10):
print(i ** 2)
Here’s the output: 0
1
4
9
16
25
36
49
64
81
#Adding numbers from 0 to 100
total = 0
for num in range(101):
total = total + num
print(total)
When you run this, the sum will be 5050.
#Another example. Positive and negative reviews.
all_reviews = [5, 5, 4, 4, 5, 3, 2, 5, 3, 2, 5, 4, 3, 1, 1, 2, 3, 5, 5]
positive_reviews = []
for i in all_reviews:
if i > 3:
print('Pass')
positive_reviews.append(i)
else:
print('Fail')
print(positive_reviews)
print(len(positive_reviews))
ratio_positive = len(positive_reviews) / len(all_reviews)
print('Percentage of positive reviews: ')
print(ratio_positive * 100)
When you run this, you should see: Pass
Pass
Pass
Pass
Pass
Fail
Fail
Pass
Fail
Fail
Pass
Pass
Fail
Fail
Fail
Fail
Fail
Pass
Pass
[5, 5, 4, 4, 5, 5, 5, 4, 5, 5]
10
Percentage of positive reviews:
52.63157894736842
Functions def hello():
print('Hello world!')
hello()
Define the function, tell what it should do, and then use or call it later.
def add_numbers(a,b):
print(a + b)
add_numbers(5,10)
add_numbers(35,55)
#Check if a number is odd or even.
def even_check(num):
if num % 2 == 0:
print('Number is even.')
else:
print('Hmm, it is odd.')
even_check(50)
even_check(51)
Lists my_list = [‘eggs’, ‘ham’, ‘bacon’] #list with strings colours = [‘red’,
‘green’, ‘blue’]
cousin_ages = [33, 35, 42] #list with integers mixed_list = [3.14, ‘circle’, ‘eggs’, 500] #list with integers
and strings #Working with lists colours = [‘red’, ‘blue’, ‘green’]
colours[0] #indexing starts at 0, so it returns first item in the list which is ‘red’
colours[1] #returns second item, which is ‘green’
#Slicing the list my_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
print(my_list[0:2]) #returns [0, 1]
print(my_list[1:]) #returns [1, 2, 3, 4, 5, 6, 7, 8, 9]
print(my_list[3:6]) #returns [3, 4, 5]
#Length of list my_list = [0,1,2,3,4,5,6,7,8,9]
print(len(my_list)) #returns 10
#Assigning new values to list items colours = ['red', 'green', 'blue']
colours[0] = 'yellow'
print(colours) #result should be ['yellow', 'green', 'blue']
#Concatenation and appending colours = ['red', 'green', 'blue']
colours.append('pink')
print(colours)
The result will be:
['red', 'green', 'blue', 'pink']
fave_series = ['GOT', 'TWD', 'WW']
fave_movies = ['HP', 'LOTR', 'SW']
fave_all = fave_series + fave_movies
print(fave_all)
This prints ['GOT', 'TWD', 'WW', 'HP', 'LOTR', 'SW']
Those are just the basics. You might still need to refer to this whenever you’re
doing anything related to Python. You can also refer to Python 3 Documentation
for more extensive information. It’s recommended that you bookmark that for
future reference. For quick review, you can also refer to Learn python3 in Y
Minutes.
Tips for Faster Learning
If you want to learn faster, you just have to devote more hours each day in
learning Python. Take note that programming and learning how to think like a
programmer takes time.
There are also various cheat sheets online you can always use. Even experienced
programmers don’t know everything. Also, you actually don’t have to learn
everything if you’re just starting out. You can always go deeper anytime if
something interests you or you want to stand out in job applications or startup
funding.
5. Overview & Objectives
Let’s set some expectations here so you know where you’re going. This is also to
introduce about the limitations of Python, data analysis, data science, and
machine learning (and also the key differences). Let’s start.
Data Analysis vs Data Science vs Machine Learning
Data Analysis and Data Science are almost the same because they share the
same goal, which is to derive insights from data and use it for better decision
making.
Often, data analysis is associated with using Microsoft Excel and other tools for
summarizing data and finding patterns. On the other hand, data science is often
associated with using programming to deal with massive data sets. In fact, data
science became popular as a result of the generation of gigabytes of data coming
from online sources and activities (search engines, social media).
Being a data scientist sounds way cooler than being a data analyst. Although the
job functions might be similar and overlapping, it all deals with discovering
patterns and generating insights from data. It’s also about asking intelligent
questions about the nature of the data (e.g. Are data points form organic clusters?
Is there really a connection between age and cancer?).
What about machine learning? Often, the terms data science and machine
learning are used interchangeably. That’s because the latter is about “learning
from data.” When applying machine learning algorithms, the computer detects
patterns and uses “what it learned” on new data.
For instance, we want to know if a person will pay his debts. Luckily we have a
sizable dataset about different people who either paid his debt or not. We also
have collected other data (creating customer profiles) such as age, income range,
location, and occupation. When we apply the appropriate machine learning
algorithm, the computer will learn from the data. We can then input new data
(new info from a new applicant) and what the computer learned will be applied
to that new data.
We might then create a simple program that immediately evaluates whether a
person will pay his debts or not based on his information (age, income range,
location, and occupation). This is an example of using data to predict someone’s
likely behavior.
Possibilities
Learning from data opens a lot of possibilities especially in predictions and
optimizations. This has become a reality thanks to availability of massive
datasets and superior computer processing power. We can now process data in
gigabytes within a day using computers or cloud capabilities.
Although data science and machine learning algorithms are still far from perfect,
these are already useful in many applications such as image recognition, product
recommendations, search engine rankings, and medical diagnosis. And to this
moment, scientists and engineers around the globe continue to improve the
accuracy and performance of their tools, models, and analysis.
Limitations of Data Analysis & Machine Learning
You might have read from news and online articles that machine learning and
advanced data analysis can change the fabric of society (automation, loss of jobs,
universal basic income, artificial intelligence takeover).
In fact, the society is being changed right now. Behind the scenes machine
learning and continuous data analysis are at work especially in search engines,
social media, and e-commerce. Machine learning now makes it easier and faster
to do the following:
● Are there human faces in the picture?
● Will a user click an ad? (is it personalized and appealing to him/her?)
● How to create accurate captions on YouTube videos? (recognise speech
and translate into text)
● Will an engine or component fail? (preventive maintenance in
manufacturing)
● Is a transaction fraudulent?
● Is an email spam or not?
These are made possible by availability of massive datasets and great processing
power. However, advanced data analysis using Python (and machine learning) is
not magic. It’s not the solution to all problem. That’s because the accuracy and
performance of our tools and models heavily depend on the integrity of data and
our own skill and judgment.
Yes, computers and algorithms are great at providing answers. But it’s also about
asking the right questions. Those intelligent questions will come from us
humans. It also depends on us if we’ll use the answers being provided by our
computers.
Accuracy & Performance
The most common use of data analysis is in successful predictions (forecasting)
and optimization. Will the demand for our product increase in the next five
years? What are the optimal routes for deliveries that lead to the lowest
operational costs?
That’s why an accuracy improvement of even just 1% can translate into millions
of dollars of additional revenues. For instance, big stores can stock up certain
products in advance if the results of the analysis predicts an increasing demand.
Shipping and logistics can also better plan the routes and schedules for lower
fuel usage and faster deliveries.
Aside from improving accuracy, another priority is on ensuring reliable
performance. How can our analysis perform on new data sets? Should we
consider other factors when analyzing the data and making predictions? Our
work should always produce consistently accurate results. Otherwise, it’s not
scientific at all because the results are not reproducible. We might as well shoot
in the dark instead of making ourselves exhausted in sophisticated data analysis.
Apart from successful forecasting and optimization, proper data analysis can
also help us uncover opportunities. Later we can realize that what we did is also
applicable to other projects and fields. We can also detect outliers and interesting
patterns if we dig deep enough. For example, perhaps customers congregate in
clusters that are big enough for us to explore and tap into. Maybe there are
unusually higher concentrations of customers that fall into a certain income
range or spending level.
Those are just typical examples of the applications of proper data analysis. In the
next chapter, let’s discuss one of the most used examples in illustrating the
promising potential of data analysis and machine learning. We’ll also discuss its
implications and the opportunities it presents.
6. A Quick Example
Iris Dataset
Let’s quickly see how data analysis and machine learning work in real world
data sets. The goal here is to quickly illustrate the potential of Python and
machine learning on some interesting problems.
In this particular example, the goal is to predict the species of an Iris flower
based on the length and width of its sepals and petals. First, we have to create a
model based on a dataset with the flowers’ measurements and their
corresponding species. Based on our code, our computer will “learn from the
data” and extract patterns from it. It will then apply what it learned to a new
dataset. Let’s look at the code.
#importing the necessary libraries from sklearn.datasets import load_iris
from sklearn import tree
from sklearn.metrics import accuracy_score
import numpy as np
#loading the iris dataset
iris = load_iris()
x = iris.data #array of the data
y = iris.target #array of labels (i.e answers) of each data entry
#getting label names i.e the three flower species
y_names = iris.target_names
#taking random indices to split the dataset into train and test
test_ids = np.random.permutation(len(x))
#splitting data and labels into train and test
#keeping last 10 entries for testing, rest for training
x_train = x[test_ids[:-10]]
x_test = x[test_ids[-10:]]
y_train = y[test_ids[:-10]]
y_test = y[test_ids[-10:]]
#classifying using decision tree
clf = tree.DecisionTreeClassifier()
#training (fitting) the classifier with the training set
clf.fit(x_train, y_train)
#predictions on the test dataset
pred = clf.predict(x_test)
print(pred) #predicted labels i.e flower species
print(y_test) #actual labels
print((accuracy_score(pred, y_test)))*100 #prediction accuracy #Reference: http://docs.python-
guide.org/en/latest/scenarios/ml/
If we run the code, we’ll get something like this: [0 1 1 1 0 2 0 2 2 2]
[0 1 1 1 0 2 0 2 2 2]
100.0
The first line contains the predictions (0 is Iris setosa, 1 is Iris versicolor, 2 is Iris
virginica). The second line contains the actual flower species as indicated in the
dataset. Notice the prediction accuracy is 100%, which means we correctly
predicted each flower’s species.
These might all seem confusing at first. What you need to understand is that the
goal here is to create a model that predicts a flower’s species. To do that, we split
the data into training and test sets. We run the algorithm on the training set and
use it against the test set to know the accuracy. The result is we’re able to predict
the flower’s species on the test set based on what the computer learned from the
training set.
Potential & Implications
It’s a quick and simple example. But its potential and implications can be
enormous. With just a few modifications, you can apply the workflow to a wide
variety of tasks and problems.
For instance, we might be able to apply the same methodology on other flower
species, plants, and animals. We can also apply this in other Classification
problems (more on this later) such as determining if a cancer is benign or
malignant, if a person is a very likely customer, or if there’s a human face in the
photo.
The challenge here is to get enough quality data so our computer can properly
get “good training.” It’s a common methodology to first learn from the training
set and then apply the learning into the test set and possibly new data in the
future (this is the essence of machine learning).
It’s obvious now why many people are hyped about the true potential of data
analysis and machine learning. With enough data, we can create automated
Other documents randomly have
different content
A HISTORY OF JOHNSON COUNTY 265 clay of May, 1826
personally appeared before me David McNeely, a resident of Johnson
County, aged about 72 years saying he enlisted for the term of three
years on the 12th day of April, 1777, in the state of Virginia, in the
company commanded by Capt. Adam Wallace, in the 7th regiment,
commanded by Col. Heath, in the line of the state of Virginia, that
he continued in said corps till some time in 1779, when he was
discharged from service in the state of North Carolina. He stated that
his name was not on any state roll, that he had not applied for a
pension before because his circumstances, although not affluent,
had been easy, but by misfortune and sickness, he had been
reduced to the necessity of asking a support from his country. He
swore he was a resident of the United States on the 18th day of
March, 1818. He stated- he had not given away his property in order
that he may get a pension. His property consisted of one suit of
wearing apparel, valued at $3.87 Yi Richard M. Young ordered the
clerk that it be certified that it appeared to the satisfaction of the
court that the said David McNeeley did serve in the Revolutionary
War." This is not the full text but the main points in it. There seems
to be quite a contrast in the way men look upon taking money from
the government now and one hundred years ago. On the same day
J. D. Simpkins, a resident of Johnson County appeared before the
court saying he had enlisted for the term of three years on the 13th
day of October, 1777, in the state of New York, in the company
commanded by Captain John Randolph, of Col. Henry Lee's Light
Horse, commonly called the Legion, in the line of the state of
Virginia, in the Continental Establishment, that he continued to serve
in said troop until the 14th day of 1781, when he was discharged
from service. He gives his reasons for applying for a pension and
subscribes to some other forms required. Then follows a schedule of
his possessions : four cows and calves, valued at $20.00 ; two
steers, valued at $16.00; one lot of hogs, valued at $20.00; house
hold furniture at the value of $30.00 ; crop of corn and provision on
hand, $30.00. This is also sworn to before Richard M. Young, Judge,
and the court certifies that he is satisfied that John G. Simpkins, did
serve in the Revolutionary War, and ordered that the clerk so certify.
On May 27, 1826, Samuel Gardner, a resident of Johnson County,
applied for a certificate for a pension from the court. He also enlisted
in New York in 1777, in the company com
266 A HISTORY OF JOHNSON COUNTY manded by Marisus
(if deciphered correct) Willis, Lieut. Col. of the regiment commanded
by Col. Gansofort in the line of the state of New York, and was
discharged the 4th day of June, 1784, in the state of New York. He
has not applied heretofore because he was able to support himself
by his labors. Old age and sickness reduced him to the necessity of
asking his country's aid. Then follows the usual form and schedule of
his property, one rifle gun, valued at $10.00; one hoe valued at 50c,
one ax valued at 75c. The judge ordered the clerk to certify that he
was satisfied that Samuel Gardner did serve in the Revolutionary
War. From these records it appears that we had other Revolutionary
soldiers than those whose graves have been marked by the D A. R.
At the October term, 1826, there are two names on the jury list we
have not had before. Martin Howell, and James McKee. Sidney
Breese was the circuit attorney, having failed to attend D. J. Baker
was appointed in his stead. John Shearer was constable. Jesse Fain
was excused from jury duty. James and Polly Sittow were divorced at
this court by a jury, and Polly was prohibited from marrying again for
two years. Athony Ensor was a defendant in this court. At the April
term, 1828, William J. Gatewood was District Attorney. The new jury
names were William Parker and Solomon Stephens. The new parties
to lawsuits were William Allard and J. C Willard. At the October term
of this court one new name as juror, John Sims. The name of Amos
Lacey appears connected with a lawsuit. At the May court, 1828,
Jacob Keisler and Robert Kerley are new names as jurors. Pleasant L.
Ward, Phillip Corbitt and Elias K. Cotton are the new contestants in
lawsuits. At the April term, 1836 the name of William Mount appears
for the first time as a juror. Richard Elkins and Francis Kincannon
were excused from duty. In this court there appears a record as
follows. "This day appeared in open court, Washington Thompson, a
man of color, and presented a certificate of Bennett Jones, Sheriff, of
Johnston County, certifying that he, the said Washington, had been
aprehended as a runaway slave or servant and committed to the jail
of said county by Ivy Reynolds an acting justice of the peace, in and
for said county and that he had been dealt with according to law,
and hired out from month to month for the space of twelve months,
ending the
A HISTORY OF JOHNSON COUNTY 267 26th day of
December last, 1835, and that no owner had appeared in the said
time, to claim the said Washington Thompson. It was ordered that
the facts be and are hereby certified and made public, and it is
hereby ordered that said Washington Thompson shall be deemed a
free person unless he shall be, lawfully claimed by his proper owner
or owners/' Elias Holmes, W. C. White, J. N Modglin, and David
Harper were new jurors. William McGee was a defendant in a suit
brought from Pope County. Some other names connected with this
court were Allen Pruett, John Jackson. Record 1, page 30, December
1, 1811, David MacElmunny, debtor to John Greething. April term,
1813. Joseph Conway, Dept. Atty. General, a suit was brought by
John Prichard, assignee of Hugh Logan vs. Henry Skinner, Isaac D.
Wilcox was security for the cost. Accompaning the declaration was
an order to-wit. "Sir please pay the bearer Hugh Logan, four
hundred and thirty-two pounds of saltpeter, and oblige and soforth,
Joseph French to Henry Skinner, Test. Thomas F. Clark, July 12,
1811." On the back of this order was the following to-wit. "I do
assign over the within order to John Prichard in security of thirty
dollars to be paid on or before the first day of June next, April 14,
1812, Hugh Logan. The within order is accepted by me, Henry
Skinner, July 12, 1812, Test. Joseph Shaw. This note shows another
legal tender to be saltpeter. November term, 1814, William Daniel vs.
Daniel Vincent, trespass, John Spann and Charles Murphy were
security for the cost. July term, of court 1814, held at the house of
John Bradshaw in the town of Elvira, Johnson County, Illinois. One
case was Henry Buckentaff vs. William Simpson growing out of the
following, to-wit : "On or before the first day of August next I
promise to pay Henry Buckentaff two hundred and thirteen and a
half bushels of good dry salt, delivered in good barrels at
Shawneetown, it being for value received. As witness my hand this
6th day of February, 1811, William Simpson, Test. Daniel Head."
Then follows the indorsements "I assign the within note to Nathan
Hern, without recourse, July 12, 1813, Henry Buckentaff, Test.
William Daniels." Asignment two "I assign my right of the within
note to John Venton without recourse, July 12, 1813, Nathan Hearn
Test William Daniels." Third assignment, "I assign my right of the
within note to John Stilty without recourse,
268 A HISTORY OF JOHNSON COUNTY September 21,
1813, John S. Venton." Since this note had done duty in so many
hands perhaps it would be of interest to know that Simpson paid
Buckentaff $174.00 and the cost of the suit, apparently salt was also
legal tender. At the November term, 1814, John King and Williams
Styles are required to answer to a charge ^ of treaspass at the
complaint of Elisha Spivy who lost his horses and these men found
them. He accuses them of selling his horses and knowing they were
his. The jury that was called had John Teddford, S. Snyder, Jacob
Hunsaker and John Woodland, whose names have not been copied
on jury service before. The jury allowed Spivy $50.00 damages when
he had sued for $1,000. The next is the cape of John Sharp and
Joshua Talbot, administrators of Frederit k Crice. They brought suit
against Catherin Crice. It wr>s a plea of debt for $370,961/2 and
damages $150.00. Samuel Penroa was her bondsman, Russell E.
Heacock, attorney for Sharp and Talbot entered a complaint stating
that the said plaintiffs had obtained a judgment against the said
Catherine Crice in Butler County Court, Kentucky for the sum of $360
at a court held before the judge of said county, August, 1813, by
their Atty. John Brethell, which had never been satisfied. The debt
was originally $700. She had promised frequently to pay Frederick
Crice which she failed to do. After his death she still promised to pay
his administrators, but failing they brought suit for $700. In the
November term, 1814, Catherine Crice appeared at Morgantown,
Butler County, and says "the action ought not to be as the estate
owes her $400 for clothing, washing and lodging the infant children
of the deceased." At a later court held in June. 1815 her attorney,
Delaney, filed a claim as having paid the debt. This case was brought
before a jury in Johnson County, Illinois, October, 1815. The debt
was allowed and damages was $45.00. A writ was issued against
Catherine Crice's property. The writ was returned, no property
found, 'I. Morris, Dept for T. Furguson.' Catherine Crice was ordered
put in jail September 15, at the instance of John Sharp and Frederick
Talbot as administrators of the estate of Frederice Crice. The
following year Catherine Crice took advantage of the law of this state
for debtors as referred to in "Customs" Daniel Groves, at this court
brought suit against John Borin, and Thomas Littlepage for a
judgment he had ob
A HISTORY OF JOHNSON COUNTY 269 tained in the
Livingston County Court, Kentucky. Christphor Thompkins was his
attorney. In 1807 a writ is issued against Thomas and Benjamin
Littlepage in Livingston County Court, held at Russelville, Kentucky.
Armstead Morehead, clerk, Wiley J. Earner, Sheriff, 1808. These
cases came to our court for the reason that many of our settlers
came from that state. William Eastin and Johnathan Magnus appear
as contestants in the next case. A writ issued against Eastin from the
state of Tennessee, requiring him to appear at a court held in
Nashville, 1812. The administrators of Joseph Eubank's estate sued
James Tolly and Charles Perry for debt. At a court in 1815 we first
have the names of John Damron, John Witt is the complainant in
this case, which is called "oraton." It appears the suit originated
through a bill of sale of property that John Witt had made over to
Nellie Witt, his wife, and six infant children. The case was continued
at the October term, but the odd feature about it is, the number of
the Perry family that are summoned to court. Wm. Perry, Sr., and Jr.,
John, Enoch, Hiram and Solomon Perry with John and George
Damron. There is a case in the June term, 1816, over a note given
by Isaac Wilcox in 1810 to John Stead. James D. Johnson bought
the note, then Russel E. Heacock bought it, and William Osborn was
security for the cost, James S. Dorris signed the writ as sheriff of
Johnson County. James Malcom brought a suit in the November
term, 1816, trespass against Jesse Terry. The Jury was D. T.
Coleman, Foreman, John Elkins, John Spann, John Tedforcl, Solomon
Snyder, James Abernathy, John Wood, Jeremiah Murry, Thomas
Prichard, Jacob Hunsaker and William Penny. In October, 1817
Squire Allen sued Jesse Parker for debt. At the May term of court,
1818, David Usher brought suit against several men whose names
have already been mentioned for assault and battery. Thomas C.
Brown held the November court, 1819, Samuel Langdon, assignee of
James Frazer, suit vs. Wilcox. This record extends from October,
1814, to May, 1818, but the names occuring in the different cases
are all familiar. There is and old execution docket in the circuit clerks
office giving all the cases from January 1, 1818-28. On the inside
cover of one of these old records is a note perhaps a joke, as there
was no date, "On demand I promise to John Mclntyre, five good
negro boys and farm S. C." Another
270 A HISTORY OF JOHNSON COUNTY entry that seems to
have no connection with this county is, Augustine G. S. Wright, sub-
agent lor the Fever River Lead Mines, Dodgeville, Joe Davis County,
Illinois. Then follows the names, Gen. H. Dodge, and Col A. G. S.
Wright. On this docket, November term 1820, it is recorded that
James Finney had been indicted for A. S. B. not being familiar with
legal abreviations, on investigation, it was found to mean, assault
and battery. Finney being an officer of the court, this was quite
unexpected. He plead guilty and was fined twelve and one half
cents. The grand jurymen for the October court, 1829, were Joseph
Kuykendall, Foreman, John Bain, E. W. Campbell, Alvin Cross, Allen
Choate, Isham DePoister, William Elkins Frederick Graves, Abraham
McGowan, James Miles, George Lile, John Standard, William Taylor,
Thomas Gore, Marshall Hale, and Josiah Raign. The first case is
against Daniel Chapman, the next Archibald Goodman, Elias K.
Cotton, John P. Finney, Jesse Canady. At the April term, 1830, the
names on this jury not mentioned before were John Axley, James
Boswell, Hardy Cooper, Molton Carter, Harris Hart and John Goddard,
T. C. Brown was the Judge and H. J. Eddy the attorney. Jesse
Williams, Samuel Oxford, Jacob Kiester, and Henry McHenry were
the defendants in this court. The. grand jury returned with two
indictments. The unfamiliar names at the October term of court,
1830 were, jurymen Abraham Niel, Louis Pankey. Thomas Moore,
Nathaniel Buckmaster, Rebeca Caswe were defendants in cases of
this court. At the April term, 1831, the new jurymen were James
Gershon, B. S. Enloe, and David Harper. Fannie Holmes, Lot W.
Hancock and William Lewis and some others who have been
mentioned had cases in this court. April term, 1832, William
Richards, Moses Shelby, are the unfair names of jurymen. Mathew
Blackwell, Peter May and Phillip Hargrave had cases in this court. At
the April term, 1833, Stephen and Mark Rentfro, James Emerson,
and Jeptha Wise are unfamiliar Jurymen. John DeWit, Robert
Fortenberry, Henry Tolson, Robert and John Diterline. P. W.
Harrington, William Mathine, Ward and Ensminger, Jacob Grammer,
Charlton Fairless, John L. Coper, Timothy Hayes. William Peterson,
Warren Grisham, Solomon Gibson, John Betts, Sally Temple, Nancy
Dyke, Jacob Sammon, were either plaintiffs or defendants at this
court. Also the fol
A HISTORY OF JOHNSON COUNTY 271 lowing record: 'This
day William Wiggs, a soldier of the Revolution, by James Evans, his
attorney came into court and presented his declaration and affidavit
with certificate and affidavits of Hezekiah West, James Jones, Sr.,
Clergyman, and John Sims, certifying of their knowledge regarding
his service and veracity and truth in order to entiile him to the
benefit of the act of Congress of June 7, 1832, which is ordered to
be certified, with county seal annexed." His pension was allowed.
The next court was November, 1833, G. W. Youngblood is the only
grand juryman not mentioned before." Harry, a colored man, this
day came into court. The said Harry, by hi? attorneys, Dougherty
and Dunn, and moved the court to restrain Owen Evans, his
supposed master, from removing him without the jurisdiction of the
court, "which motion is continued." "This day A. P. Field, Esq. came
into court and moved the court for a rule upon the sheriff of Johnson
County to show cause why he does not return to Owen Evans the
property attached (a certain negro man) which had been attached as
the property of the said Evans, in which attachment special bail had
been filled which motion was continued." This shows how late
slavery was permitted in this county and what liberties the owners
took with their slaves. William Rinehard, John Collier, Jacob Wolfe,
John T. Griffin, John Beattie, Sarah Craig, John Denison, were other
names appearing at this court. The jurymen whoses names have not
appeared before, for the Springterm of 1834, were Ishmeai Veach,
James Lasley, James McKee, Gabriel B. Sidwell and Isaac C. Kidd.
The new contestants in suits were Samuel Grace, Jesse Grigsby,
Jesse Pratt, Lucindy Webber, Elizabeth Davis and Thomas Hart. For
the November term of this year the only jurymen not mentioned
before was James Hitchcock. Dr. B. W. Brooks was the only new
white client. William Boniface and John Bannister, were colored men,
who had been taken up as runaway slaves and served their term out
as the law required, presented their certificates and were declared
free. The case of Harry, a man of color vs. Owen Evans was
continued. For the April term of 1835, the new grand jurymen were
Thomas Pitt, Benton Modglin and James Holt. Joseph Young is
recognized as an attorney at this court. Henry Williams, Elias
Holmes, Casper Weaver and William Munsun had cases in this court.
Owen Evans
272 A HISTORY OF JOHNSON COUNTY was acquitted in the
case of Harry, the man of color. David Elms, John O'Linear, Beverly B.
Parker, Jesse Pratt, A. M. Hicklin, Thomas Hall, Christopher Kelly, D.
J. Tucker, Allen Pruet, Martin W. Dorris, and Pleasant Meadows were
other people interested in this court. Heretofore Thomas C. Brown
has held all the courts from 1829 to 1835. At October court, 1835,
the Hon. Justin Harlin, is the Judge, Samuel Copeland is the clerk,
and Benett Jones the sheriff. All the names of the grand jurors are
familiar. The District Atorney was John Dougherty, of Jonesboro,
Illinois. William Howard, Reuben Wilson and Abraham Baker are new
contestants in this court, also Joseph Williams a man of color, who
presented his certificate from Ivy Reynolds, Coroner of the county,
as having been dealt with as the law required of a runaway slave,
and obtained his freedom. One other case pretaining to the heirs of
Nathaniel Sidwell. The early courts opened at 8 A. M. At the May
court, 1841, Judge Walter B. Scates was in charge. William McNickol,
N. P. Cardwell and Samuel Short served on the Petit Jury. At the
November term, same year, William Bullock, Levi Rice, John
Carmichael and Zachariah McKee are new grand jurymen. The term
of court held May, 1842 was under Judge Scates, with W. J. Allen as
District Attorney. This is getting down to such a late date as to make
the records modern. The county records are very complete from
1840. MISCELLANEOUS COURT NOTES At a court held in 1827 Jacob
Harvick was fined fifty cents for assault and battery. "Ordered that
John Oliver be paid $2.50 for attending on the court two days and
furnishing wood, "November term, 1820. " At the May term 1825,
the case of the People vs. William Russell, indictment for giving a
challenge to fight a duel. The people were represented by Sidney
Breeze and Russell was found guilty. Fee bills for a suit brought by
Reynolds and Gray vs. W. B. Ward, June 1840, justice docket, I2V2C,
summons 18:>> |.c, judgment 25c, execution 25c, renewing
execution 25c, miles six at five cents, 30c serving summons 25c,
total cost of suit, $2.11%. Account of Thomas C. Paterson sheriff,
1815, debtor to James Finney 6214c to Dr. Davis for note $6.50, to
cash
A HISTORY OF JOHNSON COUNTY 273 lent William
Peterson, $2.121/<>. Some cases recorded .March term, 1814
Richard McBride vs. Elizabeth Keith, Arthur Love vs. Joshla and John
Graves, 1815; Johnathan Clark vs. E. Russell and wife, 1825, State
Bank of Illinois vs. Randolph Casey and Joshua Elkins, 1825, Daniel
Chap man vs. Jesse Canady, 1823; Washington McFatridge vs. John
Bain 1827 ; the people vs. Pleasant Ward, 1814, William Easton vs.
John A. Magnus, Stephen Kuykendall, late of Center Township, had a
case in court, 1815, Chas. Meek vs. Adam Harvick and Jesse Allen,
1815, King Hazel vs. Luke Williams, 1816, Elisha Reynolds and
Thomas Little page vs. Hannah Borin, 1816, Peggy Taylor vs. Robert
H. Loyd, Patsy Fisher and Owen Evans, administrators vs. John Hays,
Martha McCall vs. Levi Graham, 1817, Susannah Latham vs.
Alexander Beggs, 1820, Susannah Price and Joseph Palmer setled
with the court 1820 as administrators of the estate of Abram Price.
Thomas C. Paterson was allowed $10.00 for Prosecuting Attorney for
the past year at June court, 1816. Milton Ladd was ordered to lay
off, under the direction of George Brazil, one half of the whole length
of section 10, township 15, range 3 east, June 1826. In 1823 James
Copeland as sheriff was ordered by the court to purchase one half
bushel, one gallon, one quart, and one half pint measures to be of
the gage provided by an act of the General Assembly of the State.
David J. Baker was allowed $30.00 in specie or $60.00 in state
paper, for his services as prosecuting attorney in 1825. December
term, 1825, Richard Elkins was made guardian for Ezekiel, Robinson
and filed bond to give him a year's schooling and when twenty-one
to give him a horse worth $50.00 or other property worth that much
and one good suit of clothes, of domestic manufacture, 1825. Jasper
and Elizabeth Mount had children, Thomas M., Nancy J., and
Mathias. These children chose their mother as guardian, September,
1820, as their father had died. One of the first divorce cases is found
in May court, 1818, Elizabeth vs. John Elkins. George Smiley makes
application for a permit to keep tavern, March 12, 1814, Dishon,
Givins & Co., Thursday entered with me for a license to vend
merchandise, J. Finney, January 29, 1814. Weir & Craig had a
lawsuit against Samuel Simpson in a court held in 1813, David Elms
was made guardian for the children of William Fisher, Levi and
Williams, 1818. April 1828, the following order from
274 A HISTORY OF JOHNSON COUNTY the court, "that a
tax of one-half percent be levied on the following kinds of property,
to-wit, on town lots, slaves, requistion and indentured negroes or
mulatto servants, pleasure carriages, distillers, stock-in-trade,
horses, mares, mule^ asses, neat cattle above three years of age,
and on water mills with their appendages, Grand jurors 1808,
William Alexander, John Worley, James Henderson and William
McLaughlin, Jacob Solomans Christphor Lore, John Henderson and
Nathaniel Sidwell. Walter B. Scates presided at the Spring term,
1837. Jacob C. Kidd, Thomas Pitt and Amos V. Lasley were new
jurymen. New men in court were Nathaniel Mullinax, Elisha Cowgill,
James Teagnor, J. M. Webster. Jane Hill, Administratrix of Curtis Hill.
Sam Harrison, a man of color, was declared free by the court under
the same law that Washington Thompson had been freed the year
before. There were several indictments against persons for keeping
a tippling house open on the Sabbath day, another was fined for
playing at dice on the Sabbath at this period it would be called
"shooting craps." Joseph Strahl, Solomon Grace, James Emerson,
Abel Ford, Peter Yokum, John Shinall, Francis Marberry, were new
names appearing on the 1837 court records. In 1838, we have the
same judge and officers. The defendants were Watts and Franklin,
W. B. Donaghy, John Mclntire, Wiley Wise, Wiley Simmons, Nathan
Richardson, William Hooker. At the April term, 1839, Abram, Nathan
and Reuben, men of color, were indicted for some misdemeanor.
John Copeland went on their bail. He was the owner of at least one
of them, perhaps all. The indictment was quashed and they were
discharged. There is also a case of slander, Thomas Johnson and
wife vs. Cornelius Vanderbilt and wife, tradition says, this Vanderbilt
family, who had a beautiful home and farm on the Ohio River
opposite the Grand Chain, was a member of the famous Vanderbilt
family of New York. In the November term of court of this year, Levi
a man of color, appeared before the court and claimed freedom
under the law, which was granted. The 1840 court shows some
names not seen before, J. W. Corbin, Peter 0,Neal, Peter McMahan,
J. A. Rhodes, Powell Towler, and J. W. McKee. Jndofe Sidney Breeze
held the November term of court, 1840 with W. H. Stickney, District
Attorney. Levi Gifford, J. B. Spotts, Henry Freeman, J. K. Cheek, are
connected with
A HISTORY OF JOHNSON COUNTY 275 this court. John
Fisher presented his bond of $10,000 as sheriff, with C. C. Latham,
William Fisher, Burrell Anderson, Berry Sexton and W. H. Graves as
bondsman. Copied from the fee book of J. Finney Circuit Clerk, John
Bowman Dr., to James Finny Cash: 1814 the amount of my fee in the
case, $13.00; 1815, Capt. Daniel T. Coleman Dr., to same cash lent,
$5.00; 1817, July, lent Martin Harvick, $5.00; October, 1817 William
Garner cash lent, $3.80, paid. Record and copy of deed, $2.50.
1817; Stephen Smith Dr., to James Finny M. $1.00, 3 letter postage
68V2C paid. Hoseah Borin Dr., to two certificates and seals at 75
cents $1.50 postage on two letters 25c each. 50 certificates and seal
75c. Postage on letters 121/2C, 87V2C, Benj. F. Conner Certificate
75c postage 37i/2c, $1.12V2, October, 1817, Lieutent William
Townsend ten dollars. To postage 28, $10.28, December, 1819, lent
George Smily 50c. John Smith letters 50c, Peter Slark Dr., for
postage 37V&C, Robert Hargrave Certificate 75c, John F. Smith,
balance on letters of Administration, paid $2.50, October, 1819, John
S. Graves to cash, one time $4.00, at another $3.00, to postage on
letter, 25c, $7.25 ; Milton Ladd postage on two letters 50c, John
Elkins Dr. To James Finny clerk, for making copv of record by order
of his attorney, William Russell, 1991 words at 12i/2c for every 72—
$3.40% Dr. Jacob Roberson, by order of his attorney William Russell
Dr. To James Finny Clerk, for copy declaration 300 wrords 51V2C,
James Brown Dr. for postage 1 at 25c and 1 at 18 V2, John Bridges
1 at 25c, Simon Price 1 at 25c, Rice Sams 1 at 18%, Hosean Borin 2
letters 50c. January 7, 1817, Robert Hays Dr. To James Finny Clerk,
for making complete record in the case of Patsy Fisher and Owen
Evans vs. John Hays, appraiser, $4.80. James Silton 35c, 1818, July;
William Lawrence, for two copies of deed 871/;>c. Record 1818.
David Elms, for certificate and seal 75c, 1819, May 26, John Elkins
Dr. To James Finny Clerk To copy, of an indictment 68c; July Isaac,
D. Wilcox Dr. for 8 certificates and seals at 75c $6.00, "Squire Choat"
tavern license, $5.00 paid. EARLY MARRIAGE DATES Daniel T.
Coleman and Lucy Craft, 1820 ; John Tweedy married Mary Craft
some time before 1825; Martin Harvick married Nancy Fisher, 1821;
Naman Martin married Temperance West Axley, 1825; Stanton
Simpson married
276 A HISTORY OF JOHNSON COUNTY Nancy Higgins,
1831 ; in 1835 licenses were issued to James T. Collier and Parmelia
Chapman; Thomas Mercer and Minerva Allen; John Cooper and
Betsy Harrell; James H. Cooper, and Jane Elliot, John Allen and Mary
Sarah Mercer, Gilbert H. Padget and Amanda Chapman; John Jones
and Esther Carter, 1839; Washington Chapman and Cynthia Jobe,
1835; John S. Copeland and Ann Ward, 1835; Joshua S. Copeland
and Elizabeth Axley, 1835; Issac S. Copeland and Eleanor Gore,
1835; Alfred Copeland and Agnes Phillips, 1841; James Mabrey and
(Mrs) Elizabeth Copeland, 1841 ; Alfred Copeland and Katherine
Elkins, 1844; John A. Copeland and Cynthia A. Scroggins, 1857;
John West and Nancy Ann Allen, 1859. James A. Mecalf married a
daughter of N. 0. Gray. The Metcalfs resided in that section of the
county that made Pulaski. Judging from court records Bennett
Handcock married Mary Peterson, widow of Wm. Peterson, who had
the infant children, Elizabeth, Joshua and Sally, and whose will was
written, 1815. James Weaver married Mary, children, James, Sophia,
Mariah; Mary widow of James Weaver married Thornton. OFFICERS
Johnson County Territory was included in St. Clair, at its organization
in 1790. Thomas Bradley was the first sheriff, William St. Clair is
given as sheriff the same year. William Biggs was appointed coroner
in 1790. Randolph County was formed in 1795, George Fisher,
sheriff, 1801 and James Edgar, 1805. Robert Moris and James Edgar
served as clerks of Randolph County between the years 1806 to
1808. Pierre Menard, George Fisher and James Finney were
appointed Judges of the court of common pleas for Randolph
County, 1806. E. Entsminger was deputy sheriff in 1809. John
Bradshaw and John Phelps were appointed Justices of Peace in
1809. James Galbreth. sheriff 1809. Marvin Fuller, Nathan Davis, and
J. B. Murry were appointed J. P. for Randolph County in 1810. (This
was copied from Randolph County records.) The County of Johnson
was organized September 14, 1812, and the following officers were
appointed by the Governor: Thomas C. Patterson, sheriff; Thomas
Furguson, Nathaniel Green, Judges of the court of common pleas
and
A HISTORY OF JOHNSON COUNTY 277 James Finney, clerk.
Jessie Griggs, who lived in the Murphy sboro neighborhood, was
appointed a Justice for this county, 1812. I. Weaver, who lived in
Center Township, Thomas Griffith and John Byers, who lived in the
section that made Jackson County in 1816, were appointed Justices
of the Peace in 1812. Henson Day and Thomas Green were
appointed J. P. in 1813, and John Palmer, coroner. Archibald
McAllister, coroner, 1814, George Hacker, Jessie Echols and George
Hunsaker were J. P. in 1814 and in the same year James Finny was
appointed clerk of the Supreme Court ; Gilbert Marshall was
appointed surveyor. John Earthman was coroner in 1815. William M.
Lammison, Joshua Davis, Vance Lusk, William Smith, James Bain,
John Bowman and Thomas Lawrence were appointed J. P. in 1815.
Wrilliam Mears was appointed District Attorney in 1813 and Thomas
C. Brown to the same office in 1814. John Weldon was appointed J.
P. in 1816, he lived on the west side of the county which made
Union when it was created. James Weaver, Benjamin Maneer, Hosea
Borin, William Stiles, Irvin Morris, and Andrew Cochran were
appointed Justices for the County in 1816. Vance Lusk and James
Whiteside, T. Lammison and James Fox lived in that section of
Johnson that later became Pope County. In 1817, the Governor
appointed John Copeland, James Crunk, David Elms, John Whittiker,
George Brown, Joseph Palmer Justices. John Hargraves, who lived in
Union in 1818, surveyor. Commissioners 1818; Hezekiah West, 1821,
William McFatridge, 1820, Joseph McCorcle, 1823, John Peterson,
John Russell, 1824, Samuel Chapman and Lancaster Cox, 1826;
David Shearer, William B. Smith, Rix Carter and Carter Latham;
1840, Elijah Smith and Worthington Gibbs, 1837 ; Ivy Reynolds,
1853 ; B. S. and W. B. Smith, Marvel Scroggins, 1855 ; John
Shadrick and John Simmons, 1857; Branum Worrell, John Oliver and
John N. Mozley, 1857; J. S. Toler and H. S. Lawrence 1858; William
Barnwell, 1861; Jason B. Smith, 1866; Mark Whiteaker, 1886; John F.
Casper, 1878; W. D. Deans and R. Brown, 1878; John F. Casper,
1878; W. D. Deans and R. W. Brown, 1879; T. J. McCormick; Lewis F.
Walker, 1870; W. Y. Davis, 1872; T. M. Cavitt, 1884; Green R. Casey,
1893. So far this list is incomplete, but from 1914 to 1924
278 A HISTORY OF JOHNSON COUNTY the list is correct. H.
0. Cavitt, J. L. Thornton, J. C. Carter, H. W. Emerson, William Nobles,
J. W. Rushing, N. J. Mozley, J. C. Chapman, J. Wormack and Thomas
Ballance. Sheriffs, dating from 1815: Hamlet Furguson, James Davis,
Irvin Morris, John Oliver, James Copeland, Samuel Copeland, John
Fisher, Bennett Jones, R. D. Hight, Basil Gray, James M. Finney, D. C.
Chapman, F. C. Kirkham, Lorenzy D. Craig, H. C. Carson, J. N.
Mozley, William Perkins, A. J. Gray, J. H. Carter, W. C. Allen, Mark
Whitteaker, L. H. Frizzell, R. R. Ridenhower, James F. Whitehead, M.
A. Hankins, John L. Veach, J. P. Mathis and T. C. Taylor, who is the
present incumbent. County Judges: A. J. Kuykendall, 1837; T. C.
Brown, 1878; C. N. Damron, 1879; P. T. Chapman, 1882; T. J. Murry,
1890; 0. R. Morgan, 1898; W. Y. Smith, 1900; W. A. Spann, 1906; J.
F. Hight, 1914; J. 0. Cowan, 1918. County Clerks : James Finney was
appointed 1812. No other name is found as clerk until Samuel
Copeland's name appears 1834; D. Y. Bridges, 1834; I. N. Pearch,
1848; W. J. Gibbs, 1857; B. S. Smith, 1861; W. W. Boyt, 1873; F. M.
Jones, 1877; J. W. Gore, 1886; W. H. Thomas, 1890; Thomas, M.
Gore, 1894; I. L. Morgan, 1902; E. F. Throgmorton, 1906, and he
has held the office continuously since. County Superintendents of
Schools. The first superintendent coming under the 1855 law, was
William Culver, J. S. Whittenberg, R. M. Fisher, Thomas G. Farris, P.
T. Chapman, W. Y. Smith, M. T. Van Cleve, Sara J. White, berg, W. M.
Grissom, Emma Rebman, E. W. Sutton, F. E. Worrell. Circuit clerk:
The first persons to hold this office were S. C. Rentfro, 1831 and
John Dun, 1834. They were called "recorder of deeds." In 1864, J. S.
Crum was elected J. W. Gore, 1876, J. S. Francis, 1880, F. B.
Thacker, 1888, L. J. Smith, 1892. C. W. Mills; 1904, Grant
McFatridge, 1908, John W. Carlton, 1916. County Surveyor: Gilbert
Marshall, 1815; Milton Ladd 1820; L. W. Fern, 1855; H. M.
Ridenhower, 1865; Joshua J. Scott, Charles W. McCoy, 1871; W. B.
Lewis, WT. C. Watson, 1907; Clint Hunt, 1916. Charles Hook was the
first county supervisor of roads, 1914; John Sharp and Almus
Ragsdale. The latter is filling the position at present, 1924, John
Sharp, surveyor, 1924.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
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.
Let us accompany you on the journey of exploring knowledge and
personal growth!
textbookfull.com