Skip to content

Commit

Permalink
Merge pull request #188 from tracykteal/gh-pages
Browse files Browse the repository at this point in the history
updated index and setup
  • Loading branch information
tracykteal authored May 1, 2017
2 parents 0748d36 + c312557 commit 1bccfe3
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 97 deletions.
4 changes: 2 additions & 2 deletions assets/js/lesson.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $("table").addClass("table table-striped");


// Handle foldable challenges and solutions (on click and at start).
$(".challenge,.discussion,.solution").click(function(event) {
$(".solution").click(function(event) {
var trigger = $(event.target).has(".fold-unfold").size() > 0
|| $(event.target).filter(".fold-unfold").size() > 0;
if (trigger) {
Expand All @@ -12,7 +12,7 @@ $(".challenge,.discussion,.solution").click(function(event) {
event.stopPropagation();
}
});
$(".challenge,.discussion,.solution").each(function() {
$(".solution").each(function() {
$(">*:not(h2)", this).toggle();
var h2 = $("h2:first", this);
h2.append("<span class='fold-unfold glyphicon glyphicon-collapse-down'></span>");
Expand Down
108 changes: 24 additions & 84 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,95 +2,35 @@
layout: lesson
root: .

contributors:
- April Wright
- Ethan White
- John Gosset
- Leah Wasser
- Mariela Perignon
- Tracy Teal

maintainers:
- April Wright
- John Gosset
- Mateusz Kuzak

software: Python
---

**Content Contributors:** {{ page.contributors | join: ', ' }}

**Lesson Maintainers:** {{ page.maintainers | join: ', ' }}

Data Carpentry's aim is to teach researchers basic concepts, skills, and tools
for working with data so that they can get more done in less time, and with less
pain. The lessons below were designed for those interested in working with
ecological data in Python.


## Lessons

- [Short Introduction to Python](00-short-introduction-to-Python)
- [Starting With Data](01-starting-with-data)
- [Index Slice Subset](02-index-slice-subset)
- [Data Types and Format](03-data-types-and-format)
- [Merging Data](04-merging-data)
- [Data Analysis Automation: Loops and Functions](05-loops-and-functions)
- [Plotting with ggplot](06-visualization-ggplot-python)
- [Putting It All Together](07-putting-it-all-together)
- [Accessing SQL using Python](08-working-with-sql)


## Data

Data for this lesson is from the Portal Project Teaching Database -
[available on FigShare](https://figshare.com/articles/Portal_Project_Teaching_Database/1314459).

Specifically, the data files we use in these lessons are:

- [surveys.csv](https://ndownloader.figshare.com/files/2292172)
- [species.csv](https://ndownloader.figshare.com/files/3299483)


## Requirements

Data Carpentry's teaching is hands-on, so participants are encouraged to use
their own computers to insure the proper setup of tools for an efficient workflow.
*These lessons assume no prior knowledge of the skills or tools*, but working
through this lesson requires working copies of the software described below.
To most effectively use these materials, please make sure to install everything
*before* working through this lesson.

Participants are required to abide by Data Carpentry's
[Code of Conduct](http://www.datacarpentry.org/code-of-conduct/).


{% if page.software == "Python" %}
{% include pythonSetup.html %}
{% elsif page.software == "Spreadsheets" %}
{% include spreadsheetSetup.html %}
{% elsif page.software == "R" %}
{% include rSetup.html %}
{% else %}
{% include anySetup.html %}
{% endif %}


## Acknowledgements & Support

Data Carpentry is supported by the [Gordon and Betty Moore Foundation] and a
partnership of several NSF-funded [BIO] Centers ([NESCent], [iPlant], [iDigBio],
[BEACON] and [SESYNC]) and [Software Carpentry], and is sponsored by the [Data
Observation Network for Earth] (DataONE). The structure and objectives of the
curriculum as well as the teaching style are informed by [Software Carpentry].


[Gordon and Betty Moore Foundation]: https://www.moore.org
[BIO]: https://www.nsf.gov/dir/index.jsp?org=BIO
[NESCent]: https://nescent.org
[iPlant]: http://www.iplantcollaborative.org
[iDigBio]: https://www.idigbio.org
[BEACON]: http://beacon-center.org
[SESYNC]: https://sesync.org
[Software Carpentry]: https://software-carpentry.org
[Data Observation Network for Earth]: https://www.dataone.org
Python is a general purpose programming language that is useful for writing scripts to work effectively and reproducibly with data.

This is an introduction to Python designed for participants with no programming experience. These lessons can be taught in a day (~ 6 hours). They start with some basic information about Python syntax, the Jupyter notebook interface, and move through how to import CSV files, using the pandas package to work with data frames, how to calculate summary information from a data frame, and a brief introduction to plotting. The last lesson demonstrates how to work with databases directly from Python.

> ## Getting Started
>
> Data Carpentry's teaching is hands-on, so participants are encouraged to use
> their own computers to insure the proper setup of tools for an efficient
> workflow. <br>**These lessons assume no prior knowledge of the skills or tools.**
>
> To get started, follow the directions in the "[Setup](setup/)" tab to
> download data to your computer and follow any installation instructions.
>
> #### Prerequisites
>
> This lesson requires a working copy of **Python**.
> <br>To most effectively use these materials, please make sure to install
> everything *before* working through this lesson.
{: .prereq}

> ## For Instructors
> If you are teaching this lesson in a workshop, please see the
> [Instructor notes](guide/).
{: .prereq}
34 changes: 23 additions & 11 deletions setup.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
---
layout: page
title: Setup Instructions for Learners
title: Setup
permalink: /setup/
---

# Python
> ## Data
{: .prereq}
Data for this lesson is from the Portal Project Teaching Database -
[available on FigShare](https://figshare.com/articles/Portal_Project_Teaching_Database/1314459).

For this lesson, we will use two files for the data. Download these files to your computer. Once you click on them they will be automatically downloaded to your default download directory.

- [surveys.csv](https://ndownloader.figshare.com/files/2292172)
- [species.csv](https://ndownloader.figshare.com/files/3299483)



> ## Software
{: .prereq}
[Python](http://python.org) is a popular language for
scientific computing, and great for general-purpose programming as
well. Installing all of its scientific packages individually can be
Expand Down Expand Up @@ -80,7 +92,7 @@ wish to use a different browser, open this link: <http://localhost:8888>.

## Overview of the Jupyter notebook (Optional)

![Example Jupyter Notebook](./fig/00_0_jupyter_notebook_example.jpg)
![Example Jupyter Notebook](../fig/00_0_jupyter_notebook_example.jpg)
*Screenshot of a [Jupyter Notebook on quantum mechanics](https://github.com/jrjohansson/qutip-lectures) by Robert Johansson*

### How the Jupyter notebook works
Expand All @@ -93,26 +105,26 @@ After typing the command `jupyter notebook`, the following happens:
* The Jupyter Notebook server opens the Jupyter notebook client, also known
as the notebook user interface, in your default web browser.

![Jupyter notebook file browser](./fig/00_1_jupyter_file_browser.png)
![Jupyter notebook file browser](../fig/00_1_jupyter_file_browser.png)
*The Jupyter notebook file browser*

* To create a new Python notebook select the "New" dropdown on the upper
right of the screen.

![Jupyter notebook file browser](./fig/00_2_jupyter_new_notebook.png)
![Jupyter notebook file browser](../fig/00_2_jupyter_new_notebook.png)
*The Jupyter notebook file browser*

* When you can create a new notebook and type code into the browser, the web
browser and the Jupyter notebook server communicate with each other.

![new Jupyter notebook](./fig/00_3_jupyter_blank_notebook.png)
![new Jupyter notebook](../fig/00_3_jupyter_blank_notebook.png)
*A new, blank Jupyter notebook*

* Under the "help" menu, take a quick interactive tour of how to
use the notebook. Help on Jupyter and key workshop packages is
available here too.

![Jupyter tour and help](./fig/00_4_jupyter_tour_help.png)
![Jupyter tour and help](../fig/00_4_jupyter_tour_help.png)
*User interface tour and Help*

* The Jupyter Notebook server does the work and calculations, and the web
Expand All @@ -121,26 +133,26 @@ After typing the command `jupyter notebook`, the following happens:

* For example, click in the first cell and type some Python code.

![Code cell](./fig/00_5_jupyter_code_before.png)
![Code cell](../fig/00_5_jupyter_code_before.png)
*A Code cell*

* This is a **Code** cell (see the cell type dropdown with the word **Code**).
To run the cell, type Shift-Enter.

![Code cell and its output](./fig/00_6_jupyter_code_after.png)
![Code cell and its output](../fig/00_6_jupyter_code_after.png)
*A Code cell and its output*

* Let's look at a **Markdown** cell. Markdown is a text manipulation
language that is readable yet offers additional formatting. Don't forget
to select **Markdown** from the cell type dropdown. Click in the cell and
enter the markdown text.

![markdown input cell](./fig/00_7_jupyter_markdown_before.png)
![markdown input cell](../fig/00_7_jupyter_markdown_before.png)
*A markdown input cell*

* To run the cell, type Shift-Enter.

![rendered markdown cell](./fig/00_8_jupyter_markdown_after.png)
![rendered markdown cell](../fig/00_8_jupyter_markdown_after.png)
*A rendered markdown cell*


Expand Down

0 comments on commit 1bccfe3

Please sign in to comment.