Skip to content
Snippets Groups Projects
Commit dbdcecb5 authored by Andreas Herten's avatar Andreas Herten
Browse files

Initial commit

parent 5803ca6a
No related branches found
No related tags found
No related merge requests found
jan-theme
custom.kit.css
.ipynb_checkpoints/Introduction-to-Pandas-checkpoint.ipynb
[submodule "reveal.js"]
path = reveal.js
url = https://github.com/hakimel/reveal.js.git
%% Cell type:markdown id: tags:
<section class="title-slide">
<h1><it>Introduction to</it> Data Analysis and Plotting with Pandas</h1>
<h2>JSC Tutorial</h2>
<h3>Andreas Herten, Forschungszentrum Jülich, 26 February 2019</h3>
</section>
%% Cell type:markdown id: tags:
## My Motivation
* I like Python
* I like plotting data
* I like sharing
* I think Pandas is awesome and you should use it too
%% Cell type:markdown id: tags:
## Tutorial Setup
* 60 minutes (we might do this again for some advanced stuff if you want to)
* Alternating between lecture and hands-on
* Direct feedback via https://www.polleverywhere.com/
* Please open Jupyter Notebook of this session
- … either on your **local machine** (which has Pandas)
Download here
- … or on the **JSC Jupyter service** at https://jupyter-jsc.fz-juelich.de/
- Either `pip install --user pandas seaborn` once in a shell and `cp $PROJECT_cjsc/herten1/pandas/notebook.ipynb ~/`
- Or
1. `ln -s $PROJECT_cjsc/herten1/pandas ~/.local/share/jupyter/kernels/` and
2. `cp $PROJECT_cjsc/herten1/pandas/notebook-with-kernel.ipynb ~/`
%% Cell type:markdown id: tags:
## About Pandas
<img style="float: right; max-width: 200px;" width="200px" src="img/adorable-animal-animal-photography-1661535.jpg" />
* Python package
* For data analysis
* With data structures (multi-dimensional table; time series), operations
* From »**Pan**el **Da**ta« (multi-dimensional time series in economics)
* Since 2008
* https://pandas.pydata.org/
* Install [via PyPI](https://pypi.org/project/pandas/): `pip install pandas`
%% Cell type:markdown id: tags:
## Pandas and Friends
* Pandas works great together with other established Python tools
* [Jupyter Notebooks](https://jupyter.org/)
* Plotting with [`matplotlib`](https://matplotlib.org/)
* Modelling with [`statsmodels`](https://www.statsmodels.org/stable/index.html), [`scikit-learn`](https://scikit-learn.org/)
* Nicer plots with [`seaborn`](https://seaborn.pydata.org/), [`altair`](https://altair-viz.github.io/)
%% Cell type:code id: tags:
``` python
import pandas as pd
```
%% Cell type:markdown id: tags:
<section class="title-slide">
<h1><it>Introduction to</it> Data Analysis and Plotting with Pandas</h1>
<h2>JSC Tutorial</h2>
<h3>Andreas Herten, Forschungszentrum Jülich, 26 February 2019</h3>
</section>
# *Introduction to* Data Analysis and Plotting with Pandas
## JSC Tutorial
Andreas Herten, Forschungszentrum Jülich, 26 February 2019
%% Cell type:markdown id: tags:
## My Motivation
* I like Python
* I like plotting data
* I like sharing
* I think Pandas is awesome and you should use it too
%% Cell type:markdown id: tags:
## Tutorial Setup
* 60 minutes (we might do this again for some advanced stuff if you want to)
* Alternating between lecture and hands-on
* Direct feedback via https://www.polleverywhere.com/
%% Cell type:markdown id: tags:
* Please open Jupyter Notebook of this session
- … either on your **local machine** (which has Pandas)
Download here
- … or on the **JSC Jupyter service** at https://jupyter-jsc.fz-juelich.de/
- Either `pip install --user pandas seaborn` once in a shell and `cp $PROJECT_cjsc/herten1/pandas/notebook.ipynb ~/`
- Or
1. `ln -s $PROJECT_cjsc/herten1/pandas ~/.local/share/jupyter/kernels/` and
2. `cp $PROJECT_cjsc/herten1/pandas/notebook-with-kernel.ipynb ~/`
%% Cell type:markdown id: tags:
<!-- .slide: data-background="blue" -->
## About Pandas
<!-- .slide: class="slide-with-special-img-positionning" -->
<img style="float: right; max-width: 200px;" width="200px" src="img/adorable-animal-animal-photography-1661535.jpg" />
* Python package
* For data analysis
* With data structures (multi-dimensional table; time series), operations
* From »**Pan**el **Da**ta« (multi-dimensional time series in economics)
* Since 2008
* https://pandas.pydata.org/
* Install [via PyPI](https://pypi.org/project/pandas/): `pip install pandas`
%% Cell type:markdown id: tags:
## Pandas and Friends
* Pandas works great together with other established Python tools
* [Jupyter Notebooks](https://jupyter.org/)
* Plotting with [`matplotlib`](https://matplotlib.org/)
* Modelling with [`statsmodels`](https://www.statsmodels.org/stable/index.html), [`scikit-learn`](https://scikit-learn.org/)
* Nicer plots with [`seaborn`](https://seaborn.pydata.org/), [`altair`](https://altair-viz.github.io/)
%% Cell type:code id: tags:
``` python
import pandas as pd
```
%% Cell type:code id: tags:
``` python
```
......
This diff is collapsed.
Makefile 0 → 100644
SOURCES = Introduction-to-Pandas.html
ADDITIONAL_DEPENDENCIES = reveal_options.txt fzj.js custom.css Makefile
.PHONY: all
all: $(SOURCES)
%.html: %.ipynb $(ADDITIONAL_DEPENDENCIES)
jupyter nbconvert --to=slides --reveal-prefix=reveal.js --stdout $< \
| awk '/reveal.js"/ { print " " $$1 ","; print " \"fzj.js\""; next }1' \
| sed '/transition/r reveal_options.txt' \
> $@
/* not sure that I want to touch the font
.body {
font-family: Arial, sans-serif;
}
.reveal {
font-family: Arial, sans-serif;
/*
2018: First version by Jan Meinke;
2019: Appended by Andreas Herten;
*/
:root {
--color-fzjblue: #023d6b;
--color-fzjlightblue: #adbde3;
--logo-fzj: url("img/fzjlogo.svg");
--logo-helmholtz: url("img/helmholtz.svg");
}
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
font-family: Arial, sans-serif;
body {
font-family: "Source Sans Pro", "Arial", "sans-serif";
background: var(--logo-fzj), var(--logo-helmholtz);
background-size: 35.5%, 18%;
background-position: 100% 104%, 1.5% 95%;
background-repeat: no-repeat, no-repeat;
}
*/
:root {
--color-1: #009D82 ;
--color-2: #00493d ;
--color-blue: #023d6b;
--color-lightblue: #adbde3;
--logo-2: url("img/esd_logo.png") ; /* Not working, TODO */
--name : Workshop: Energy Time Series Storage and Analytics ; /*Not working, TODO*/
section {
margin: 0;
}
body { /* Change the logo urls in the line after if needed */
background: url("img/kit_logo.jpg"), url("img/esd_logo.png"), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='40px' width='auto'><text x='10' y='20' fill='grey' font-size='30'> Workshop: Energy Time Series Storage and Analytics </text></svg>");
background-size: 10%, 10%, 95%;
background-position: 5% 5%, 95% 5%, 100% 98%;
background-repeat: no-repeat, no-repeat, no-repeat;
.reveal .slides {
margin: 0 1vmin;
}
.reveal h1,
.reveal h2,
.reveal h3 {
font-family: "Source Sans Pro", "Arial", "sans-serif";
text-transform: uppercase;
color: var(--color-fzjblue);
}
.reveal .progress span {
background: var(--color-1);
.reveal h1 {
color: white;
}
.reveal .slide-number {
color: var(--color-1);
.reveal section[data-background-image='img/background_title_slide.svg'] * {
color: white;
}
.reveal a {
color: var(--color-1);
.reveal h2 + h3 {
text-transform: unset;
font-size: 90%;
}
.reveal a:hover {
color: var(--color-2);
text-shadow: none;
border: none; }
.controls {
visibility: hidden;
}
.reveal a:hover img {
border-color: var(--color-1);
.reveal .progress {
position: absolute;
bottom: 1px;
}
/*.title-slide {
background: yellow;
padding: 5px;
}*/
.rendered_html:first-of-type {
background: var(--color-blue);
margin-top: 60px;
padding-top: 300px;
.prompt {
min-width: 0;
width: 0;
visibility: hidden;
}
.rendered_html:first-of-type h1 {
div.dateauthor {
padding-top: 4em;
color: white;
}
.rendered_html:first-of-type h2 {
color: var(--color-lightblue);
}
.rendered_html:first-of-type h3 {
color: white;
font-size: smaller;
div.prompt {
width:0;
}
.rendered_html:first-of-type h1, .rendered_html:first-of-type h2 {
margin-top: 1ex;
div#footer {
position: fixed;
bottom: 0;
width: 100%;
z-index: 10;
font-size: 0.5em; font-weight: bold; padding: 0 1vmin; height: 20vmin; background: #fff}
#footer h1 {
position: absolute;
bottom: 3.2vmin;
display: block;
padding: 0 1em;
font-size: 1.7vmin;
font-weight: bold;
text-transform: unset;
color: var(--color-fzjblue);
}
.rendered_html:first-of-type h3 {
margin-top: 5ex;
#footer h2 {display: block; padding: 0.em 1em 0;}
img.fzjlogo {
position: fixed;
bottom: 0;
right: 0;
height: 24vmin; /* The height of the svg is about 3 times the height of the logo */
margin-bottom: -3vmin; /* Baseline of logo should be about 5% of short side above edge. */
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled {
border-right-color: var(--color-1); }
.reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled {
border-left-color: var(--color-1); }
.reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled {
border-bottom-color: var(--color-1); }
.reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled {
border-top-color: var(--color-1); }
.reveal .controls div.navigate-left.enabled:hover {
border-right-color: var(--color-2); }
.reveal .controls div.navigate-right.enabled:hover {
border-left-color: var(--color-2); }
.reveal .controls div.navigate-up.enabled:hover {
border-bottom-color: var(--color-2); }
.rendered_html img, svg {
max-height: 440px;
}
.reveal .controls div.navigate-down.enabled:hover {
border-top-color: var(--color-2); }
fzj.js 0 → 100644
document.getElementsByTagName("section")[0].getElementsByTagName("section")[0].setAttribute("data-background-image", "img/background_title_slide.svg");
<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080" viewBox="0 0 508.00001 285.75001"><path fill="#023d6b" d="M0 16.253h508v214.313H0z"/></svg>
\ No newline at end of file
This diff is collapsed.
<svg xmlns="http://www.w3.org/2000/svg" width="237.494" height="9.906" viewBox="0 0 222.65039 9.2871093"><text font-weight="700" font-size="12" font-family="Arial" fill="#023d6b" transform="translate(-1.178 9.117)">Member of the Helmholtz Association</text></svg>
Subproject commit 0b3e7839ebf4ed8b6c180aca0abafa28c67aee6d
width: 1280,
height: 720,
center: false,
controls: false,
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment