Rodeo Basics

Installing Rodeo

First, download Rodeo by clicking one of the links below:

Operating System Link
OS X Download
Windows Download

Debian / Ubuntu

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 33D40BC6
sudo add-apt-repository -u "deb http://rodeo-deb.yhat.com/ rodeo main"

#### install rodeo and run it
sudo apt-get -y install rodeo
/opt/Rodeo/rodeo

CentOS / Fedora

#### add the rodeo yum repo
sudo wget http://rodeo-rpm.yhat.com/rodeo-rpm.repo -P /etc/yum.repos.d/

##### install the package and run it
sudo yum install rodeo
/opt/Rodeo/rodeo

You can also install Rodeo with brew:

$ brew cask install rodeo


Requirements

Windows

For Windows users, there are no requirements, just download Rodeo!

(Rodeo for Windows ships with a built-in conda environment)

Mac / Linux

To run Rodeo, you'll need:

The easiest way to do this is to download and install Anaconda Distribution of python

If you already have python installed, you can manually install the required packages with pip:

pip install jupyter_client ipykernel numpy pandas matplotlib

For users with existing anaconda installs, run:

conda install jupyter_client ipykernel numpy pandas matplotlib

Launching Rodeo

After downloading, open the Rodeo file you downloaded (.dmg, .exe).
For Linux OS', you can open Rodeo directly from the command line by running /opt/Rodeo/rodeo.

After dragging the app to the Applications folder, you may be asked if you want to replace the existing Rodeo app. Say "Yes"!

Next, double-click to open the Rodeo application.

Upon opening Rodeo, we'll automatically check two things:

  1. Python is installed
  2. IPython / Jupyter is installed
  3. numpy, pandas, matplotlib are installed

If everything is good to go, you'll see the screen below. Now go have fun!

If you don't have python installed, we don't detect python, or you're missing required packages, you'll see the screen below:

For here, you can either:

  1. Point Rodeo to the python path that you use

Enter the correct python to python

Install Anaconda


Running a script

Let's create a simple script that uses a function to capitalize words.

First, lets create our function. Paste the code below into the editor (the top-left pane) in Rodeo.

def capitalize(x):
    return x.upper()

To instantiate our function, we can do several things:

1) Press the "Run Script" button:

2) Use cmd + return to execute each line individually:

3) Highlight the script and use cmd + return:


Creating a plot

In this quick example, we create a plot in Rodeo using the library ggplot.

First in the console, lets install ggplot. Run the code below:

>>> ! pip install ggplot

Once that command completes, we can begin constructing our script.

In the editor, paste in the following code:

from ggplot import *

diamonds.head()

ggplot(diamonds, aes(x='carat', y='price', color='cut')) + geom_point()

Changing your Python path

When Rodeo starts up, we go through several checks to make sure you have a valid installation of python on your machine.

If you have multiple python installations, use virtual machines, or have multiple python environments, you may want to change your python path.

Using conda environments

To use an existing anaconda environment, go to 'Preferences' and paste the direct path to the conda env.

For example, to use a tensorflow27 environment, we can paste in:

/Users/coristig/rodeoconda/envs/tensorflow27/bin/python


More Topics

Launching Rodeo from the command line

You can create a rodeo command that will allow you to open Rodeo from the command line. As a pre-requisite, make sure you have Rodeo properly installed.

echo "alias rodeo=open -a /Applications/rodeo.app/" >> ~/.bash_profile

$ source ~/.bash_profile

For Linux users, Rodeo should be launched by running:

$ /opt/Rodeo/rodeo


Using Rodeo with a virtualenv

Virtual environments are handy for keeping package dependencies isolated. For details on how to setup a virtual env, checkout this link.

The code below shows a setup for a virtualenv:

$ mkdir py_env && cd "$_"

$ virtualenv venv
  New python executable in venv/bin/python2.7
  Also creating executable in venv/bin/python
  Installing setuptools, pip, wheel...done.

$ which -a python
/Users/coristig/anaconda/bin/python

$ source venv/bin/activate

(venv)$ which python
/Users/coristig/py_venv/venv/bin/python

That last part is important: it shows us our new python path

Copy that path above, and in Rodeo, open up Preferences (command + ,)

In the Python tab, paste the value into the python command field:

For more info on virtualenvs, checkout Running Rodeo within a virtualenv by Jodie Burchell


