Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added project and finalized notes
  • Loading branch information
rcc02007 committed Jan 16, 2020
1 parent 32ded83 commit 7f98727
Show file tree
Hide file tree
Showing 32 changed files with 29,110 additions and 65,716 deletions.
85 changes: 85 additions & 0 deletions README.html
@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>README</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
</style>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<h1 id="computational-mechanics-02---analyze-data">Computational Mechanics 02 - Analyze Data</h1>
<h2 id="learning-some-statistics-and-data-processing-skills-in-python">Learning some statistics and data processing skills in Python</h2>
<p>Welcome to Computational Mechanics Module #2 - Analyze Data</p>
<p>There are four modules and one final project. The modules will get us started on our exploration of computational mechanics using Python, listed below each module are the learning objectives.</p>
<ol type="1">
<li><a href="./notebooks/01_Cheers_Stats_Beers.ipynb">01_Cheers_Stats_Beers</a></li>
</ol>
<ul>
<li>Read data from a <code>csv</code> file using <code>pandas</code>.</li>
<li>The concepts of Data Frame and Series in <code>pandas</code>.</li>
<li>Clean null (NaN) values from a Series using <code>pandas</code>.</li>
<li>Convert a <code>panda</code>s Series into a <code>numpy</code> array.</li>
<li>Compute maximum and minimum, and range.</li>
<li>Revise concept of mean value.</li>
<li>Compute the variance and standard deviation.</li>
<li>Use the mean and standard deviation to understand how the data is distributed</li>
<li>Plot frequency distribution diagrams (histograms).</li>
<li>Normal distribution and 3-sigma rule.</li>
</ul>
<ol start="2" type="1">
<li><a href="./notebooks/02_Seeing_Stats.ipynb">02_Seeing_Stats</a></li>
</ol>
<ul>
<li>You should always plot your data.</li>
<li>The concepts of quantitative and categorical data.</li>
<li>Plotting histograms directly on columns of dataframes, using <code>pandas</code>.</li>
<li>Computing variance and standard deviation using NumPy built-in functions.</li>
<li>The concept of median, and how to compute it with NumPy.</li>
<li>Making box plots using <code>pyplot</code>.</li>
<li>Five statistics of a box plot: the quartiles Q1, Q2 (median) and Q3 (and</li>
<li>interquartile range Q3<span class="math inline">\(-\)</span>Q1), upper and lower extremes.</li>
<li>Visualizing categorical data with bar plots.</li>
<li>Visualizing multiple data with scatter plots and bubble charts.</li>
<li><code>pandas</code> is awesome!</li>
</ul>
<ol start="3" type="1">
<li><a href="./notebooks/03_Linear_Regression_with_Real_Data.ipynb">03_Linear_Regression_with_Real_Data</a></li>
</ol>
<ul>
<li>Making our plots more beautiful</li>
<li>Defining and calling custom Python functions</li>
<li>Applying linear regression to data</li>
<li>NumPy built-ins for linear regression</li>
<li>The Earth is warming up!!!</li>
</ul>
<ol start="4" type="1">
<li><a href="./notebooks/04_Stats_and_Montecarlo.ipynb">04_Stats_and_Montecarlo</a></li>
</ol>
<ul>
<li>How to generate “random” numbers in Python+</li>
<li>The definition of a Monte Carlo model</li>
<li>How to calculate <span class="math inline">\(\pi\)</span> with Monte Carlo</li>
<li>How to take the integral of a function with Monte Carlo</li>
<li>How to propagate uncertainty in a model with Monte Carlo</li>
<li><strong>Bonus</strong>: use Sympy to do calculus and algebra for us! _no need for</li>
<li>Wolfram, sorry Stephen_</li>
<li>How to generate a normal distribution using uniformly random numbers</li>
</ul>
<p>+The computer only generates pseudo-random numbers. For further information <strong>and</strong> truly random numbers check <a href="https://www.random.org/randomness/">www.random.org</a></p>
<h2 id="computational-mechanics-project-02---create-specifications-for-a-spitballingrobot"><a href="./project/02_Analyze-data_project.ipynb">Computational Mechanics Project #02 - Create specifications for a spitballingrobot</a></h2>
<p>On the first day of class, we threw <span class="math inline">\(2&quot;\times~2&quot;\)</span> dampened paper (spitballs) at a target on the whiteboard. Now, we are going to analyze the accuracy of the class with some cool Python tools and design a robot that has the same accuracy and precision as the class.</p>
<p>The goal of this project is to determine the precision of necessary components for a robot that can reproduce the class throwing distibution. We have generated pseudo random numbers using <code>numpy.random</code>, but the class target practice is an example of truly random distributions. If we repeated the exercise, there is a vanishingly small probability that we would hit the same points on the target, and there are no deterministic models that could take into account all of the factors that affected each hit on the board.</p>
<p><img src="./images/robot_design.png" style="height: 250px;"/></p>
</body>
</html>
72 changes: 72 additions & 0 deletions README.md
@@ -0,0 +1,72 @@
# Computational Mechanics 02 - Analyze Data
## Learning some statistics and data processing skills in Python

