After you integrate with IBM® Maximo® Real Estate and Facilities, Cisco Webex, and Cisco Spaces, you can configure dashboards for space
planning. You can use space planning dashboards to understand space utilization across buildings,
floors, and spaces.
Before you begin
- Integrate with IBM Maximo Real Estate and Facilities, Cisco Webex, and
Cisco Spaces.
For more information about integrating with IBM Maximo Real Estate and Facilities, see Integrating with
Maximo Real Estate and Facilities.
For more information about integrating with Cisco Spaces, see Integrating with Cisco Spaces.
For more information
about integrating with Cisco Webex, see Integrating with Cisco Webex.
- Decide whether you will manually create the metrics in Maximo Monitor
or use Python scripts. If you use Python scripts, complete the following steps and then, in the
Procedure section, skip to step 9. Running the Python scripts creates the metrics that you manually
create in steps 1 - 8.
- Retrieve the following Maximo Monitor credentials:
Base URL
API key
API token
For more information about retrieving the API values, see APIs.
- Create a .json file that contains the credentials. Use the following
format:
{
"baseurl": "base_url",
"apikey": "API_key",
"apitoken": "API_token"
}
- Download the scripts from GitHub. For more information, see GitHub.
- In a command line, run the following command:
python main.py
--tenant-id main --site site-id --deploy
locationThe command creates the metrics for the specified tenant,
site, and location.
About this task
In the space planning dashboards, you can review the free capacity of a building based on
historic occupancy data.In the following task, you set up a dashboard that includes the number of
seats that are often unused and the overall capacity of the building. The dashboard includes a
histogram-like bar chart that tracks how often maximum occupancy is reached.
Procedure
- On the Setup page, on the Hierarchies tab, in
your hierarchy, select the space for which you want to configure a dashboard.
- Create a metric that generates a rolling average based on the per minute occupancy count
over a custom window size. If you use a Python script to generate the metrics, this metric is the
OccupSpace_rollavg_15min metric.
- On the Data tab, for batch data metrics, click
Create metric.
- Select the PythonExpression metric and then click
Select.
- For the metric scope, select This node and child nodes and then
click Next.
- For the metric input, in the expression field, specify the
following Python expression. Replace the variables with your
values.
sp.signal.savgol_filter(df[“metric_name”],window_size,0)
savgol_filter is the filter used from the
scipy.signal
module, which takes
dataframe, the window, and the polynomial order of 0 as the
input arguments.
For the window_size value, specify a number, for
example, 10 or 15, that represents minutes.
- Click Next.
- Optional: Configure the name of the output metric.
- Click Create metric.
- Create a metric that extracts the maximum occupancy count over a day. This metric use the
metric that you created in step 3 for the selected window size. If you use a Python script to
generate the metrics, this metric is the Daily_max_15minwin metric.
- On the Data tab, for batch data metrics, click
Create metric.
- Select the AggregateWithExpression metric and then click
Select.
- For the metric scope, select This node and child nodes and then
click Next.
- For the metric input, in the source field, select the metric
that you created in step 3.
- In the expression field, specify the following Python
expression.
- Click Next.
- In the Granularity field, select
Daily.
- Optional: Configure the name of the output metric.
- Click Create metric.
- On the Setup page, on the Hierarchies tab, in
your hierarchy, select a floor in the building for which you want to configure a
dashboard.
- Create a metric that aggregates data at the floor level. This metric uses the metric that
you created in step 4. If you use a Python script to generate the metrics, this metric is the
Daily_max_occup_agg metric.
- On the Data tab, for batch data metrics, click
Create metric.
- Select the Sum metric and then click
Select.
- For the metric scope, select This node and child nodes and then
click Next.
- For the metric input, in the source field, select the metric
that you created in step 4.
- Click Next.
- In the Granularity field, select
Daily.
- Optional: Configure the name of the output metric.
- Click Create metric.
- On the Setup page, on the Hierarchies tab, in
your hierarchy, select a building for which you want to configure a dashboard.
- Create a metric that aggregates data at the building level. If you use a Python script to
generate the metrics, this metric is the Daily_occupmax_building_level metric.
- On the Data tab, for batch data metrics, click
Create metric.
- Select the Sum metric and then click
Select.
- For the metric scope, select This node and child nodes and then
click Next.
- For the metric input, in the source field, select the metric
that you created in step 6.
- Click Next.
- In the Granularity field, select
Daily.
- Optional: Configure the name of the output metric.
- Click Create metric.
- Create a metric that calculates the data for the histogram chart. If you use a Python
script to generate the metrics, this metric is the Building-Max_OccupancyCount_Daily_Hist
metric.
- On the Data tab, for batch data metrics, click
Create metric.
- Select the PythonExpression metric and then click
Select.
- For the metric scope, select This node and child nodes and then
click Next.
- For the metric input, in the expression field, specify the
following Python expression. Replace the variables with your values.
- Click Next.
- Optional: Configure the name of the output metric.
- Click Create metric.
- Create a metric that removes outliers and then calculates the maximum daily capacity. If
you use a Python script to generate the metrics, this metric is the Building_Capacity-RobustDailyMax
metric.
- On the Data tab, for batch data metrics, click
Create metric.
- Select the PythonExpression metric and then click
Select.
- For the metric scope, select This node and child nodes and then
click Next.
- For the metric input, in the expression field, specify the
following Python expression. Replace the variables with your values.
df['Total_Workpoints_Capacity'] - df['Building-RobustMax_OccupancyCount_Daily']
- Click Next.
- Optional: Configure the name of the output metric.
- Click Create metric.
-
On the Setup page, on the Hierarchies tab, in your
hierarchy, select the space for which you want to configure a dashboard.
- On the Dashboards tab, click for the Space Utilization dashboard,
click the three-dot menu and then click Edit.
- Add charts to the dashboard. For example, the following steps describe adding a bar chart
that tracks the max daily occupancy count.
- In the card gallery, select the simple bar chart.
- In the Title field, specify a title for the chart, for example,
How many days with X occupants.
- Click Open JSON editor.
- Specify the following JSON:
{
"id": "chart_id",
"title": "How many days with X occupants",
"size": "MEDIUM",
"type": "BAR",
"content": {
"type": "SIMPLE",
"layout": "VERTICAL",
"series": [],
"timeDataSourceId": "timestamp"
},
"dataSource": {
"attributes": [
{
"attribute": "metric_name",
"id": "metric_id"
}
],
"range": {
"count": -10,
"interval": "day"
"type": "rolling"
}
}
},
"timeRange": "last10Days"
}
If you created the metrics by using the Python scripts, the metric name will be
Building-Max_OccupancyCount_Daily_Hist.
If you manually created
the metrics, select the metric that you created that you created in step 8, which calculates the
data for the histogram chart.
- Add cards to the dashboard. For example, the following steps describe adding an Unused
seats card and a Capacity card.
- Add the Unused seats card.
- In the card gallery, select Value/KPI.
- In the Title field, specify Unused seats.
- In the Data item field, select the metric to associate with the chart.
If you created the metrics by using the Python scripts, select the
Building_Capacity-RobustDailyMax metric.
If you manually created the
metrics, select the metric that you created in step 9, which is the metric that removes outliers and
then calculates the maximum daily capacity.
- Click the Edit icon.
- In the Aggregation method field, select Min.
- In the Unit field, specify seats.
- In the Decimal places field, specify 0.
- Click Save.
- Add the Capacity card.
- In the card gallery, select Value/KPI.
- In the Title field, specify Capacity.
- In the Data item field, select the
Total_Workpoints_Capacity metric.
- Click the Edit icon.
- In the Unit field, specify seats.
- In the Decimal places field, specify 0.
- Click Save.
What to do next
You can locally visualize metric dependencies for a specific asset ID as a directed acrylic graph
(DAG). By visualizing the metric dependencies for your space planning dashboard, you can better
understand the connections between the metrics and how values are generated. Before you can generate
the DAG, complete the following steps:
- Retrieve the following Maximo Monitor credentials:
- Base URL
- API key
- API token
For more information about retrieving the API values, see APIs.
- Create a .json file that contains the credentials. Use the following
format:
{
"baseurl": "base_url",
"apikey": "API_key",
"apitoken": "API_token"
}
To generate a DAG for all location at a site that share a substring and all sub locations at
those locations, in your command line, run the following command: python main.py
--tenant-id main --site site_id --render
substring
To generate a DAG that uses a top-down visualization instead of a left-right visualization,
append --td to the end of the command.
For an example visualization, see GitHub.