{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Activity 1 - Python Primer" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [], "source": [ "# First let's import some key data attributes\n", "\n", "!pip install numpy pandas matplotlib seaborn\n", "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To begin - let's show a very quick example of generating some dataset and plotting this. Do not worry if you do not understand the commands being used - you will do soon. For now, this is just to show how quickly we can generate this using Python." ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [], "source": [ "a = np.random.normal(1.0, 0.3, [1000,1000])\n", "b = np.random.normal(1.8, 0.2, [100,100])" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 29, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO2df5AU53nnv8/M9sIs8jFgcWUxAknno1BMBKzBkhJSdZZUEZaI0BaywbJyOefiqC5nxxHWbYQSn0Aq17EOZUvxxYlLjl2Oy7a8WOANsqRCOaO7RLikePEuECxR1m8YdGdkWBSxAzu7+94fM73b0/O+b7/9c3p6nk+VSuxMT/c73T3P+/Tzfp/nISEEGIZhmPYn1+oBMAzDMNHABp1hGCYjsEFnGIbJCGzQGYZhMgIbdIZhmIzQ1aoDX3rppeLKK69s1eEZhmHakkOHDr0thFgke69lBv3KK6/E8PBwqw7PMAzTlhDRG6r3OOTCMAyTEdigMwzDZAQ26AzDMBmBDTrDMExGYIPOMAyTEdigMwzDZAQ26AzDMBmBDTrDMEx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UfrO/au2o4qP+Xb8B4EUhxJcVm/H9oaCr1QPoBIQQk0T0GQD7AeQBfFMIcYyIHgIwLITYB+CzRLQRtVX+MwA+2bIBxwwRPQbgwwAuJaKTALYDsABACPE1AE8BuBXAywDGAfx+a0YaPwbn4qMA/oiIJgFUAHxcZDu9ex2A/wjgKBGN1l/7MwBLgc67P/zCqf8MwzAZgUMuDMMwGYENOsMwTEZgg84wDJMR2KAzDMNkBDboDMMwGYENOsMwTEZgg84wDJMR/j/PPHfJI/qPQwAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "plt.scatter(a[0], a[1])\n", "plt.scatter(b[0], b[1])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Basic Operations in Python" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [], "source": [ "number = 1\n", "text = 'hello_everyone'\n", "l = [1,2,3,4,5]\n", "d = {'name':'bob', 'value':100}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Basic variables in Python include **numerical values** (integers, floats, doubles, etc.) and **string values** (text). Basic data structures include **lists** and **dictionaries**.\n", "\n", "- Lists are essentially like arrays. We can create a dynamic group of (mixed) variables. We can append and remove from this list, and we can access elements from the list.\n", "- Dictionaries are like objects. We can create name-value pairs to reference attributes that make up an object (e.g., properties of a car).\n", "- We can create lists of dictionaries, and we can have lists within dictionaries. We can also have a list of lists (nested lists), and we can have dictionaries as values in a dictionary." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Let's walk through some Python examples\n", "\n", "First let's look at some basics of Python and get use to manipulating data using the built in variable types." ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [], "source": [ "# First some simple variables\n", "\n", "an_integer = 12\n", "a_floating_point_number = 18.4732" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "30.4732" ] }, "execution_count": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# We can do some simple maths on these variables and see the output\n", "\n", "an_integer + a_floating_point_number" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "221.67839999999998" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# We can also write functions to do simple maths\n", "\n", "def multiply(number1, number2):\n", " return number1 * number2\n", "\n", "multiply(an_integer, a_floating_point_number)" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Hello there!\n" ] } ], "source": [ "# We can also create text variables just as easily\n", "\n", "a_string = 'Hello there!'\n", "print (a_string)" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Hello there! My name is Phil\n", "Hello there! My name is Dave\n" ] } ], "source": [ "# We can do some simple manipulation of text\n", "\n", "my_name = 'Phil'\n", "message = a_string + ' My name is ' + my_name\n", "print (message)\n", "\n", "# Including spliting sentences to corrupt a message\n", "imposter_name = 'Dave'\n", "s_m = message.split(\" \")\n", "new_message = ' '.join(s_m[:-1]) + ' ' + imposter_name\n", "print (new_message)" ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['apple', 'banana', 'orange', 'lemon']\n", "['apple', 'banana']\n", "['apple', 'banana', 'orange']\n", "['apple', 'banana', 'orange', 'lemon', 'mango']\n", "['apple', 'orange', 'lemon', 'mango']\n" ] } ], "source": [ "# We also have lists of data that can sort variables\n", "fruits = ['apple','banana','orange','lemon']\n", "print (fruits)\n", "# We can access sets of variables using indexes\n", "print (fruits[0:2])\n", "print (fruits[:-1])\n", "# We can append items to the list, and remove items from the list\n", "fruits.append('mango')\n", "print (fruits)\n", "fruits.remove('banana')\n", "print (fruits)" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'name': 'bob', 'age': 23, 'height': 185, 'email': 'bob@bobmail.com'}\n" ] } ], "source": [ "# We can also create dictionary objects \n", "# This is helpful for storing related variables about an object\n", "\n", "person = {}\n", "person['name'] = 'bob'\n", "person['age'] = 23\n", "person['height'] = 185\n", "person['email'] = 'bob@bobmail.com'\n", "print (person)" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[{'name': 'bob', 'age': 23, 'height': 177, 'email': 'bob@bobmail.com'}, {'name': 'john', 'age': 41, 'height': 185, 'email': 'john@johnmail.com'}, {'name': 'sophie', 'age': 31, 'height': 157, 'email': 'sophie@sophiemail.com'}, {'name': 'wendy', 'age': 19, 'height': 174, 'email': 'wendy@wendymail.com'}]\n" ] } ], "source": [ "# Like earlier, we could use a function to create 'person' objects\n", "people = []\n", "\n", "def create_person(name, age, height, email):\n", " global people\n", " new_person = {'name':name,\n", " 'age':age,\n", " 'height':height,\n", " 'email':email}\n", " people.append(new_person)\n", "\n", "create_person('bob', 23, 177, 'bob@bobmail.com')\n", "create_person('john', 41, 185, 'john@johnmail.com')\n", "create_person('sophie', 31, 157, 'sophie@sophiemail.com')\n", "create_person('wendy', 19, 174, 'wendy@wendymail.com')\n", "\n", "\n", "# Here we store our person objects in our people list\n", "# to make a group of 'persons' - a.k.a. people!\n", "print (people)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Introducing data science libraries\n", "\n", "We have covered a lot very quickly here. You've now already used the main built in variables of Python, that allow you to store numerical and text data, and the data structures such as lists (which are essentially arrays), and dictionaries (which are essentially objects). Let's now explore this deeper by introducing some of the data science libraries." ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [], "source": [ "# We can import libraries using the following\n", "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": 41, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
nameageheightemail
0bob23177bob@bobmail.com
1john41185john@johnmail.com
2sophie31157sophie@sophiemail.com
3wendy19174wendy@wendymail.com
\n", "
" ], "text/plain": [ " name age height email\n", "0 bob 23 177 bob@bobmail.com\n", "1 john 41 185 john@johnmail.com\n", "2 sophie 31 157 sophie@sophiemail.com\n", "3 wendy 19 174 wendy@wendymail.com" ] }, "execution_count": 41, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Our people dictionary is difficult for us to read clearly\n", "# Pandas DataFrames help manipulate tabular data like this very easily\n", "\n", "data = pd.DataFrame(people)\n", "data" ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0 23\n", "1 41\n", "2 31\n", "3 19\n", "Name: age, dtype: int64" ] }, "execution_count": 42, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# We can access individual columns of the data now\n", "data['age']" ] }, { "cell_type": "code", "execution_count": 43, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
nameageheightemail
1john41185john@johnmail.com
\n", "
" ], "text/plain": [ " name age height email\n", "1 john 41 185 john@johnmail.com" ] }, "execution_count": 43, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Who is the tallest of the users? Let's find out\n", "data[data['height'] == np.max(data['height'])]" ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
nameageheightemail
2sophie31157sophie@sophiemail.com
\n", "
" ], "text/plain": [ " name age height email\n", "2 sophie 31 157 sophie@sophiemail.com" ] }, "execution_count": 44, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Who is the shortest of the users? Let's find out\n", "data[data['height'] == np.min(data['height'])]" ] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3df3Rc5X3n8ffXkqzf0lg/bEuWbMlgDLaxZCwIkJC4gXUckmBnUxJITkJoF5dN003TPe1Stm3S5LTl7CbbkyxnQ82BANmUkJQSEwJtQ9JANsEEGf8C24AB25Il27JsybL1wxrNs3/cK2kkjayRRtLMXH1e58yZmXvvzDzXI3/mme997jPmnENERIJlXrIbICIi00/hLiISQAp3EZEAUriLiASQwl1EJIAyk90AgLKyMldTU5PsZoiIpJWdO3eecs6Vx1qXEuFeU1NDY2NjspshIpJWzOzIeOtUlhERCSCFu4hIACncRUQCSOEuIhJACncRkQBSuIuIBJDCXUQkgFJinLukscgAdLfDuRP+5aR3nV8OK2+GvJJkt1BkTlK4y1jOQd/Z4aCODu3Ry863gYvEfh7LgNr3w+otcPlHIb9sdvdDZA5TuM8l4T4/nGOF9omRy8K9Yx8/LxMKFkHBQihaApXr/Pv+sujrU2/B/u2w/8fwky/BM1+GmvfBqs1w+cegcNHs77/IHGKp8EtMDQ0NTtMPTFEkErssEivAeztiP0deaeyAHn07JwTzJnmYxjk48ZoX9K//GNrfAgyWXe8F/RUfg6LKhP8ZROYiM9vpnGuIuU7hnoKcgwvnhkO56/gEZZGBsc+RlTccyoUxgnrwdn45ZGTN3n61HfR79Nvh5H5vefW1XtCvugWKq2anLSIBoHBPFeELcH50SI9T1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lxxbkv/8XMbgHCePvy+aQ1+CLM7HG80QplZtYMfAXvQBHOuQeAZ/FGZhwCuoE7k9PSicWxL78L/GczCwM9wG0p2nl4L/BZYJ9f3wW4F1gKafe+xLMv6fK+VACPmlkG3gfQD51zz8xkhmn6ARGRAEqXsoyIiEyCwl1EJIAU7iIiAaRwFxEJIIW7iEgAKdxFRAJI4S4iEkD/HwN18iStD8ZUAAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# What if we want to plot this data quickly?\n", "data.plot()\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# What next?\n", "\n", "Spend some time researching into Pandas, Matplotlib, and Numpy - these are core to manipulating numerical and tabular data, and then being able to visualize the results. There are many great examples online of getting started with these libraries.\n", "E.g., (Free e-book 'A Whirlwind Tour of Python': http://www.oreilly.com/programming/free/a-whirlwind-tour-of-python.csp)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.7" } }, "nbformat": 4, "nbformat_minor": 4 }