Brief Overview and Introduction (needs Python 2.7 on the platform)
datapark.io is developed and maintained by The Python Quants GmbH. It offers Web-/browser-based data science for individuals, teams and organizations. Free registrations are possible under http://cloud.datapark.io.
You can freely choose your user_name and have to provide a valid email address to which your confirmation email will be sent. You can then login under http://cloud.datapark.io, using your user_name.
At the moment, datapark comprises the following components and features:
In the left panel of the platform, you find the current working path indicated (in black) as well as the current folder and file structure (as links in purple). Note that in this panel only IPython Notebook files are displayed. Here you can navigate the current folder structure by clicking on a link. Clicking on the double points ".." brings you one level up in the structure. Clicking the refresh button right next to the double points updates the folder/file structure. Clicking on a file link opens the IPython Notebook file.
You find a link to open a new notebook on top of the left panel. With IPython notebooks, like with this one, you can interactively code Python and do data/financial analytics.
print ("Hello Data Science World.")
Hello Data Science World.
# simple calculations 3 + 4 * 2
# working with NumPy arrays import numpy as np rn = np.random.standard_normal(100) rn[:10]
array([-2.03644984, -1.22943092, 1.89180996, -0.38089672, -1.56548998, -0.12738937, 1.91656909, 1.71945367, 0.44964487, 0.43329359])
# plotting import matplotlib.pyplot as plt %matplotlib inline plt.plot(rn.cumsum()) plt.grid(True)
If you are new to IPython Notebook, you could start on the IPython home page and might want to check out the videos that are linked there (cf. video page).
Combining the pandas library with IPython Notebook makes for a powerful financial analytics environment.
import pandas as pd import pandas.io.data as web
AAPL = web.DataReader('AAPL', data_source='google') # reads data from Google Finance AAPL['42d'] = pd.rolling_mean(AAPL['Close'], 42) AAPL['252d'] = pd.rolling_mean(AAPL['Close'], 252) # 42d and 252d trends
AAPL[['Close', '42d', '252d']].plot(figsize=(10, 5))
<matplotlib.axes._subplots.AxesSubplot at 0x7fd240570410>
Loading the R extension for IPython.
# only Python 2.7 %load_ext rpy2.ipython
Pushing data to R.
AAPL_close = AAPL['Close'].values
Plotting data with R.
%R plot(AAPL_close, pch=20, col='red'); grid(); title("AAPL closing values")
Julia is, for example, often faster for iterative function formulations. As an example, consider the Fibonacci sequence.
%%julia # recursive formulation in Julia fib_rec(n) = n < 2 ? n : fib_rec(n - 1) + fib_rec(n - 2) @elapsed f = fib_rec(40) f
fib_rec (generic function with 1 method) 1.55161821 102334155
# same in Python def fib_rec(n): if n < 2: return n else: return fib_rec(n - 1) + fib_rec(n - 2) %time fib_rec(40)
CPU times: user 50.8 s, sys: 61 ms, total: 50.9 s Wall time: 50.9 s
The File Manager allows the easy, GUI-based file management on the platform.
In the left column you can navigate the file system. For instance, you find a folder called
public which you can use to share files with others.
In the right column, you find the contents of the folder currently active in the left column. The content is updated by clicking on the refresh butotn. You can, for example, drag and drop files and folders as well as upload files from you local disk. For uploading, you have to do the following:
Via a double click on a file, you can open it in the editor or with IPython Notebook it. In addition, via a right click on a file, you can:
All file operations are only implementable based on the respective user's rights on the operating system level. For example, everybody can copy a file to the
public folder. This file can then be read and executed by everybody else, but only the "owner" of the file can overwrite or delete it.
This component of the platform allows the shell-based access to the Linux server. This part of the platform requires a separate login for security reasons. For example, you can also interactively code on the shell via IPython Shell. The IPython Shell version is started by simply typing
ipython in the system shell.
Of course, you can do anything else via the system shell given your personal rights on the operating system level. Among others, you can:
On datapark you can manage your personal information at any time under My Account.
The Python Quants group – i.e. The Python Quants GmbH, Germany, and The Python Quants LLC., New York City – provide consulting, training and development services with a focus on data and financial anlytics.