Skip to content

Commit 69cfde6

Browse files
tobyhodgesmaxim-belkin
authored andcommitted
remove permalink and layout fields from individual page front matter
1 parent 617c684 commit 69cfde6

7 files changed

Lines changed: 32 additions & 46 deletions

File tree

_extras/CONTRIBUTORS.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
2-
layout: page
32
title: About Contributors
4-
permalink: /contributors/
53
---
64
The materials in this python-ecology-lesson repository were initially developed
75
and adapted and continue to be revised by many contributors. Some of the lessons
@@ -48,4 +46,3 @@ Wasser, Mariela Perignon, John Gosset and François Michonneau in April 2015.
4846
- Visualizing Data with ggplot (Developed by Jeremy Zucker November 2016)
4947
- Putting It All Together (Developed by Mariela Perignon with minor revisions by Leah Wasser April 2015)
5048
- Accessing SQL using Python (Added by John Gosset with minor revisions by Leah Wasser April 2015)
51-

_extras/about.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
layout: page
32
title: About
4-
permalink: /about/
53
---
64
{% include carpentries.html %}

_extras/discuss.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
2-
layout: page
32
title: Discussion
4-
permalink: /discuss/
53
---
64

75
No current discussion

_extras/extra_challenges.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
---
2-
layout: page
3-
title: "Extra Challenges"
4-
permalink: /extra_challenges/
5-
---
1+
---
2+
title: " Extra Challenges"
3+
---
64

75
# Extra Challenges
86

9-
A collection of challenges that have been either removed from or not (yet) added to the main lesson.
7+
A collection of challenges that have been either removed from or not (yet) added to the main lesson.
108

119
> ## Looping Over DataFrame
1210
>
@@ -15,23 +13,23 @@ A collection of challenges that have been either removed from or not (yet) added
1513
> The file `surveys.csv` in the `data` folder contains 25 years of data from surveys,
1614
> starting from 1977. We can extract data corresponding to each year in this DataFrame
1715
> to individual CSV files, by using a `for` loop:
18-
>
16+
>
1917
> ~~~
2018
> import pandas as pd
21-
>
19+
>
2220
> # Load the data into a DataFrame
2321
> surveys_df = pd.read_csv('data/surveys.csv')
24-
>
22+
>
2523
> # Loop through a sequence of years and export selected data
2624
> start_year = 1977
2725
> end_year = 2002
2826
> for year in range(start_year, end_year+1):
2927
>
3028
> # Select data for the year
31-
> surveys_year = surveys_df[surveys_df.year == year]
29+
> surveys_year = surveys_df[surveys_df.year == year]
3230
>
3331
> # Write the new DataFrame to a CSV file
34-
> filename = 'data/surveys' + str(year) + '.csv'
32+
> filename = 'data/surveys' + str(year) + '.csv'
3533
> surveys_year.to_csv(filename)
3634
> ~~~
3735
> {: .language-python}
@@ -41,6 +39,6 @@ A collection of challenges that have been either removed from or not (yet) added
4139
>
4240
> > ## Solution
4341
> > We get the expected files for all years between 1977 and 2002,
44-
> > plus an empty `data/surveys1976.csv` file with only the headers.
45-
> {: .solution}
42+
> > plus an empty `data/surveys1976.csv` file with only the headers.
43+
> {: .solution}
4644
{: .challenge}

_extras/guide.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
2-
layout: page
3-
title: "Instructor Notes"
4-
permalink: /guide/
2+
title: Instructor Notes
53
---
64

75
# Challenge solutions
@@ -808,29 +806,29 @@ con.close()
808806
~~~
809807
{: .language-python}
810808

811-
Output looks something like
809+
Output looks something like
812810

813811
~~~
814812
year COUNT(*) 1 2 3 4 5 6 7 \
815-
0 1977 503 567.0 784.0 237.0 849.0 943.0 578.0 202.0
816-
1 1978 1048 4628.0 4789.0 1131.0 4291.0 4051.0 2371.0 43.0
817-
2 1979 719 1909.0 2501.0 430.0 2438.0 1798.0 988.0 141.0
818-
3 1980 1415 5374.0 4643.0 1817.0 7466.0 2743.0 3219.0 362.0
819-
4 1981 1472 6229.0 6282.0 1343.0 4553.0 3596.0 5430.0 24.0
813+
0 1977 503 567.0 784.0 237.0 849.0 943.0 578.0 202.0
814+
1 1978 1048 4628.0 4789.0 1131.0 4291.0 4051.0 2371.0 43.0
815+
2 1979 719 1909.0 2501.0 430.0 2438.0 1798.0 988.0 141.0
816+
3 1980 1415 5374.0 4643.0 1817.0 7466.0 2743.0 3219.0 362.0
817+
4 1981 1472 6229.0 6282.0 1343.0 4553.0 3596.0 5430.0 24.0
820818
821819
8 ... 15 16 17 18 19 20 21 22 \
822-
0 595.0 ... 48.0 132.0 1102.0 646.0 336.0 640.0 40.0 316.0
823-
1 3669.0 ... 734.0 548.0 4971.0 4393.0 124.0 2623.0 239.0 2833.0
824-
2 1954.0 ... 472.0 308.0 3736.0 3099.0 379.0 2617.0 157.0 2250.0
825-
3 3596.0 ... 1071.0 529.0 5877.0 5075.0 691.0 5523.0 321.0 3763.0
826-
4 4946.0 ... 1083.0 176.0 5050.0 4773.0 410.0 5379.0 600.0 5268.0
827-
828-
23 24
829-
0 169.0 NaN
830-
1 NaN NaN
831-
2 137.0 901.0
832-
3 742.0 4392.0
833-
4 57.0 3987.0
820+
0 595.0 ... 48.0 132.0 1102.0 646.0 336.0 640.0 40.0 316.0
821+
1 3669.0 ... 734.0 548.0 4971.0 4393.0 124.0 2623.0 239.0 2833.0
822+
2 1954.0 ... 472.0 308.0 3736.0 3099.0 379.0 2617.0 157.0 2250.0
823+
3 3596.0 ... 1071.0 529.0 5877.0 5075.0 691.0 5523.0 321.0 3763.0
824+
4 4946.0 ... 1083.0 176.0 5050.0 4773.0 410.0 5379.0 600.0 5268.0
825+
826+
23 24
827+
0 169.0 NaN
828+
1 NaN NaN
829+
2 137.0 901.0
830+
3 742.0 4392.0
831+
4 57.0 3987.0
834832
~~~
835833
{: .output}
836834

_extras/jupyter_notebooks.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
2-
layout: page
3-
title: "Overview of Jupyter Notebooks"
4-
permalink: /jupyter_notebooks/
2+
title: Overview of Jupyter Notebooks
53
---
64

75
![Example Jupyter Notebook](../fig/00_0_jupyter_notebook_example.jpg)

setup.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
layout: page
32
title: Setup
43
---
54

@@ -185,4 +184,4 @@ The notebook should open automatically in your browser. If it does not or you
185184
wish to use a different browser, open this link: <http://localhost:8888>.
186185
187186
For a brief introduction to Jupyter Notebooks, please consult our
188-
[Introduction to Jupyter Notebooks](jupyter_notebooks) page.
187+
[Introduction to Jupyter Notebooks](.{% link _extras/jupyter_notebooks.md %}) page.

0 commit comments

Comments
 (0)