\documentclass[11pt]{article}

\input{../LaTeX/preamble.tex}

% document starts here
\begin{document}
\parskip=\bigskipamount
\parindent=0.0in
\thispagestyle{empty}
\input{../LaTeX/header.tex}

\bigskip\bigskip
\centerline{\Large \bf Topic Outline:  Data + Python}
\centerline{Revised: \today}


\section*{Materials}

\begin{itemize}
\item  First-day handouts:  Syllabus, Project Guide, Due Dates
\item  Today's handouts:  this outline, three ideas (two copies), book chapters, red/green stickers
\item  All posted on {\it Topic list \& links\/} page of website (except the stickers).
\end{itemize}



\section*{About the course}

\begin{itemize}
\item Data + Python = Magic!
\begin{itemize}
\item <NAME>, Jessica, Tim
\end{itemize}

\item What?
\begin{itemize}
\item ... are you doing here?
\item Skills are nice, coding is literacy for the modern age
\item Something to show potential employers
\end{itemize}

\item Why?
\begin{itemize}
\item Why data?
\item Why code?
\item Why Python?
% general purpose language, great data tools, open source and free, community
\item Why bootcamp?
\item Why you?
\end{itemize}

\item Things we believe
\begin{itemize}
\item Anyone can do this.  Target audience is {programming newbies --- with courage}.
\item It's ok to be lost.  We've all been there, it's not permanent.
%\item We're here to help.  But you need to tell us when you're lost.
\item This is fun.  Really.
%It's an amazing feeling to be able to do cool things in minutes.
\end{itemize}


\item Rules to live by
\begin{itemize}
\item Don't panic.  It will seem overwhelming at first, but stick with it and you'll be fine.
\item One step at a time.  Don't rush this.  In six weeks you'll know a lot.
\item Learn by doing.  Same directions as Carnegie Hall, no shortcuts.
%\item Let your nerd flag fly.  Learn to love xkcd.
\item Ask for help.  Don't be a hero, let us know if you could use some help.
\end{itemize}

