Skip to content

A Docker based setup to create XKCD style Charts with Jupyter notebooks

License

Notifications You must be signed in to change notification settings

datenkollektiv/xkcd-notebook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pimp your Charts with the fancy XKCD Style

You like the cool XKCD Look and Feel of the teaser chart? Then this repo/post is what you are looking for!

Woo Hoo!!! example

This repo is a companion of the post Pimp your Charts with the fancy XKCD Style.

Please check the post mentioned above for more details.

For the Impatient

jupyterhub - A multi-user version of the notebook designed for companies, classrooms and research labs

With Docker Compose

docker compose up
xkcd_1  | Executing the command: jupyter lab
xkcd_1  | [I 16:44:48.348 LabApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret

Note: The token of this setup is xkcd!

Visit your local jupyterhub http://localhost:8888/.

With Minikube

Build the container in docker-env:

eval $(minikube docker-env)
docker build -t xkcd-notebook .

...once the image is successfully built and tagged...

kubectl create namespace xkcd
kubectl -n xkcd create secret generic aws-credentials --from-file=.aws/credentials
kubectl -n xkcd apply -f k8s/xkcd-notebook-deployment.yaml
NOTEBOOK_POD_NAME=$(kubectl get pods -n xkcd -l app=xkcd-notebook -o json | jq -r '.items[0].metadata.name')
kubectl -n xkcd port-forward ${NOTEBOOK_POD_NAME} 8888:8888

Note: The token of this setup is xkcd!

Visit your local jupyterhub http://localhost:8888/.

Kick-off Graphviz

Empower the setup with graphviz

RUN apt-get install graphviz
RUN pip install graphviz

Check the Introduction to Graphviz in Jupyter Notebook for more in-depth information.

Read data from an S3 bucket

We use boto3 to interact with an S3 bucket.

RUN pip install boto3

Link your .aws/credentials into the container like follows:

services:
  xkcd-jupyterhub:
    volumes:
     - .aws/credentials:/home/jovyan/.aws/credentials

Tap into Apache Spark with Jupyter

Pimp the current setup:

RUN pip install findspark

Inside your Jupyter notebook:

import findspark

About

A Docker based setup to create XKCD style Charts with Jupyter notebooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.9%
  • Other 0.1%