Welcome to Computational Mechanics Module #2 - Analyze Data

There are four modules and one final project. The modules will get us started on our exploration of computational
mechanics using Python, listed below each module are the learning objectives.


1. [01_Cheers_Stats_Beers](./notebooks/01_Cheers_Stats_Beers.ipynb)
* Read data from a `csv` file using `pandas`.
* The concepts of Data Frame and Series in `pandas`.
* Clean null (NaN) values from a Series using `pandas`.
* Convert a `panda`s Series into a `numpy` array.
* Compute maximum and minimum, and range.
* Revise concept of mean value.
* Compute the variance and standard deviation.
* Use the mean and standard deviation to understand how the data is distributed
* Plot frequency distribution diagrams (histograms).
* Normal distribution and 3-sigma rule.

2. [02_Seeing_Stats](./notebooks/02_Seeing_Stats.ipynb)
* You should always plot your data.
* The concepts of quantitative and categorical data.
* Plotting histograms directly on columns of dataframes, using `pandas`.
* Computing variance and standard deviation using NumPy built-in functions.
* The concept of median, and how to compute it with NumPy.
* Making box plots using `pyplot`.
* Five statistics of a box plot: the quartiles Q1, Q2 (median) and Q3 (and
* interquartile range Q3$-$Q1), upper and lower extremes.
* Visualizing categorical data with bar plots.
* Visualizing multiple data with scatter plots and bubble charts.
* `pandas` is awesome!

3. [03_Linear_Regression_with_Real_Data](./notebooks/03_Linear_Regression_with_Real_Data.ipynb)
* Making our plots more beautiful
* Defining and calling custom Python functions
* Applying linear regression to data
* NumPy built-ins for linear regression
* The Earth is warming up!!!

4. [04_Stats_and_Montecarlo](./notebooks/04_Stats_and_Montecarlo.ipynb)
- How to generate "random" numbers in Python+
- The definition of a Monte Carlo model
- How to calculate $\pi$ with Monte Carlo
- How to take the integral of a function with Monte Carlo
- How to propagate uncertainty in a model with Monte Carlo
- **Bonus**: use Sympy to do calculus and algebra for us! _no need for
- Wolfram, sorry Stephen_
- How to generate a normal distribution using uniformly random numbers

+The computer only generates pseudo-random numbers. For further
information **and** truly random numbers check
[www.random.org](https://www.random.org/randomness/)

## [Computational Mechanics Project #02 - Create specifications for a spitballing robot](./project/02_Analyze-data_project.ipynb)

On the first day of class, we threw $2"\times~2"$ dampened paper (spitballs) at
a target on the whiteboard. Now, we are going to analyze the accuracy of the
class with some cool Python tools and design a robot that has the same accuracy
and precision as the class.

The goal of this project is to determine the precision of necessary components
for a robot that can reproduce the class throwing distibution. We have generated
pseudo random numbers using `numpy.random`, but the class target practice is an
example of truly random distributions. If we repeated the exercise, there is a
vanishingly small probability that we would hit the same points on the target,
and there are no deterministic models that could take into account all of the
factors that affected each hit on the board.

<img src="./images/robot_design.png" style="height: 250px;"/>

0 comments on commit 7f98727

Please sign in to comment.