\needspace{2\baselineskip}
\item Course materials
\begin{itemize}
\item Required:  practice, exam, project
\item Google ``nyu data bootcamp''
\item Website (thanks, Spencer):  \url{http://databootcamp.nyuecon.com/}  (bookmark me!)
\item Book
\item Topic list \& links
\item Discussion group
\item Data page
\item GitHub repository:  \url{https://github.com/DaveBackus/Data_Bootcamp}
\end{itemize}

\item You
\begin{itemize}
\item Come to class
\item After class:  {\bf write} and {\bf read}
\item Practice
\item Have fun
\end{itemize}
\end{itemize}


\section*{Anaconda}

\begin{itemize}
\item Install the Anaconda distribution
\begin{itemize}
\item Put red sticker on your laptop
\item Distribution?
\item Google ``anaconda download'' or borrow a USB drive
\item Download or copy installer to your computer --- {\bf Python 3.5!}
\item Run installer
\item Start Launcher (use search box)
\item Replace red sticker with green when Launcher opens
\end{itemize}

\item Environments
\begin{itemize}
\item Environments?  (Analogy:  Word is an environment for creating Word docs.)
%(environment is to program as Word is to Word doc)
\item Spyder:  classic coding environment with editor and output windows
\item Jupyter:  environment for creating IPython notebooks, which combine code with text and output
\end{itemize}

\end{itemize}



\section*{Run test program -- twice}

\begin{itemize}
\item Test program code:

\vspace{-0.1in}
\begin{verbatim}
"""
Test program for Data Bootcamp course @ NYU Stern
"""
import sys

print('Welcome to Data Bootcamp!')
print('Python version:')
print(sys.version)
\end{verbatim}

\needspace{2\baselineskip}
\item Run test program in Spyder
\begin{itemize}
\item Put red sticker on your laptop
\item Create \verb|Data_Bootcamp| directory/folder on your computer.
{\bf Raise your hand if you're not sure what that means or how to do it.}
\item From Launcher, launch Spyder (labelled ``spyder-app'')
\item Look around (editor, IPython console, Object inspector)
\item Enter test program in editor (on the left)
\item Save in \verb|Data_Bootcamp| directory as \verb|bootcamp_test.py|
(File, Save as, look for folder)
\item Run program (click on large green triangle)
\item Look for correct output (last line should be {\tt 3.5.x etc})
\item Switch to green sticker if it works
\end{itemize}

\item Run test program in Jupyter
\begin{itemize}
\item Put red sticker on your laptop
\item From Launcher, launch Jupyter (labelled ``ipython-notebook'')
\item Navigate to \verb|Data_Bootcamp| directory
\item Open a new IPython notebook (New, Python 3)
\item Change name from {\tt Untitled} to \verb|bootcamp_test|
\item Look around (toolbar, menubar, code cells)
\item Enter test program in code cell
\item Run program (Cell, Run All)
\item Look for correct output (last line should be {\tt 3.5.x etc})
\item Switch to green sticker if it works
\end{itemize}

\item Spyder startup summary
\begin{itemize}
\item Open by typing Launcher in search box (spotlight on Macs), then choose spyder-app.
\item Or just type Spyder in search box
\end{itemize}

\item GitHub summary
\begin{itemize}
\item Source of course materials
\item Save files by cut and paste, clever save as, or "Raw" (ask about this)
\end{itemize}

\end{itemize}


\section*{Practice and review}


Put red sticker on your laptop, replace with green when you're done.
Discuss with your neighbor.
Raise your hand if you could use some help.

\begin{enumerate}

\item Fill in the blanks in this table:
%relating ``environments'' to the files they are related to:

\begin{center}
\begin{tabular}{cc}
\toprule
Environment & File or Object \\
\midrule
MS Word  & Word document  \\
MS Excel & Excel file     \\
iTunes & \\
%Typewriter & \\
Spyder   &                \\
         & IPython notebook \\
\bottomrule
\end{tabular}
\end{center}


\item Run the \verb|Maddison_data_input.py| Python code example.
\begin{itemize}
\item Go to the \verb|Data_Bootcamp| GitHub repository (link above).
\item Navigate to the {\tt Code} directory and {\tt Lab} subdirectory.
\item Get \verb|Maddison_data_input.py|
\begin{itemize}
\item Cut and paste into blank file
\item Or:  Save file in \verb|Data_Bootcamp| directory (ask how)
\end{itemize}
\item Open file in Spyder (File, Open).
\item Run it by clicking on large green triangle.
\item What do you see?
\end{itemize}

\item {\it Only if you have time.\/} Try this program: \verb|OECD_health_indicators.py|.
What do you see?  What questions does it raise?
(There are other files in the same directory, but some of them don't work yet.)
\end{enumerate}


\section*{Thinking about data}

\begin{itemize}

\item Data + Picture = a compelling way to tell a story

\item Where we're headed
\begin{itemize}
\item Think of a {\bf graph\/} you'd like to produce -- a ``visualization''
\item And the {\bf story\/} it tells
\item And the {\bf data\/} that went into it
\end{itemize}

\item Examples (links on {\it Topic outlines \& links\/} page) [Gapminder]

\item Questions about graphs
\begin{itemize}
\item What did you learn, what is the {\bf story\/}?
\item {\bf What else} would you like to know?
\item Where did the {\bf data\/} come from?
\end{itemize}

\item Examples revisited, answer the questions

\item Course projects
\begin{itemize}
\item Course structure:  tools, project
\item Opportunity to show off your skills (Projects directory of GitHub repo)
\item First step:  develop project ideas ({\bf ideas are developed, not discovered})
\item What interests {you}? (finance? movies?  soccer?)
\end{itemize}

\item Idea machines
\begin{itemize}
\item Start with an idea or subject (what interests you?)
\item Start with a dataset (you'll know more shortly)
\item Start with an example (see link on data page)
\item Start with a suggestion from the people you work with
\end{itemize}

\item Three ideas
\begin{itemize}
\item Put red sticker on your computer
\item Goal:  write down three ideas, 1-2 sentences each (see handout)
\item Use your imagination, don't overthink it (improv: what's your name?)
\item Talk to your neighbors, bounce ideas around
\item Or look at the {\it Data sources\/} page of the course website
\item When you're done, switch to green sticker
\item Share an idea with the class, ask for suggestions for developing further
\item Save ideas for future reference
\item Optional:  leave a copy with me
\end{itemize}
\end{itemize}


\section*{After class}

\begin{itemize}
\item Required
\begin{itemize}
\item Read Syllabus and Project Guide.
\item Mark Due Dates on your calendar.
\item Skim chapters 1-3 of the book.
\end{itemize}
\item Recommended
\begin{itemize}
\item If you haven't already:  join the discussion group, take the entry poll.
\item Explore the website.  Make sure you can find the book, due dates,
topic outlines, assignments, and data sources.
\item Post a link to an interesting graph on the discussion group.
\item Look through the IPython notebook \verb|bootcamp_examples.ipynb|
in the {\tt Code/IPython} directory of the GitHub repo.
What graphs interest you?  What data?
Do they suggest anything else you might explore?
\end{itemize}
\end{itemize}

\input{../LaTeX/footer.tex}


\end{document}

**Outline**

* Why are we doing this?
* Install Anaconda
* Data

**Skills**

Why skills?

* Businesses want people with skills (duh!)

Why code?

* One of the skills businesses value (not the only one)
* Do things Excel can't do, and do them faster

Why Python?

* User-friendly
* Broad range of applications

**Overview**

Where we're headed

* Think of a **picture** you'd like to produce -- a "visualization"
* And about what **data** you'll need
* And the **coding skills** to get there
* Examples:  [Gapminder](http://www.gapminder.org/world/) | [cancer screening](http://www.vox.com/2015/10/28/9631500/does-mammography-work) | [Uber in NYC](http://fivethirtyeight.com/features/uber-is-serving-new-yorks-outer-boroughs-more-than-taxis-are/) | [mortality](http://www.pnas.org/content/early/2015/10/29/1518393112.full.pdf) | [earthquake](https://jawbone.com/blog/napa-earthquake-effect-on-sleep/)

http://graphics.wsj.com/infectious-diseases-and-vaccines/

http://www.nytimes.com/interactive/2016/01/07/us/drug-overdose-deaths-in-the-us.html

Philosophy

* Target **coding novices**, no prior experience required or expected
* **Jump right in** the deep end of the pool, figure it out as we go
* Not a typical programming course:  cover only those aspects of Python relevant to data work

Rules to live by

* **Don't panic**.  The jargon and concepts will seem mysterious at first, but if you keep with it they'll start to make sense.
* **One step at a time.**  We'll go as slowly as we need.  Speed is the enemy, it leads to mistakes.
* **Doing is learning.**  We'll set you up to teach yourself.  If you're stuck, either **ask for help** or practice your **Google fu** and find the answer with Google.

**Prelaunch checklist**

Install Anaconda

* Google "anaconda download"
* Download installer for **Python 3.5**
* Run installer

Locate this file in a browser

* Google "nyu data bootcamp" and follow links
* Or:  type in url at the top

Save today's code file in a handy place

* Create directory/folder \verb|Data_Bootcamp|
* Click on code link above, then Raw button
* Save file in `Data_Bootcamp` directory

Launch

* Look for **Launcher** in your programs
* Start it up (takes a minute)
* Click on **Spyder** (another minute)


\input{../LaTeX/footer.tex}

\end{document}