Viewing Data

All Series, Dataframes, arrays and lists are all saved to your environment.

Below, we create a dataframe df and an array x

Both these objects can then be viewed in the Environments tab and expanded.


Viewing Command History

A list of commands run is also logged in the History panel:


Keyboard Shortcuts

Below are shortcuts that should help speed up your workflow when using Rodeo.

Topic OSX Windows / Linux Action
System + enter ctrl + enter run code
System + , ctrl + , show preferences
System + Q ctrl + Q theoretical explanation
System + N ctrl + N new editor
System + + O + ctrl + O open file
System + s ctrl + s save file
System + w ctrl + w close file
System + opt + ctrl + opt + move to editor to the left of active editor
System + opt + ctrl + opt + move to editor to the right of active editor
System + 1 ctrl + 1 focus on editor
System + 2 ctrl + 2 focus on console
System + 3 ctrl + 3 toggle view for Environment/History
System + 4 ctrl + 4 toggle view for Files/Plots/Packages/Help
System + R ctrl + R restart Rodeo
Console
Console /ctrl + l ctrl + l clear console
Console /ctrl + a ctrl + a skip to beginning of console
Console /ctrl + e ctrl + e skip to end of console
Console /ctrl + c ctrl + c cancel console input
Console tab tab show autocomplete options
Editor
Editor tab tab show autocomplete options
Editor /ctrl + / ctrl + / comment code
Editor + d ctrl + d Delete line
Editor ctrl + opt + ctrl + opt + Select next occurance
Editor ctrl + opt + ctrl + opt + Select previous occurance
Editor ctrl + opt + g - Select all occurances
Editor ctrl + opt + l ctrl + opt + l Split into lines
Editor + f ctrl + f Find / replace text
Editor + g ctrl + g Go to next occurance
Editor + + g ctrl + + g Go to previous occurance
Editor ctrl + + m ctrl + + m Select text between brackets

Using Rodeo with Vim / Emacs shortcuts

Rodeo supports 3 key bindings:

You can specify which key bindings you'd like to use by visiting the Editor tab in the Preferences window and changing the Key Bindings dropdown.

After selecting a key binding, it is immediately available in the editor.


Metrics Collection

Just like any web application, Rodeo tracks usage metrics. These metrics are reported anonymously and do not contain sensitive information about your scripts or data. If you wish to disable tracking, simply uncheck the Tracking Metrics checkbox.

Metrics are tracked based on the Google Analytics anonymous reporting specification. It's the same thing that's used by the Atom Editor. For more details on how it works, check out the code on GitHub.


Preferences

You can customize your Rodeo setup by visiting the Preferences tab. Preferences can also be accessed via the file menu or the "ctrl/⌘ + ," shortcut.


You'll find the Preferences tab in the bottom-right window of Rodeo.


Troubleshooting

If Rodeo detects your path automatically, but you can't run commands, its likely something is misconfigured with Jupyter.

Be sure you have Jupyter installed (pip install jupyter should do it!)

If that doesn't do it, try some of the resources below:

Can't View Plots

To view plots, Rodeo uses matplotlib

First, check to see you have matplotlib installed:

$ ipython -c 'import matplotlib.pyplot'

If you didn't experience any errors, then you should be good to go!

If you didn't get any errors but still can't plot things, confirm that matplotlib is installed in the same path as IPython.

Try some of the resources below for further troubleshooting:

Can't find python path

If Rodeo fails to detect your python path and setting through the UI fails, you can set it manually.

Mac / Linux

Determine your python path:

1) Open the application called Terminal and run:

$ which -a python
/Users/coristig/rodeoconda/bin/python
/usr/local/bin/python
/usr/bin/python

Copy the python path you want to use and paste it into the "Python Command" field in the Rodeo Preferences page

Windows

Determine your python path:

1) Open the application called Command Prompt and run:

> for %i in (python.exe) do @echo. %~$PATH:i

The command will print your python path (something like "C:\Users\coristig\Anaconda3\python.exe")

Copy the python path you want to use and paste it into the "Python Command" field in the Rodeo Preferences page


Getting help & giving feedback

Having trouble setting up Rodeo? Great idea for a new feature?

Checkout our Discussion Board for Rodeo

Found a bug or an issue?

Submit issues at the github repo