Query results can easily be forwarded from the Skyminer query page to Jupyter.
After building your Skyminer query, click on the Jupyter button on the right of the page
Choose which notebook you want to send the query result to
The list contains all the notebooks located in the Processors folder of Jupyter. By default the folder contains some example notebooks, but you can easily add new ones. To do so, refer to Creating a notebook.
This extension makes it possible to use the GET parameters of the url of the notebook as python variables.
It uses the Skyminer TS Python Connector
library to retrieve data in Python (see Skyminer Time Series Python Connector).
The parameters will be in a variable called WEB_ARGS
You can use the &sk_reload=1
parameter to rerun the notebook when the page is called.
The address of the server is saved in a variable called SERVER_URL
from SkyminerTS import MetricBuilder, QueryBuilder, TimeUnit, STSAPI, QueriesToDataframe, TimeRelative
# Init the API
API = STSAPI.init(SERVER_URL + "/api/v1")
# Get metric
result = API.get_data_points(WEB_ARGS["query"])
# Convert the result as Dataframes
DF = QueriesToDataframe(result)
# Print Dataframes
print(DF)
The HideCode
extension hides the python code by default for the PDF exportation of the notebook.
To hide or show cells in PDF Export :
Click on the menu Hide code
in the toolbar
Click on the item Show status
A checkbox will appear at the top of each cell. If a checkbox is checked, the code of the cell will be visible in the PDF