WIN wk13b / H10 / Data grafisch weergeven

Data grafisch weergeven
Programming basics-II
Hoofdstuk 10 / Week 15
 

1 / 20
next
Slide 1: Slide
Applicatie- en mediaontwikkelaarMBOStudiejaar 1

This lesson contains 20 slides, with interactive quiz and text slides.

Items in this lesson

Data grafisch weergeven
Programming basics-II
Hoofdstuk 10 / Week 15
 

Slide 1 - Slide

Deze week
  • Kennis opfrissen
  • Data grafisch weergeven
  • Werktijd: weekchecks en A5

Slide 2 - Slide

Vorige week: draaitabel
Een draaitabel geeft al meer inzicht dan de originele data, maar...

Slide 3 - Slide

Vorige week: draaitabel
Een draaitabel geeft al meer inzicht dan de originele data, maar... Welke maand zijn de meeste passagiers?

Slide 4 - Slide

Deze week: grafisch weergeven

Slide 5 - Slide

Deze week: grafisch weergeven
Library: matplotlib

Slide 6 - Slide

Matplotlib: installeren en gebruiken
> pip install matplotlib --prefer-binary
Invullen in je terminal zónder het pijltje (dat geeft in documentatie enzo altijd aan dat het een terminal-commando is).

Slide 7 - Slide

Matplotlib: installeren en gebruiken
> pip install matplotlib --prefer-binary
import matplotlib.pyplot as plt
Verder kun je matplotlib dus aanspreken als "plt".
Dit is conventie binnen Python.

Slide 8 - Slide

Matplotlib: installeren en gebruiken
> pip install matplotlib --prefer-binary
import matplotlib.pyplot as plt
import pandas as pd

Slide 9 - Slide

Matplotlib: installeren en gebruiken
> pip install matplotlib --prefer-binary
import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_excel("some_file.xlsx")

Slide 10 - Slide

Matplotlib: installeren en gebruiken
> pip install matplotlib --prefer-binary
import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_excel("some_file.xlsx")
data_pivoted = data.pivot_table(.....)

Slide 11 - Slide

Matplotlib: installeren en gebruiken
> pip install matplotlib --prefer-binary
import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_excel("some_file.xlsx")
data_pivoted = data.pivot_table(.....)
data_pivoted.plot()

Slide 12 - Slide

Matplotlib: installeren en gebruiken
> pip install matplotlib --prefer-binary
import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_excel("some_file.xlsx")
data_pivoted = data.pivot_table(.....)
data_pivoted.plot()
plt.show()

Slide 13 - Slide

Matplotlib: installeren en gebruiken
> pip install matplotlib --prefer-binary
import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_excel("some_file.xlsx")
data_pivoted = data.pivot_table(.....)
data_pivoted.plot(kind="bar", stacked=True)
plt.show()

Slide 14 - Slide

.

Slide 15 - Slide

Aantal opties
data_pivoted.plot()
data_pivoted.plot(kind="bar")

Slide 16 - Slide

Aantal opties
data_pivoted.plot(kind="barh", stacked=True)
data_pivoted.plot(kind="bar", stacked=True)

Slide 17 - Slide

Matplotlib: installeren en gebruiken
> pip install matplotlib --prefer-binary
import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_excel("some_file.xlsx")
data_pivoted = data.pivot_table(.....)
data_pivoted.plot(kind="bar", stacked=True)
plt.show()
Lezen + maken....
H10, paragraaf 3 t/m 5

Slide 18 - Slide


Lezen + maken.... H10, paragraaf 3 t/m 5.

Inleveren: screenshot van code + diagram opdracht 5.
Klaar
  1. Weekcheck H10.
  2. Vorige weekchecks allemaal 'voldaan' maken
  3. Herhalingsopdrachten H6, H7 of H8

Slide 19 - Open question

Aan de slag


Weekcheck H9 eerst!!
Weekcheck H10.







Klaar?
  1. Herhalingsopdracht H6
  2. Herhalingsopdracht H7
  3. Herhalingsopdracht H8
  4. Herhalingsopdrachten H1 t/m 5
Stilte, werk voor jezelf
Overleg met buur is ok
Werk in groepjes

Slide 20 - Slide