Skip to content

Commit

Permalink
threw in the first act
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Feb 12, 2017
1 parent 0a70316 commit aedee83
Show file tree
Hide file tree
Showing 9 changed files with 160 additions and 1 deletion.
Binary file modified docs/_build_html/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build_html/.doctrees/index.doctree
Binary file not shown.
Binary file added docs/_build_html/_images/notebook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions docs/_build_html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,61 @@ For Windows
^^^^^^^^^^^

Windows users will need to download and install `this Microsoft package <https://www.microsoft.com/en-us/download/details.aspx?id=44266>`_, a compiler that will allow us to install other Python tools later.


Act 1: Hello Jupyter Notebook
-----------------------------

A `Jupyter Notebook <http://jupyter.org/>`_ is a browser application where you can write, run, remix and republish code. It is free
software you can install and run like any other open-source library. It is used by scientists, researchers
and corporations to create and share their analysis.

It's also used by journalists to develop stories and show their work. Examples include:

* `"The Tennis Racket" <https://github.com/BuzzFeedNews/2016-01-tennis-betting-analysis/blob/master/notebooks/tennis-analysis.ipynb>`_ by BuzzFeed and the BBC
* `"Californians are paying billions for power they don't need" <https://github.com/datadesk/california-electricity-capacity-analysis/blob/master/analysis.ipynb>`_ by the Los Angeles Times
* `"Machine bias" <https://github.com/propublica/compas-analysis/blob/master/Compas%20Analysis.ipynb>`_ by ProPublica


The first step in our lesson is to get Jupyter's software installed. We're going to start that process
by creating a new development environment with virtualenv in your terminal. Name it after our application.

.. code-block:: bash
virtualenv first-python-notebook
Jump into the directory it created.

.. code-block:: bash
cd first-python-notebook
Turn on the new virtualenv, which will instruct your terminal to only use those libraries installed
inside its sealed space. You only need to create the virtual environment once, but you'll need to repeat these
"activation" steps each time you return to working on this project.

.. code-block:: bash
# In Linux or Mac OSX try this...
. bin/activate
# In Windows it might take something more like...
cd Scripts
activate
cd ..
Use ``pip`` on the command line to install Jupyter Notebook.

.. code-block:: bash
pip install jupyter
Start up the notebook from your terminal.

.. code-block:: base
jupyter notebook
That will open up a new tab in your default web browser that looks something like this:

