Skip to content

Commit

Permalink
Merge pull request #629 from alee/base_links
Browse files Browse the repository at this point in the history
replace relative links for translation (rebased #488 to resolve conflicts)
  • Loading branch information
alee authored Apr 18, 2023
2 parents 966f145 + 3c41046 commit 7555ca1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions _episodes/01-run-quit.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ And here is a screenshot of a JupyterLab landing page that should be similar to
default web browser after starting the JupyterLab server on either macOS or Windows.

<p align='center'>
<img alt="JupyterLab landing page" src="../fig/0_jupyterlab_landing_page.png" width="750"/>
<img alt="JupyterLab landing page" src="{{ site.baseurl }}/fig/0_jupyterlab_landing_page.png" width="750"/>
</p>

## The JupyterLab Interface
Expand Down Expand Up @@ -157,7 +157,7 @@ menus are included by default.
A screenshot of the default Menu Bar is provided below.

<p align='center'>
<img alt="JupyterLab Menu Bar" src="../fig/0_jupyterlab_menu_bar.png" width="750"/>
<img alt="JupyterLab Menu Bar" src="{{ site.baseurl }}/fig/0_jupyterlab_menu_bar.png" width="750"/>
</p>

### Left Sidebar
Expand All @@ -168,7 +168,7 @@ and terminals, the command palette, and a list of open tabs in the main work are
the default Left Side Bar is provided below.

<p align='center'>
<img alt="JupyterLab Left Side Bar" src="../fig/0_jupyterlab_left_side_bar.png" width="250"/>
<img alt="JupyterLab Left Side Bar" src="{{ site.baseurl }}/fig/0_jupyterlab_left_side_bar.png" width="250"/>
</p>

The left sidebar can be collapsed or expanded by selecting “Show Left Sidebar” in the View menu or
Expand All @@ -181,7 +181,7 @@ and other activities (terminals, code consoles, etc.) into panels of tabs that c
subdivided. A screenshot of the default Main Work Area is provided below.

<p align='center'>
<img alt="JupyterLab Main Work Area" src="../fig/0_jupyterlab_main_work_area.png" width="750"/>
<img alt="JupyterLab Main Work Area" src="{{ site.baseurl }}/fig/0_jupyterlab_main_work_area.png" width="750"/>
</p>

Drag a tab to the center of a tab panel to move the tab to the panel. Subdivide a tab panel by
Expand Down Expand Up @@ -210,7 +210,7 @@ Below is a screenshot of a Jupyter notebook running inside JupyterLab. If you ar
more details, then see the [official notebook documentation][jupyterlab-notebook-docs].

<p align='center'>
<img alt="Example Jupyter Notebook" src="../fig/0_jupyterlab_notebook_screenshot.png" width="750"/>
<img alt="Example Jupyter Notebook" src="{{ site.baseurl }}/fig/0_jupyterlab_notebook_screenshot.png" width="750"/>
</p>

> ## How It's Stored
Expand All @@ -226,7 +226,7 @@ more details, then see the [official notebook documentation][jupyterlab-notebook
> example from the [official documentation][jupyterlab].
>
> <p align='center'>
> <img alt="Multi-panel JupyterLab" src="../fig/0_multipanel_jupyterlab_screenshot.png" width="750"/>
> <img alt="Multi-panel JupyterLab" src="{{ site.baseurl }}/fig/0_multipanel_jupyterlab_screenshot.png" width="750"/>
> </p>
>
> First, create a text file, Python console, and terminal window and arrange them into three
Expand Down
2 changes: 1 addition & 1 deletion _episodes/02-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Age in three years: 45
* Use the position's index in square brackets to get the character at that
position.

![A line of Python code, print(atom_name[0]), demonstrates that using the zero index will output just the initial letter, in this case 'h' for helium.](../fig/2_indexing.svg)
![A line of Python code, print(atom_name[0]), demonstrates that using the zero index will output just the initial letter, in this case 'h' for helium.]({{ site.baseurl }}/fig/2_indexing.svg)

~~~
atom_name = 'helium'
Expand Down
24 changes: 12 additions & 12 deletions _episodes/09-plotting.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ plt.ylabel('Position (km)')
~~~
{: .language-python}

![Simple Position-Time Plot](../fig/9_simple_position_time_plot.svg)
![Simple Position-Time Plot]({{ site.baseurl }}/fig/9_simple_position_time_plot.svg)

> ## Display All Open Figures
>
Expand Down Expand Up @@ -87,7 +87,7 @@ data.loc['Australia'].plot()
~~~
{: .language-python}

![GDP plot for Australia](../fig/9_gdp_australia.svg)
![GDP plot for Australia]({{ site.baseurl }}/fig/9_gdp_australia.svg)
## Select and transform data, then plot it.

* By default, [`DataFrame.plot`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.plot.html#pandas.DataFrame.plot) plots with the rows as the X axis.
Expand All @@ -99,7 +99,7 @@ plt.ylabel('GDP per capita')
~~~
{: .language-python}

![GDP plot for Australia and New Zealand](../fig/9_gdp_australia_nz.svg)
![GDP plot for Australia and New Zealand]({{ site.baseurl }}/fig/9_gdp_australia_nz.svg)
## Many styles of plot are available.

* For example, do a bar plot using a fancier style.
Expand All @@ -111,7 +111,7 @@ plt.ylabel('GDP per capita')
~~~
{: .language-python}

![GDP barplot for Australia](../fig/9_gdp_bar.svg)
![GDP barplot for Australia]({{ site.baseurl }}/fig/9_gdp_bar.svg)

## Data can also be plotted by calling the `matplotlib` `plot` function directly.
* The command is `plt.plot(x, y)`
Expand All @@ -127,7 +127,7 @@ plt.plot(years, gdp_australia, 'g--')
~~~
{: .language-python}

![GDP formatted plot for Australia](../fig/9_gdp_australia_formatted.svg)
![GDP formatted plot for Australia]({{ site.baseurl }}/fig/9_gdp_australia_formatted.svg)

## Can plot many sets of data together.

Expand Down Expand Up @@ -176,7 +176,7 @@ plt.ylabel('GDP per capita ($)')
{: .callout}


![GDP formatted plot for Australia and New Zealand](../fig/9_gdp_australia_nz_formatted.svg)
![GDP formatted plot for Australia and New Zealand]({{ site.baseurl }}/fig/9_gdp_australia_nz_formatted.svg)
* Plot a scatter plot correlating the GDP of Australia and New Zealand
* Use either `plt.scatter` or `DataFrame.plot.scatter`

Expand All @@ -185,13 +185,13 @@ plt.scatter(gdp_australia, gdp_nz)
~~~
{: .language-python}

![GDP correlation using plt.scatter](../fig/9_gdp_correlation_plt.svg)
![GDP correlation using plt.scatter]({{ site.baseurl }}/fig/9_gdp_correlation_plt.svg)
~~~
data.T.plot.scatter(x = 'Australia', y = 'New Zealand')
~~~
{: .language-python}

![GDP correlation using data.T.plot.scatter](../fig/9_gdp_correlation_data.svg)
![GDP correlation using data.T.plot.scatter]({{ site.baseurl }}/fig/9_gdp_correlation_data.svg)

> ## Minima and Maxima
>
Expand All @@ -218,7 +218,7 @@ data.T.plot.scatter(x = 'Australia', y = 'New Zealand')
> > plt.xticks(rotation=90)
> > ~~~
> > {: .language-python}
> > ![Minima Maxima Solution](../fig/9_minima_maxima_solution.png)
> > ![Minima Maxima Solution]({{ site.baseurl }}/fig/9_minima_maxima_solution.png)
> {: .solution}
{: .challenge}

Expand All @@ -237,7 +237,7 @@ data.T.plot.scatter(x = 'Australia', y = 'New Zealand')
> > ~~~
> > {: .language-python}
> >
> > ![Correlations Solution 1](../fig/9_correlations_solution1.svg)
> > ![Correlations Solution 1]({{ site.baseurl }}/fig/9_correlations_solution1.svg)
> >
> > No particular correlations can be seen between the minimum and maximum gdp values
> > year on year. It seems the fortunes of asian countries do not rise and fall together.
Expand All @@ -254,7 +254,7 @@ data.T.plot.scatter(x = 'Australia', y = 'New Zealand')
> ~~~
> {: .language-python}
> > ## Solution
> > ![Correlations Solution 2](../fig/9_correlations_solution2.png)
> > ![Correlations Solution 2]({{ site.baseurl }}/fig/9_correlations_solution2.png)
> >
> > Seems the variability in this value is due to a sharp drop after 1972.
> > Some geopolitics at play perhaps? Given the dominance of oil producing countries,
Expand All @@ -281,7 +281,7 @@ data.T.plot.scatter(x = 'Australia', y = 'New Zealand')
> explain what each argument to `plot` does.
>
> > ## Solution
> > ![More Correlations Solution](../fig/9_more_correlations_solution.svg)
> > ![More Correlations Solution]({{ site.baseurl }}/fig/9_more_correlations_solution.svg)
> >
> > A good place to look is the documentation for the plot function -
> > help(data_all.plot).
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ as well (e.g., repl.it, Anaconda).
>
> 3. Learners must get the gapminder data before class starts:
> please download and unzip the file
> [python-novice-gapminder-data.zip]({{page.root}}/files/python-novice-gapminder-data.zip).
> [python-novice-gapminder-data.zip]({{ site.baseurl }}/files/python-novice-gapminder-data.zip).
>
> Please see [the setup instructions][lesson-setup]
> for more details.
Expand Down

0 comments on commit 7555ca1

Please sign in to comment.