Data
Visualization
DataGrids can be visualized by themselves and when added as a component in a Marquee Markets platform.
Open a DataGrid
Once a DataGrid is created or saved, it can be opened in a web browser using the open
method.
from gs_quant.api.gs.datagrid import GsDataGridApi
datagrid = GsDataGridApi.get_datagrids(limit=1)[0]
datagrid.open()
The above snippet will open the DataGrid in your default browser.
Create a Workspace With a DataGrid
DataGrids can be added into workspaces via the GsWorkspacesMarketsApi
. Here's a simple example that creates a workspace that includes a DataGrid.
from gs_quant.api.gs.datagrid import GsDataGridApi
from gs_quant.api.gs.workspaces import GsWorkspacesMarketsApi
from gs_quant.target.workspaces_markets import WorkspaceParameters, WorkspaceComponent, ComponentType, Workspace, WorkspaceType
datagrid = GsDataGridApi.get_datagrids(limit=1)[0]
datagrid_component = WorkspaceComponent(id_=datagrid.get_id(), type_=ComponentType.datagrid)
workspace = Workspace(name='Workspace With DataGrid',
type_=WorkspaceType.cashboard,
parameters=WorkspaceParameters(layout='r(c3($0))',
components=(datagrid_component,)))
workspace = GsWorkspacesMarketsApi.create_workspace(workspace)
print(workspace.id)
This will output a unique workspace identifier such as below.
CBSVSD6SY4XKYGPCNO
The example above creates a simple workspace with just your DataGrid. You can use this id to open your workspace by going to marquee.gs.com/s/markets/{id}, in this case marquee.gs.com/s/markets/CBSVSD6SY4XKYGPCNO. This will create a page that looks like:
Tip
More about creating advanced workspaces with other supported components can be found here.
Questions?
Please contact us at gs-marquee-markets@gs.com with any questions or feedback.
Related Content
DataGrid Overview
arrow_forwardDataGrid Persistence
arrow_forwardWas this page useful?
Give feedback to help us improve developer.gs.com and serve you better.