.. image:: /_static/notebook.png
Binary file added docs/_build_html/_static/notebook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions docs/_build_html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<li><a class="reference internal" href="#">First Python Notebook</a><ul>
<li><a class="reference internal" href="#what-you-will-learn">What you will learn</a></li>
<li><a class="reference internal" href="#prelude-prequisites">Prelude: Prequisites</a></li>
<li><a class="reference internal" href="#act-1-hello-jupyter-notebook">Act 1: Hello Jupyter Notebook</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -241,6 +242,48 @@ <h4>For Windows<a class="headerlink" href="#id7" title="Permalink to this headli
</div>
</div>
</div>
<div class="section" id="act-1-hello-jupyter-notebook">
<h2>Act 1: Hello Jupyter Notebook<a class="headerlink" href="#act-1-hello-jupyter-notebook" title="Permalink to this headline"></a></h2>
<p>A <a class="reference external" href="http://jupyter.org/">Jupyter Notebook</a> is a browser application where you can write, run, remix and republish code. It is free
software you can install and run like any other open-source library. It is used by scientists, researchers
and corporations to create and share their analysis.</p>
<p>It&#8217;s also used by journalists to develop stories and show their work. Examples include:</p>
<ul class="simple">
<li><a class="reference external" href="https://github.com/BuzzFeedNews/2016-01-tennis-betting-analysis/blob/master/notebooks/tennis-analysis.ipynb">&#8220;The Tennis Racket&#8221;</a> by BuzzFeed and the BBC</li>
<li><a class="reference external" href="https://github.com/datadesk/california-electricity-capacity-analysis/blob/master/analysis.ipynb">&#8220;Californians are paying billions for power they don&#8217;t need&#8221;</a> by the Los Angeles Times</li>
<li><a class="reference external" href="https://github.com/propublica/compas-analysis/blob/master/Compas%20Analysis.ipynb">&#8220;Machine bias&#8221;</a> by ProPublica</li>
</ul>
<p>The first step in our lesson is to get Jupyter&#8217;s software installed. We&#8217;re going to start that process
by creating a new development environment with virtualenv in your terminal. Name it after our application.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>virtualenv first-python-notebook
</pre></div>
</div>
<p>Jump into the directory it created.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="nb">cd</span> first-python-notebook
</pre></div>
</div>
<p>Turn on the new virtualenv, which will instruct your terminal to only use those libraries installed
inside its sealed space. You only need to create the virtual environment once, but you&#8217;ll need to repeat these
&#8220;activation&#8221; steps each time you return to working on this project.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="c1"># In Linux or Mac OSX try this...</span>
. bin/activate
<span class="c1"># In Windows it might take something more like...</span>
<span class="nb">cd</span> Scripts
activate
<span class="nb">cd</span> ..
</pre></div>
</div>
<p>Use <code class="docutils literal"><span class="pre">pip</span></code> on the command line to install Jupyter Notebook.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>pip install jupyter
</pre></div>
</div>
<p>Start up the notebook from your terminal.</p>
<div class="highlight-base"><div class="highlight"><pre><span></span>jupyter notebook
</pre></div>
</div>
<p>That will open up a new tab in your default web browser that looks something like this:</p>
<img alt="_images/notebook.png" src="_images/notebook.png" />
</div>
</div>


Expand Down
2 changes: 1 addition & 1 deletion docs/_build_html/searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/_static/notebook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,61 @@ For Windows
^^^^^^^^^^^

Windows users will need to download and install `this Microsoft package <https://www.microsoft.com/en-us/download/details.aspx?id=44266>`_, a compiler that will allow us to install other Python tools later.


Act 1: Hello Jupyter Notebook
-----------------------------

A `Jupyter Notebook <http://jupyter.org/>`_ is a browser application where you can write, run, remix and republish code. It is free
software you can install and run like any other open-source library. It is used by scientists, researchers
and corporations to create and share their analysis.

It's also used by journalists to develop stories and show their work. Examples include:

* `"The Tennis Racket" <https://github.com/BuzzFeedNews/2016-01-tennis-betting-analysis/blob/master/notebooks/tennis-analysis.ipynb>`_ by BuzzFeed and the BBC
* `"Californians are paying billions for power they don't need" <https://github.com/datadesk/california-electricity-capacity-analysis/blob/master/analysis.ipynb>`_ by the Los Angeles Times
* `"Machine bias" <https://github.com/propublica/compas-analysis/blob/master/Compas%20Analysis.ipynb>`_ by ProPublica


The first step in our lesson is to get Jupyter's software installed. We're going to start that process
by creating a new development environment with virtualenv in your terminal. Name it after our application.

.. code-block:: bash
virtualenv first-python-notebook
Jump into the directory it created.

.. code-block:: bash
cd first-python-notebook
Turn on the new virtualenv, which will instruct your terminal to only use those libraries installed
inside its sealed space. You only need to create the virtual environment once, but you'll need to repeat these
"activation" steps each time you return to working on this project.

.. code-block:: bash
# In Linux or Mac OSX try this...
. bin/activate
# In Windows it might take something more like...
cd Scripts
activate
cd ..
Use ``pip`` on the command line to install Jupyter Notebook.

.. code-block:: bash
pip install jupyter
Start up the notebook from your terminal.

.. code-block:: base
jupyter notebook
That will open up a new tab in your default web browser that looks something like this:

.. image:: /_static/notebook.png

0 comments on commit aedee83

Please sign in to comment.