HomeWork with meBlogAboutContact
Random Thoughts
Setting up an Analytics Platform with Python
Frederik Banke
Frederik Banke
December 12, 2017
1 min

Table Of Contents

01
Setting up and running
02
Using jupyter

By combining the power of docker and python I can create an analytics platform that will always run and is not dependent on the versions of python or anything other I run on my laptop.

I will show how easy it is to setup jupyter notebooks and use them for analytics. And how easy it is to publish an analysis to this blog. Docker gives me at least two benefits, 1. I can be sure that when I start my docker image the analysis will always run because docker makes sure the versions of all the software are the same. 2. If my laptop is not enough to run an analysis I can deploy the same docker image to a much more power full computer in a cloud.

Setting up and running

First I need a Dockerfile with the specification of the environment I want to run, it only contains two lines.

FROM sachinruk/ml\_class
RUN conda install -y quandl

Thanks to Sachin Abeywardana which already setup a docker image with python and jupyter installed. I only needed to install quandl since I need access to financial data.

I like to use docker-compose to run my docker images. To do this I need one more file and then I can start the platform.

docker-compose.yml

version: '2'
services:
app:
build: .
volumes:
- ./:/notebook
environment:
KERAS_BACKEND: tensorflow
ports:
- 9000:8888

When I run the command “docker-compose up” the service will start up and I can access it in my browser on http://localhost:9000

It then looks like this:

Screenshot from 2017 12 18 20 54 15 768x226 1

Using jupyter

To use the platform you would need to have a good understanding of python since that is the programming language that powers it. To get going I have created a sample notebook that implements a linear regression on stock data.

When using the notebook it actually looks like the view above. All the fields are editable. I particularly like that I can write pretty documentation alongside the code, it even supports math expressions that will be pretty-printed.

I’m going to use this platform for future analysis so check the blog once in a while for interesting analysis.

You can download the full project jupyter.


Share

Frederik Banke

Frederik Banke

Code Coach

I teach developers how to improve the code they write. I focus on how they can implement clean code and craftsmanship principles to all aspects of their code.

Expertise

Clean Code
Refactoring
TDD
C#

Social Media

linkedingithubwebsite

Related Posts

OAuth and OpenID
OAuth and OpenID Connect for dummies
October 23, 2018
8 min
© 2024, All Rights Reserved.
Powered By Earl Grey
Icons made by Freepik.com from Flaticon.com

Quick Links

About MeContact

Social Media