Import data into Jupyter Notebook
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:
http://localhost:8888with your web browser.
Python 3 (ipykernel)from the menu, as shown here:
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 the Quix Portal.
The Quix Portal 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 the Quix Portal.
Select your Workspace (you probably only have one currently).
Data Explorerin the left-hand sidebar.
Add Queryto add a query to visualize some data.
Select the F1 Game stream in the
Add Querywizard, and click
Select parameters and eventsstep of the wizard, select the
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
Pythonfrom the the
Copy all the code in the
Codetab to your clipboard.
Paste the Python code from your clipboard to your Jupyter Notebook:
The code prints out the pandas data frame containing the retrieved data, as shown in the following screenshot:
If you want to use this generated code for more than 30 days, replace the temporary token with a PAT token. See authenticate your requests for how to do that.