Configuring space planning dashboards

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.
    1. Retrieve the following Maximo Monitor credentials:
      Base URL
      API key
      API token
      For more information about retrieving the API values, see APIs.
    2. Create a .json file that contains the credentials. Use the following format:
      {
          "baseurl": "base_url",
          "apikey": "API_key",
          "apitoken": "API_token"
      }
    3. Download the scripts from GitHub. For more information, see GitHub.
    4. In a command line, run the following command: python main.py --tenant-id main --site site-id --deploy location

      The 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

  1. On the Setup page, on the Hierarchies tab, in your hierarchy, select the space for which you want to configure a dashboard.
  2. 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.
    1. On the Data tab, for batch data metrics, click Create metric.
    2. Select the PythonExpression metric and then click Select.
    3. For the metric scope, select This node and child nodes and then click Next.
    4. 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.
    5. Click Next.
    6. Optional: Configure the name of the output metric.
    7. Click Create metric.
  3. 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.
    1. On the Data tab, for batch data metrics, click Create metric.
    2. Select the AggregateWithExpression metric and then click Select.
    3. For the metric scope, select This node and child nodes and then click Next.
    4. For the metric input, in the source field, select the metric that you created in step 3.
    5. In the expression field, specify the following Python expression.
      x.max()
    6. Click Next.
    7. In the Granularity field, select Daily.
    8. Optional: Configure the name of the output metric.
    9. Click Create metric.
  4. 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.
  5. 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.
    1. On the Data tab, for batch data metrics, click Create metric.
    2. Select the Sum metric and then click Select.
    3. For the metric scope, select This node and child nodes and then click Next.
    4. For the metric input, in the source field, select the metric that you created in step 4.
    5. Click Next.
    6. In the Granularity field, select Daily.
    7. Optional: Configure the name of the output metric.
    8. Click Create metric.
  6. On the Setup page, on the Hierarchies tab, in your hierarchy, select a building for which you want to configure a dashboard.
  7. 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.
    1. On the Data tab, for batch data metrics, click Create metric.
    2. Select the Sum metric and then click Select.
    3. For the metric scope, select This node and child nodes and then click Next.
    4. For the metric input, in the source field, select the metric that you created in step 6.
    5. Click Next.
    6. In the Granularity field, select Daily.
    7. Optional: Configure the name of the output metric.
    8. Click Create metric.
  8. 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.
    1. On the Data tab, for batch data metrics, click Create metric.
    2. Select the PythonExpression metric and then click Select.
    3. For the metric scope, select This node and child nodes and then click Next.
    4. For the metric input, in the expression field, specify the following Python expression. Replace the variables with your values.
      np.histogram 
    5. Click Next.
    6. Optional: Configure the name of the output metric.
    7. Click Create metric.
  9. 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.
    1. On the Data tab, for batch data metrics, click Create metric.
    2. Select the PythonExpression metric and then click Select.
    3. For the metric scope, select This node and child nodes and then click Next.
    4. 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']
    5. Click Next.
    6. Optional: Configure the name of the output metric.
    7. Click Create metric.
  10. On the Setup page, on the Hierarchies tab, in your hierarchy, select the space for which you want to configure a dashboard.
  11. On the Dashboards tab, click for the Space Utilization dashboard, click the three-dot menu and then click Edit.
  12. Add charts to the dashboard. For example, the following steps describe adding a bar chart that tracks the max daily occupancy count.
    1. In the card gallery, select the simple bar chart.
    2. In the Title field, specify a title for the chart, for example, How many days with X occupants.
    3. Click Open JSON editor.
    4. 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.
  13. Add cards to the dashboard. For example, the following steps describe adding an Unused seats card and a Capacity card.
    1. Add the Unused seats card.
      1. In the card gallery, select Value/KPI.
      2. In the Title field, specify Unused seats.
      3. 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.

      4. Click the Edit icon.
      5. In the Aggregation method field, select Min.
      6. In the Unit field, specify seats.
      7. In the Decimal places field, specify 0.
      8. Click Save.
    2. Add the Capacity card.
      1. In the card gallery, select Value/KPI.
      2. In the Title field, specify Capacity.
      3. In the Data item field, select the Total_Workpoints_Capacity metric.
      4. Click the Edit icon.
      5. In the Unit field, specify seats.
      6. In the Decimal places field, specify 0.
      7. 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:
  1. Retrieve the following Maximo Monitor credentials:
    • Base URL
    • API key
    • API token
    For more information about retrieving the API values, see APIs.
  2. 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.