Skip to content

Commit

Permalink
big sweep of cleans & updates
Browse files Browse the repository at this point in the history
  • Loading branch information
TomDonoghue committed Jun 26, 2020
1 parent 6428f0f commit 905709a
Show file tree
Hide file tree
Showing 20 changed files with 2,454 additions and 1,863 deletions.
147 changes: 96 additions & 51 deletions 00-Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,36 @@
}
},
"source": [
"# Data Science in Practice\n",
"# Introduction\n",
"\n",
"Welcome to the hands on materials for the Data Science in Practice class.\n",
"Welcome to the hands on materials for Data Science in Practice.\n",
"\n",
"This notebook will guide through getting the tools you will need for working with these tutorials and assignments."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Alerts"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Throughout these tutorials, you will see colored 'alert' text:\n",
"\n",
"<div class=\"alert alert-success\">\n",
"Green alerts provide key information and definitions.\n",
"</div>\n",
"\n",
"<div class=\"alert alert-info\">\n",
"Blue alerts provide links out to further \n",
"<a href=https://google.com class=alert-link>resources</a>. \n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand All @@ -28,9 +51,11 @@
"\n",
"### Software\n",
"\n",
"- Working install of python3.6, with the anaconda distribution ([datahub](http://datahub.ucsd.edu) satisfies this requirement)\n",
"- Jupyter Notebooks ([datahub](http://datahub.ucsd.edu) satisfies this requirement)\n",
"- git/GitHub"
"- Working install of Python (>= 3.6), with the anaconda distribution\n",
" - If you are in the official class, [datahub](http://datahub.ucsd.edu) satisfies this requirement\n",
"- Jupyter Notebooks\n",
" - Also satisfied by [datahub](http://datahub.ucsd.edu)\n",
"- git and a GitHub account"
]
},
{
Expand All @@ -39,19 +64,37 @@
"source": [
"### Prerequisites\n",
"\n",
"This class, and this series of tutorials, presumes that you already have some basic knowledge of programming.\n",
"These tutorials presume that you do already have some basic knowledge of programming. \n",
"\n",
"In particular it assumes some knowledge Python, covering the standard library. \n",
"\n",
"If you are somewhat unfamiliar with Python, you can follow the links in the Python notebook to catch up. \n",
"In particular, it assumes knowledge of the Python programming language and standard library. \n",
"\n",
"If you are somewhat unfamiliar with Python, you can follow the links in the Python notebook to catch up."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Computational Resources\n",
"\n",
"The examples throughout these tutorials, and in the assignments are not computationally heavy. \n",
"\n",
"You should be able to run all these materials on any computer you have access to, assuming it will run the aforementioned tools. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Installing Python\n",
"\n",
"- If you are running code locally, we recommend you install a new version of Python with Anaconda, as described below\n",
" - If you are in the official course, you can use [datahub](http://datahub.ucsd.edu) for everything you need\n",
"- If you are on Mac, you have a native installation of python. This native installation of Python may be older, will not include the extra packages that you will need for this class, and is best left untouched. \n",
" - Downloading Anaconda will install a separate, independent install of Python, leaving your native install untouched. \n",
"- Windows does not require Python natively and so it is not typically pre-installed."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -65,90 +108,87 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=https://raw.githubusercontent.com/COGS108/Tutorials/master/img/jupyter.png width=250px>"
"<img src=https://raw.githubusercontent.com/COGS108/Tutorials/master/img/anaconda.png width=350px>"
]
},
{
"cell_type": "markdown",
"metadata": {
"nbpresent": {
"id": "0f4dd046-4020-465c-85f6-3d92ac9fe145"
}
},
"metadata": {},
"source": [
"<div class=\"alert alert-success\">\n",
"Jupyter notebooks are a way to intermix code, outputs and plain text. \n",
"They run in a web browser, and connect to a kernel to be able to execute code. \n",
"Anaconda is an open-source distribution of Python, designed for scientific computing, data science and machine learning. \n",
"</div>\n",
"\n",
"<div class=\"alert alert-info\">\n",
"The official Jupyter website is available \n",
"<a href=\"http://jupyter.org\" class=\"alert-link\">here</a>.\n",
"</div>\n",
"\n",
"<hr>"
"The anaconda website is \n",
"<a href=\"https://www.anaconda.com\" class=\"alert-link\">here</a>,\n",
"with the download page\n",
"<a href=\"https://www.anaconda.com\" class=\"alert-link\">here</a>.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that you do not need to download Jupyter separately, as it comes packaged with anaconda, described below. "
"Anaconda itself is a distribution, meaning that is a version of Python with a collection of packages that are curated and maintained together. \n",
"\n",
"Using a pre-built distribution is useful, as it comes with the packages that you need for data science.\n",
"\n",
"Anaconda also comes with `conda`, which is a package manager, allowing you to download, install, and manage other packages. \n",
"\n",
"The anaconda distribution includes all packages that are needed for these tutorials."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=https://raw.githubusercontent.com/COGS108/Tutorials/master/img/anaconda.png width=350px>"
"<img src=https://raw.githubusercontent.com/COGS108/Tutorials/master/img/jupyter.png width=250px>"
]
},
{
"cell_type": "markdown",
"metadata": {
"nbpresent": {
"id": "a0fd64ab-0202-4900-8e6d-155c29c2e750"
"id": "0f4dd046-4020-465c-85f6-3d92ac9fe145"
}
},
"source": [
"<div class=\"alert alert-success\">\n",
"Anaconda is an open-source distribution of Python, designed for scientific computing, data science and machine learning. \n",
"Jupyter notebooks are a way to intermix code, outputs and plain text. \n",
"They run in a web browser, and connect to a kernel to be able to execute code. \n",
"</div>\n",
"\n",
"<div class=\"alert alert-info\">\n",
"The anaconda website is \n",
"<a href=\"https://www.anaconda.com\" class=\"alert-link\">here</a>,\n",
"with the download page\n",
"<a href=\"https://www.anaconda.com\" class=\"alert-link\">here</a>.\n",
"The official Jupyter website is available \n",
"<a href=\"http://jupyter.org\" class=\"alert-link\">here</a>.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Anaconda itself is a distribution, that is, a collection of packages that are curated and maintained together, and serve as powerful. \n",
"\n",
"Anaconda also comes with conda, which is a package manager, allowing you to download, install, and manage other packages. \n",
"\n",
"The anaconda distribution includes all packages that are required for these tutorials."
"Note that you do not need to download Jupyter separately, as it comes packaged with the Anaconda distribution."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Notes\n",
"-----\n",
"- If you are on Mac, you have a native installation of python. This native installation of Python may be older, will not include the extra packages that you will need for this class, and is best left untouched. \n",
" - Downloading anaconda will install a separate, independent install of Python, leaving your native install untouched. \n",
"- Windows does not require Python natively and so it is not typically pre-installed. \n",
"- If you want a local copy (which is a good idea going forward!), follow this tutorial step-by-step. Alternatively, you can use [datahub](http://datahub.ucsd.edu) for everything in this course."
"#### Checking Your Python Version\n",
"\n",
"You can check which installation of Python you are using, and which version it is.\n",
"\n",
"Once you have installed anaconda, you should see you are using Python in an anaconda folder. \n",
"\n",
"The version number that is printed should also be 3.6 or greater. "
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand All @@ -161,10 +201,8 @@
}
],
"source": [
"# You can check which python you are using, and what version it is.\n",
"# Once you have installed anaconda, you should see you are using Python in your anaconda folder\n",
"# Make sure that the version you have is 3.6 (or at least 3.X)\n",
"# Note: these are command-line functions that may not work on windows\n",
"# Check the installed version of Python\n",
"# Note: these are command-line functions that may not work on windows\n",
"!which python\n",
"!python --version"
]
Expand All @@ -185,7 +223,7 @@
},
"source": [
"<div class=\"alert alert-success\">\n",
"Git is a tool, a software package, for version control. Github is an online hosting service that can be used with git, and offers online tools to use git. \n",
"Git is a tool, a software package, for version control. \n",
"</div>\n",
"\n",
"<div class=\"alert alert-info\">\n",
Expand All @@ -206,6 +244,10 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-success\">\n",
"Github is an online hosting service that can be used with git, and offers online tools to use git. \n",
"</div>\n",
"\n",
"<div class=\"alert alert-info\">\n",
"Create an account on \n",
"<a href=\"https://github.com/\" class=\"alert-link\">Github</a>.\n",
Expand Down Expand Up @@ -293,17 +335,20 @@
"You do not need to use environments, however you may find it useful if you want or need to maintain multiple different versions of Python. \n",
"\n",
"If you want to use an environment, and already have conda, you can run this command from command line: <br>\n",
"$ conda create --name *envname* python=3.6 anaconda <br>\n",
"\n",
"``$ conda create --name *envname* python=3.7 anaconda`` <br>\n",
"\n",
"^ Replace '*envname*' with a name to call this environment.<br>\n",
"This will install a new environment, with Python 3.6 and the anaconda distribution.\n",
"\n",
"This will install a new environment, with Python 3.7 and the anaconda distribution.\n",
"\n",
"You will then need to activate this environment (everytime) you want to use it. \n",
"\n",
"To activate your environment: <br>\n",
"$ source activate *envname*\n",
"``$ conda activate *envname*``\n",
"\n",
"To deactivate your environment: <br>\n",
"$ source deactivate *envname*"
"``$ conda deactivate``"
]
}
],
Expand Down
Loading

0 comments on commit 905709a

Please sign in to comment.