Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 88 additions & 24 deletions 00-Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Introduction"
"## Introduction\n",
"\n",
"## Introduccion\n"
]
},
{
Expand All @@ -14,7 +16,10 @@
"<div class=\"alert alert-success\">\n",
"Welcome to the Voytek Lab GitHub and Jupyter notebook collection.\n",
"This is the first Jupyter notebook in a tutorial series that discusses the main topics involved with the projects being done in Voytek lab. We will walk through many of the concepts and calculations that are used in our lab.\n",
"</div>"
"\n",
"Bienvenido a la coleccion de GitHub y cuadernos de Jupyter del Voytek Lab.\n",
"Este es el primer cuaderno de Jupyter de una serie de tutoriales que presenta los temas principales involucrados en los proyectos que se realizan en el Voytek Lab. Vamos a recorrer muchos de los conceptos y calculos que se usan en nuestro laboratorio.\n",
"</div>\n"
]
},
{
Expand All @@ -23,8 +28,10 @@
"source": [
"Knowledge in python is ***strongly*** recommended to help understand these tutorials and to help you preform these procedures, although it is not strictly necessary. Here are a couple of links that cover Python basics, from installation to more complex topics. These are resources and tutorials from two classes the lab has developed here at UC San Diego for the [Department of Cognitive Science](http://www.cogsci.ucsd.edu/) and the [Halıcıoğlu Data Science Institute](http://datascience.ucsd.edu/) and undergraduate Data Science major.<br>\n",
"\n",
"Se ***recomienda mucho*** tener conocimientos de Python para ayudar a entender estos tutoriales y para ayudarte a realizar estos procedimientos, aunque no es estrictamente necesario. Aqui hay un par de enlaces que cubren los fundamentos de Python, desde la instalacion hasta temas mas complejos. Estos son recursos y tutoriales de dos cursos que el laboratorio ha desarrollado aqui en UC San Diego para el [Department of Cognitive Science](http://www.cogsci.ucsd.edu/) y el [Halıcıoğlu Data Science Institute](http://datascience.ucsd.edu/), asi como para la licenciatura en Ciencia de Datos.<br>\n",
"\n",
"- [COGS 18: Introduction to Python](https://cogs18.github.io/intro/)<br>\n",
"- [COGS 108: Data Science in Practice](https://cogs108.github.io/Tutorials/00-Introduction)<br>"
"- [COGS 108: Data Science in Practice](https://cogs108.github.io/Tutorials/00-Introduction)<br>\n"
]
},
{
Expand All @@ -36,14 +43,23 @@
"- Introduce you to Jupyter Notebook.\n",
"- Learn how to run Notebook cells.\n",
"- Install relevant Python packages.\n",
"- Load your data into a Jupyter Notebook."
"- Load your data into a Jupyter Notebook.\n",
"\n",
"El proposito de _este_ cuaderno es:\n",
"\n",
"- Presentarte Jupyter Notebook.\n",
"- Aprender a ejecutar celdas del cuaderno.\n",
"- Instalar paquetes de Python relevantes.\n",
"- Cargar tus datos en un cuaderno de Jupyter.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This notebook will be a brief introduction and we encourage you to explore these tools further. "
"This notebook will be a brief introduction and we encourage you to explore these tools further. \n",
"\n",
"Este cuaderno sera una introduccion breve y te animamos a explorar estas herramientas mas a fondo.\n"
]
},
{
Expand All @@ -57,7 +73,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Setting up Jupyter Notebooks"
"### Setting up Jupyter Notebooks\n",
"\n",
"### Configuracion de Jupyter Notebooks\n"
]
},
{
Expand All @@ -66,7 +84,9 @@
"source": [
"<div class=\"alert alert-success\">\n",
"Jupyter Notebooks are an easy way to develop algorithms through which we can process our data. It lets us write, run, and present code and results in an approachable format.\n",
"</div>"
"\n",
"Los cuadernos de Jupyter son una forma sencilla de desarrollar algoritmos con los que podemos procesar nuestros datos. Nos permiten escribir, ejecutar y presentar codigo y resultados en un formato accesible.\n",
"</div>\n"
]
},
{
Expand All @@ -77,23 +97,37 @@
"\n",
"Below are the two recommended ways to consume these tutorials. If you think you will be using Jupyter in the future, we recommend following the first option. Otherwise if you just want to take a look at these tutorials and never return to Jupyter, you should probably use the second option, which will lead you to a cloud-based environment that allows you to run these tutorial notebooks without installing anything on your system.<br><br>\n",
"\n",
"Anaconda es una distribucion de Python que gestiona paquetes y entornos de Python. Los cuadernos de Jupyter vienen incluidos con Anaconda, pero son aplicaciones separadas.\n",
"\n",
"A continuacion se muestran las dos formas recomendadas de seguir estos tutoriales. Si crees que vas a usar Jupyter en el futuro, te recomendamos seguir la primera opcion. En cambio, si solo quieres revisar estos tutoriales y no volver a usar Jupyter, probablemente deberias usar la segunda opcion, que te llevara a un entorno en la nube que permite ejecutar estos cuadernos tutoriales sin instalar nada en tu sistema.<br><br>\n",
"\n",
"#### Follow along using Git\n",
"\n",
"#### Sigue el tutorial usando Git\n",
"\n",
"<img src=\"./img/github_logo.png\" height=\"150\" width=\"150\">\n",
"\n",
"- Download Anaconda [here](https://store.continuum.io/cshop/anaconda/).\n",
"- Descarga Anaconda [aqui](https://store.continuum.io/cshop/anaconda/).\n",
"\n",
"- Clone this [repository](https://github.com/voytekresearch/tutorials) by using git clone.\n",
"- Clona este [repositorio](https://github.com/voytekresearch/tutorials) usando git clone.\n",
"\n",
"- Run the 'Anaconda Navigator' GUI from first bullet point and launch this Jupyter notebook.\n",
"- Ejecuta la interfaz grafica de 'Anaconda Navigator' del primer punto y abre este cuaderno de Jupyter.\n",
"\n",
"- Navigate to where you cloned the GitHub repository and click on the _.ipynb_ file you want to run.<br><br>\n",
"- Ve a la ubicacion donde clonaste el repositorio de GitHub y haz clic en el archivo _.ipynb_ que quieras ejecutar.<br><br>\n",
"\n",
"#### Follow along using Binder\n",
"\n",
"#### Sigue el tutorial usando Binder\n",
"\n",
"<img src=\"./img/binder_logo.png\" height=\"100\" width=\"100\">\n",
"\n",
"Alternatively, if you don't want to install anything open this [Binder link](https://mybinder.org/v2/gh/voytekresearch/tutorials/master). You can consume 100% of these tutorials this way without installing anything on your local machine."
"Alternatively, if you don't want to install anything open this [Binder link](https://mybinder.org/v2/gh/voytekresearch/tutorials/master). You can consume 100% of these tutorials this way without installing anything on your local machine.\n",
"\n",
"Como alternativa, si no quieres instalar nada, abre este [enlace de Binder](https://mybinder.org/v2/gh/voytekresearch/tutorials/master). Puedes seguir el 100% de estos tutoriales de esta manera sin instalar nada en tu maquina local.\n"
]
},
{
Expand All @@ -102,15 +136,20 @@
"source": [
"<div class=\"alert alert-info\">\n",
"If you are unfamiliar with Jupyter Notebooks, follow the above links for COGS 18 and COGS 108.\n",
"\n",
"Si no estas familiarizado con los cuadernos de Jupyter, sigue los enlaces anteriores de COGS 18 y COGS 108.\n",
"</div>\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Modules"
"## Modules\n",
"\n",
"## Modulos\n"
]
},
{
Expand All @@ -119,7 +158,9 @@
"source": [
"<div class=\"alert alert-success\">\n",
"In this section we will discuss the Python modules used most often in Voytek lab, and show you how to install them.\n",
"</div>"
"\n",
"En esta seccion hablaremos de los modulos de Python que se usan con mayor frecuencia en el Voytek Lab y te mostraremos como instalarlos.\n",
"</div>\n"
]
},
{
Expand All @@ -129,10 +170,17 @@
"#### Installing modules using Anaconda\n",
"If you are using Anaconda, you will be able to install many modules by opening 'Anaconda Prompt' and running the command: <code>pip install <*module name*></code>\n",
"\n",
"#### Instalacion de modulos usando Anaconda\n",
"Si estas usando Anaconda, podras instalar muchos modulos abriendo 'Anaconda Prompt' y ejecutando el comando: <code>pip install <*nombre del modulo*></code>\n",
"\n",
"\n",
"For example:<br><br>\n",
"<code>$pip install pandas</code><br><br>\n",
"_pip_ is a package installation tool. On the other hand if you are using Binder to follow along then everything should be set up already."
"_pip_ is a package installation tool. On the other hand if you are using Binder to follow along then everything should be set up already.\n",
"\n",
"Por ejemplo:<br><br>\n",
"<code>$pip install pandas</code><br><br>\n",
"_pip_ es una herramienta para instalar paquetes. Por otro lado, si estas siguiendo el tutorial con Binder, entonces todo ya deberia estar configurado.\n"
]
},
{
Expand All @@ -142,27 +190,32 @@
"outputs": [],
"source": [
"# this sets up the notebook to allow inline plotting of higher-resolution plots\n",
"# esto configura el cuaderno para permitir graficas en linea de mayor resolucion\n",
"%matplotlib inline\n",
"%config InlineBackend.figure_format = 'retina' \n",
"\n",
"# here are some common modules used in Voytek lab:\n",
"import numpy as np # package for scientific computing in python\n",
"import scipy as sp # package of scientific data functions\n",
"import pandas as pd # package of data analysis functions\n",
"import sklearn as skl # package for data mining and machine learning\n",
"# aqui hay algunos modulos comunes usados en el Voytek Lab:\n",
"import numpy as np # package for scientific computing in python / paquete para computacion cientifica en Python\n",
"import scipy as sp # package of scientific data functions / paquete de funciones para datos cientificos\n",
"import pandas as pd # package of data analysis functions / paquete de funciones de analisis de datos\n",
"import sklearn as skl # package for data mining and machine learning / paquete para mineria de datos y aprendizaje automatico\n",
"\n",
"import matplotlib.pyplot as plt # functions to plot data\n",
"import matplotlib.pyplot as plt # functions to plot data / funciones para graficar datos\n",
"\n",
"# here are some plotting set-ups\n",
"# aqui hay algunas configuraciones para las graficas\n",
"from matplotlib import rcParams\n",
"rcParams['figure.figsize'] = 16, 4"
"rcParams['figure.figsize'] = 16, 4\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Importing Data"
"### Importing Data\n",
"\n",
"### Importacion de Datos\n"
]
},
{
Expand All @@ -172,7 +225,12 @@
"Let's start by loading some electrophysiology data. To do that, we need to tell python where to get the data from and tell it to save it as a variable.<br><br>\n",
"'emodat.npy' is data from one channel of an [ECoG recording](https://en.wikipedia.org/wiki/Electrocorticography) from a participant looking at faces displaying various emotions. \n",
"\n",
"We'll use this data in several of the tutorials. It should be saved at './dat/emodat.npy'"
"We'll use this data in several of the tutorials. It should be saved at './dat/emodat.npy'\n",
"\n",
"Comencemos cargando algunos datos de electrofisiologia. Para hacerlo, necesitamos indicarle a Python de donde obtener los datos y decirle que los guarde como una variable.<br><br>\n",
"'emodat.npy' contiene datos de un canal de un [registro ECoG](https://en.wikipedia.org/wiki/Electrocorticography) de una persona participante que observaba rostros mostrando varias emociones. \n",
"\n",
"Usaremos estos datos en varios de los tutoriales. Deberian estar guardados en './dat/emodat.npy'\n"
]
},
{
Expand All @@ -184,17 +242,21 @@
"outputs": [],
"source": [
"# The name of the data file to load\n",
"# El nombre del archivo de datos que se va a cargar\n",
"filename = \"./dat/emodat.npy\"\n",
"\n",
"# Loading data\n",
"data = np.load(filename)"
"# Cargando los datos\n",
"data = np.load(filename)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's use our plotting library to plot some of the data."
"Let's use our plotting library to plot some of the data.\n",
"\n",
"Usemos nuestra biblioteca de graficacion para visualizar una parte de los datos.\n"
]
},
{
Expand All @@ -219,15 +281,17 @@
}
],
"source": [
"plt.plot(data[0:1000]) #this is what about 1 second of ECoG data looks like\n",
"plt.show()"
"plt.plot(data[0:1000]) #this is what about 1 second of ECoG data looks like / esto es aproximadamente como se ve 1 segundo de datos de ECoG\n",
"plt.show()\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Alright, that's all we're going to talk about here! Good luck with Jupyter Notebook and the rest of the tutorials."
"Alright, that's all we're going to talk about here! Good luck with Jupyter Notebook and the rest of the tutorials.\n",
"\n",
"Muy bien, eso es todo lo que vamos a ver aqui. Buena suerte con Jupyter Notebook y con el resto de los tutoriales.\n"
]
},
{
Expand Down
Loading