Skip to content

Commit 1bccfe3

Browse files
authored
Merge pull request #188 from tracykteal/gh-pages
updated index and setup
2 parents 0748d36 + c312557 commit 1bccfe3

File tree

3 files changed

+49
-97
lines changed

3 files changed

+49
-97
lines changed

assets/js/lesson.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $("table").addClass("table table-striped");
33

44

55
// Handle foldable challenges and solutions (on click and at start).
6-
$(".challenge,.discussion,.solution").click(function(event) {
6+
$(".solution").click(function(event) {
77
var trigger = $(event.target).has(".fold-unfold").size() > 0
88
|| $(event.target).filter(".fold-unfold").size() > 0;
99
if (trigger) {
@@ -12,7 +12,7 @@ $(".challenge,.discussion,.solution").click(function(event) {
1212
event.stopPropagation();
1313
}
1414
});
15-
$(".challenge,.discussion,.solution").each(function() {
15+
$(".solution").each(function() {
1616
$(">*:not(h2)", this).toggle();
1717
var h2 = $("h2:first", this);
1818
h2.append("<span class='fold-unfold glyphicon glyphicon-collapse-down'></span>");

index.md

Lines changed: 24 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,35 @@
22
layout: lesson
33
root: .
44

5-
contributors:
6-
- April Wright
7-
- Ethan White
8-
- John Gosset
9-
- Leah Wasser
10-
- Mariela Perignon
11-
- Tracy Teal
12-
135
maintainers:
146
- April Wright
157
- John Gosset
168
- Mateusz Kuzak
17-
18-
software: Python
199
---
2010

21-
**Content Contributors:** {{ page.contributors | join: ', ' }}
22-
2311
**Lesson Maintainers:** {{ page.maintainers | join: ', ' }}
2412

25-
Data Carpentry's aim is to teach researchers basic concepts, skills, and tools
26-
for working with data so that they can get more done in less time, and with less
27-
pain. The lessons below were designed for those interested in working with
28-
ecological data in Python.
29-
30-
31-
## Lessons
32-
33-
- [Short Introduction to Python](00-short-introduction-to-Python)
34-
- [Starting With Data](01-starting-with-data)
35-
- [Index Slice Subset](02-index-slice-subset)
36-
- [Data Types and Format](03-data-types-and-format)
37-
- [Merging Data](04-merging-data)
38-
- [Data Analysis Automation: Loops and Functions](05-loops-and-functions)
39-
- [Plotting with ggplot](06-visualization-ggplot-python)
40-
- [Putting It All Together](07-putting-it-all-together)
41-
- [Accessing SQL using Python](08-working-with-sql)
42-
43-
44-
## Data
45-
46-
Data for this lesson is from the Portal Project Teaching Database -
47-
[available on FigShare](https://figshare.com/articles/Portal_Project_Teaching_Database/1314459).
48-
49-
Specifically, the data files we use in these lessons are:
50-
51-
- [surveys.csv](https://ndownloader.figshare.com/files/2292172)
52-
- [species.csv](https://ndownloader.figshare.com/files/3299483)
53-
54-
55-
## Requirements
56-
57-
Data Carpentry's teaching is hands-on, so participants are encouraged to use
58-
their own computers to insure the proper setup of tools for an efficient workflow.
59-
*These lessons assume no prior knowledge of the skills or tools*, but working
60-
through this lesson requires working copies of the software described below.
61-
To most effectively use these materials, please make sure to install everything
62-
*before* working through this lesson.
63-
64-
Participants are required to abide by Data Carpentry's
65-
[Code of Conduct](http://www.datacarpentry.org/code-of-conduct/).
66-
67-
68-
{% if page.software == "Python" %}
69-
{% include pythonSetup.html %}
70-
{% elsif page.software == "Spreadsheets" %}
71-
{% include spreadsheetSetup.html %}
72-
{% elsif page.software == "R" %}
73-
{% include rSetup.html %}
74-
{% else %}
75-
{% include anySetup.html %}
76-
{% endif %}
77-
78-
79-
## Acknowledgements & Support
80-
81-
Data Carpentry is supported by the [Gordon and Betty Moore Foundation] and a
82-
partnership of several NSF-funded [BIO] Centers ([NESCent], [iPlant], [iDigBio],
83-
[BEACON] and [SESYNC]) and [Software Carpentry], and is sponsored by the [Data
84-
Observation Network for Earth] (DataONE). The structure and objectives of the
85-
curriculum as well as the teaching style are informed by [Software Carpentry].
86-
87-
88-
[Gordon and Betty Moore Foundation]: https://www.moore.org
89-
[BIO]: https://www.nsf.gov/dir/index.jsp?org=BIO
90-
[NESCent]: https://nescent.org
91-
[iPlant]: http://www.iplantcollaborative.org
92-
[iDigBio]: https://www.idigbio.org
93-
[BEACON]: http://beacon-center.org
94-
[SESYNC]: https://sesync.org
95-
[Software Carpentry]: https://software-carpentry.org
96-
[Data Observation Network for Earth]: https://www.dataone.org
13+
Python is a general purpose programming language that is useful for writing scripts to work effectively and reproducibly with data.
14+
15+
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.
16+
17+
> ## Getting Started
18+
>
19+
> Data Carpentry's teaching is hands-on, so participants are encouraged to use
20+
> their own computers to insure the proper setup of tools for an efficient
21+
> workflow. <br>**These lessons assume no prior knowledge of the skills or tools.**
22+
>
23+
> To get started, follow the directions in the "[Setup](setup/)" tab to
24+
> download data to your computer and follow any installation instructions.
25+
>
26+
> #### Prerequisites
27+
>
28+
> This lesson requires a working copy of **Python**.
29+
> <br>To most effectively use these materials, please make sure to install
30+
> everything *before* working through this lesson.
31+
{: .prereq}
32+
33+
> ## For Instructors
34+
> If you are teaching this lesson in a workshop, please see the
35+
> [Instructor notes](guide/).
36+
{: .prereq}

setup.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
---
22
layout: page
3-
title: Setup Instructions for Learners
3+
title: Setup
44
permalink: /setup/
55
---
66

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

12+
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.
13+
14+
- [surveys.csv](https://ndownloader.figshare.com/files/2292172)
15+
- [species.csv](https://ndownloader.figshare.com/files/3299483)
16+
17+
18+
19+
> ## Software
20+
{: .prereq}
921
[Python](http://python.org) is a popular language for
1022
scientific computing, and great for general-purpose programming as
1123
well. Installing all of its scientific packages individually can be
@@ -80,7 +92,7 @@ wish to use a different browser, open this link: <http://localhost:8888>.
8092

8193
## Overview of the Jupyter notebook (Optional)
8294

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

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

96-
![Jupyter notebook file browser](./fig/00_1_jupyter_file_browser.png)
108+
![Jupyter notebook file browser](../fig/00_1_jupyter_file_browser.png)
97109
*The Jupyter notebook file browser*
98110

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

102-
![Jupyter notebook file browser](./fig/00_2_jupyter_new_notebook.png)
114+
![Jupyter notebook file browser](../fig/00_2_jupyter_new_notebook.png)
103115
*The Jupyter notebook file browser*
104116

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

108-
![new Jupyter notebook](./fig/00_3_jupyter_blank_notebook.png)
120+
![new Jupyter notebook](../fig/00_3_jupyter_blank_notebook.png)
109121
*A new, blank Jupyter notebook*
110122

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

115-
![Jupyter tour and help](./fig/00_4_jupyter_tour_help.png)
127+
![Jupyter tour and help](../fig/00_4_jupyter_tour_help.png)
116128
*User interface tour and Help*
117129

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

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

124-
![Code cell](./fig/00_5_jupyter_code_before.png)
136+
![Code cell](../fig/00_5_jupyter_code_before.png)
125137
*A Code cell*
126138

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

130-
![Code cell and its output](./fig/00_6_jupyter_code_after.png)
142+
![Code cell and its output](../fig/00_6_jupyter_code_after.png)
131143
*A Code cell and its output*
132144

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

138-
![markdown input cell](./fig/00_7_jupyter_markdown_before.png)
150+
![markdown input cell](../fig/00_7_jupyter_markdown_before.png)
139151
*A markdown input cell*
140152

141153
* To run the cell, type Shift-Enter.
142154

143-
![rendered markdown cell](./fig/00_8_jupyter_markdown_after.png)
155+
![rendered markdown cell](../fig/00_8_jupyter_markdown_after.png)
144156
*A rendered markdown cell*
145157

146158

0 commit comments

Comments
 (0)