-
Notifications
You must be signed in to change notification settings - Fork 11
Quick Start GTG Jupyter Notebook
You will need to start up the Jupyter Notebook server once you have all the python dependencies installed.
From the main root directory of the project run the following commands:
Unzip the sample data to help you get started
grab-tag-graph$ unzip baselineDataDir.zip
grab-tag-graph$ ls datadir
MERG TRMM
With the sample data unzipped you want to start up the Notebook
grab-tag-graph$ cd code
grab-tag-graph/code$ ipython notebook
[I 17:58:45.452 NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
[I 17:58:45.491 NotebookApp] Serving notebooks from local directory: /Users/cgoodale/grab-tag-graph/code
[I 17:58:45.491 NotebookApp] 0 active kernels
[I 17:58:45.491 NotebookApp] The IPython Notebook is running at: http://localhost:8888/
[I 17:58:45.491 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Now your default browser should take you to a list of available notebooks on your local machine.
Select the UserInterface.ipynb from the list and it will launch that notebook in a new browser tab.
Setup the DIR paths to point at your local machine paths and adjust the time frame Within the In[1]: cell you need to update the following variables:
userVariables.DIRS['mainDirStr'] = "/path/to/store/results"
userVariables.DIRS['TRMMdirName'] = "/path/to/TRMM/data"
userVariables.DIRS['CEoriDirName'] = "/path/to/MERG/data"
userVariables.startDateTime = "200908310000"
userVariables.endDateTime = "200908312100"
On my local Mac Book I have the following (just for example)
userVariables.DIRS['mainDirStr'] = "/Users/cgoodale/grab-tag-graph/datadir/OUTPUT"
userVariables.DIRS['TRMMdirName'] = "/Users/cgoodale/grab-tag-graph/datadir/TRMM"
userVariables.DIRS['CEoriDirName'] = "/Users/cgoodale/grab-tag-graph/datadir/MERG"
userVariables.startDateTime = "200908310000"
userVariables.endDateTime = "200908312100"
Run the first cell in the Notebook With your cursor on the first cell click the "play" button at the top of the UI. When it is finished running you should see the BokehJS successfully installed with a rainbow wheel icon above the message. If you see that message then you can run the rest of the notebook to completion.
Just click the "play" button to step through each cell of code.
When you get to cell #6 you should see an interactive BokehJS plot similar to the one below:
Run until completion and you will have a unittestResults.txt file with timings of each step in the notebook. Navigate to the path entered for userVariables.DIRS['mainDirStr'] to find this file, and the others generated during the GTG run.
The unittestResults.txt file will look something like this (your numbers will vary):
1 ¬
2 Timing results for 200908310000 to 200908312100¬
3 1. Total time to complete data ingest is 0.0677679 seconds¬
4 2. Total time to complete finding cloud elements is 5.89929 seconds¬
5 3. Total time to complete finding the cloud clusters is 0.00417399 seconds¬
6 4. Total time to complete finding the MCCs is 3.75795 seconds¬
7 The entire evaluation took 9.72919 seconds to complete¬
8 ----------------------------------------------------------------¬
9 Number of cloud elements found is: 48¬
10 Number of edges (with the cloud elements) found is: 44¬
11 The number of nodes in the prunedGraph is: 42¬
12 The number of edges (with nodes) in the prunedGraph is: 39¬
13 MCC List has been acquired 1¬
14 MCS List has been acquired 2¬