OpenTechSchool / python-data-intro

Workshop material for "Introduction to Data Processing with Python"
http://opentechschool.github.io/python-data-intro/
Other
40 stars 18 forks source link

add jupyter notebook integration / css / agree on style #23

Open ghost opened 6 years ago

ghost commented 6 years ago

@jonas-braun @ellenkoenig Using Jupyter notebooks with Jekyll is fairly straightforward, according to www.linode.com, if you simply export your JN as MD. That's good enough for me. But it might require some CSS tweakage, and there there's the question of how/where graphics and images are stored. Also, the style guide might need to be updated to account for JN formatting issues – such as output, which can be looooonng.

jonas-braun commented 6 years ago

for now, lets use this schema: export jupyter-notebook as markdown and paste it into the jekyll source files. input blocks look like this:

countries = list(set(user_countries.values())) 
print(len(countries)) 

(three backticks and the language python) and output blocks look like this

162

(no backticks, simply indented using white spaces)

lets make a nice stylesheet later and keep the black background to stick with the OTS stylesheet.

jonas-braun commented 6 years ago

I updated the stylesheet to give us a new look for juypter-style code blocks. See loop example in https://opentechschool.github.io/python-data-intro/core/recap.html An html tag around the code causes it to be formatted as input and output of a jupyter script.

ghost commented 6 years ago

Looks good! We might want to ditch the border surrounding the cell. It cuts through the "show" button.