Import data into Jupyter Notebook
Danger
This tutorial is out of date. Please check the tutorials overview for our latest tutorials.
From a Jupyter Notebook, you retrieve the data that was generated in Quix in the previous part, and which was persisted into the Quix data store.
Run Jupyter Notebook
Make sure you have reviewed the prerequisites, and have Jupyter Notebook already installed.
- Now run Jupyter Notebook by entering the following command into your terminal:
-
Navigate to
http://localhost:8888
with your web browser. -
Select
New
and thenPython 3 (ipykernel)
from the menu, as shown here:
Tip
If you don’t see Python 3 in the New
menu, run the following commands in your Python environment:
Obtain the training data
In the previous part you generated some real-time data in Quix.
Quix has a code generator that can generate code to connect your Jupyter Notebook to Quix. To use the code generator to retrieve data from Quix and import it into your Notebook:
-
Make sure you are logged into Quix.
-
Select your Workspace (you probably only have one currently).
-
Click
Data Explorer
in the left-hand sidebar. -
Click
Add Query
to add a query to visualize some data. -
Select the F1 Game stream in the
Add Query
wizard, and clickNext
. -
In the
Select parameters and events
step of the wizard, select theBrake
,WorldPositionX
,Steer
,Speed
, andGear
parameters. -
Click
Done
. -
Turn off aggregation using the slider button, as illustrated in the following screenshot:
-
Use the time slider to select about ten minutes of data, as shown in the following screenshot:
This is a precaution, as if your try to import too much data into Jupyter Notebook you may get a
IOPub data rate exceeded.
error. Alternatively, you can increase your capacity by setting the config variable--NotebookApp.iopub_data_rate_limit
in Jupyter. -
Select the
Code
tab. -
Select
Python
from the theLANGUAGE
dropdown. -
Copy all the code in the
Code
tab to your clipboard. -
Paste the Python code from your clipboard to your Jupyter Notebook:
-
Click
Run
.The code prints out the pandas data frame containing the retrieved data, as shown in the following screenshot:
Tip
If you want to use this generated code for more than 30 days, replace the temporary token with a Personal Access Token.