Grafana dashboard: NYRR
Description: Visualization of NYRR.org race result export .
Note, this is not an official NYRR product.

# About this dashboard:

1. You can search your [race search results](https://results.nyrr.org/home) and then:
1. Save them to Excel. 
2. Then export to CSV (Make sure the dates are normalized to ISO format)
3. Make them available to Grafana CSV plugin as a file or from the file system

You can make a very simple Docker/ PODMAN container to share your NYRR.org race results as follows. You could use the following Dockerfile to make a very simple container:

```Dockerfile
# This is not a high performance HTTP server, also it is not recommended for production.
# Please check: https://docs.python.org/3/library/http.server.html#http-server-security
# Author Jose Vicente Nunez <kodegeek.com@protonmail.com>
FROM fedora:37

ARG HTDOCS=/var/www/htdocs
ARG UID=1000
ARG USER=www
ARG GRP=www
EXPOSE 8080/tcp

RUN dnf install -y htop curl && \
    dnf clean -y all
RUN useradd --comment 'WebServer' --home-dir $HTDOCS --create-home --uid $UID --user-group $USER
USER $USER:$GRP
WORKDIR $HTDOCS
CMD exec python3 -m http.server 8080
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=1 CMD curl --fail --silent --show-error http://localhost:8080 || exit 1
LABEL HOW_TO_BUILD="BUILDKIT=y docker build --file Dockerfile --tag static_server ."
LABEL HOW_TO_RUN="docker run --init --detach --name home_fitness --publish 8080:8080 --restart=always --volume /home/josevnz/fitness:/var/www/htdocs:ro static_server"
```

You can see a [demonstration video here](https://youtu.be/RQYhDJw9wtI)


{
  "__inputs": [
    {
      "name": "DS_NYRR.ORG_RESULTS",
      "label": "NYRR.org results",
      "description": "",
      "type": "datasource",
      "pluginId": "marcusolsson-csv-datasource",
      "pluginName": "CSV"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.3.2"
    },
    {
      "type": "datasource",
      "id": "marcusolsson-csv-datasource",
      "name": "CSV",
      "version": "0.6.3"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "datasource": {
          "type": "marcusolsson-csv-datasource",
          "uid": "${DS_NYRR.ORG_RESULTS}"
        },
        "enable": true,
        "iconColor": "green",
        "mappings": {
          "tags": {
            "source": "field",
            "value": "Age-Graded Percent"
          },
          "text": {
            "source": "field",
            "value": "Finish Time"
          },
          "time": {
            "source": "field",
            "value": "Event Date"
          },
          "timeEnd": {
            "source": "field",
            "value": "Event Date"
          },
          "title": {
            "source": "field",
            "value": "Event Name"
          }
        },
        "name": "Race name",
        "target": {
          "decimalSeparator": ".",
          "delimiter": ",",
          "header": true,
          "ignoreUnknown": false,
          "limit": 100,
          "matchAny": false,
          "schema": [
            {
              "name": "Event Date",
              "type": "time"
            },
            {
              "name": "Event Name",
              "type": "string"
            },
            {
              "name": "Finish Time",
              "type": "string"
            }
          ],
          "skipRows": 0,
          "tags": [],
          "type": "dashboard"
        }
      },
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Visualization of NYRR.org race result export .\r\nNote, this is not an official NYRR product.",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "marcusolsson-csv-datasource",
        "uid": "${DS_NYRR.ORG_RESULTS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 0,
        "y": 0
      },
      "id": 5,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "max"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "datasource": {
            "type": "marcusolsson-csv-datasource",
            "uid": "${DS_NYRR.ORG_RESULTS}"
          },
          "decimalSeparator": ".",
          "delimiter": ",",
          "header": true,
          "ignoreUnknown": false,
          "refId": "A",
          "schema": [
            {
              "name": "Age-Graded Percent",
              "type": "number"
            }
          ],
          "skipRows": 0
        }
      ],
      "title": "Best",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "marcusolsson-csv-datasource",
        "uid": "${DS_NYRR.ORG_RESULTS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "color-text",
            "filterable": true,
            "inspect": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 50
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Count"
            },
            "properties": [
              {
                "id": "unit"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Age-Graded Percent (max)"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Age-Graded Percent (min)"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 10,
        "w": 18,
        "x": 6,
        "y": 0
      },
      "id": 7,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "datasource": {
            "type": "marcusolsson-csv-datasource",
            "uid": "${DS_NYRR.ORG_RESULTS}"
          },
          "decimalSeparator": ".",
          "delimiter": ",",
          "header": true,
          "ignoreUnknown": false,
          "refId": "A",
          "schema": [
            {
              "name": "Distance",
              "type": "string"
            }
          ],
          "skipRows": 0
        }
      ],
      "title": "By distance",
      "transformations": [
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Age-Graded Percent": {
                "aggregations": [
                  "max",
                  "min",
                  "count"
                ],
                "operation": "aggregate"
              },
              "Distance": {
                "aggregations": [],
                "operation": "groupby"
              }
            }
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Age-Graded Percent (max)"
              }
            ]
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Age-Graded Percent (count)": "Count",
              "Age-Graded Percent (min)": ""
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "marcusolsson-csv-datasource",
        "uid": "${DS_NYRR.ORG_RESULTS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 0,
        "y": 5
      },
      "id": 6,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "min"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "datasource": {
            "type": "marcusolsson-csv-datasource",
            "uid": "${DS_NYRR.ORG_RESULTS}"
          },
          "decimalSeparator": ".",
          "delimiter": ",",
          "header": true,
          "ignoreUnknown": false,
          "refId": "A",
          "schema": [
            {
              "name": "Age-Graded Percent",
              "type": "number"
            }
          ],
          "skipRows": 0
        }
      ],
      "title": "Worst",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "marcusolsson-csv-datasource",
        "uid": "${DS_NYRR.ORG_RESULTS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "fixed"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": true
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Event Name"
            },
            "properties": [
              {
                "id": "links",
                "value": [
                  {
                    "targetBlank": true,
                    "title": "Race Calendar",
                    "url": "https://www.nyrr.org/run/race-calendar"
                  }
                ]
              },
              {
                "id": "links",
                "value": []
              },
              {
                "id": "custom.width",
                "value": 342
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Age-Graded Time"
            },
            "properties": [
              {
                "id": "links",
                "value": [
                  {
                    "targetBlank": true,
                    "title": "A guide to age grading",
                    "url": "https://www.runnersworld.com/advanced/a20794116/a-guide-to-age-grading/"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Age-Graded Percent"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percent"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Age-Group Place"
            },
            "properties": [
              {
                "id": "links",
                "value": [
                  {
                    "targetBlank": true,
                    "title": "Why age group place results are important",
                    "url": "https://runnerclick.com/why-age-group-place-results-at-races-are-important/"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Event Date"
            },
            "properties": [
              {
                "id": "unit",
                "value": "dateTimeAsIso"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 10
      },
      "id": 2,
      "options": {
        "footer": {
          "enablePagination": true,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 7,
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Distance"
          }
        ]
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "datasource": {
            "type": "marcusolsson-csv-datasource",
            "uid": "${DS_NYRR.ORG_RESULTS}"
          },
          "decimalSeparator": ".",
          "delimiter": ",",
          "header": true,
          "ignoreUnknown": true,
          "refId": "A",
          "schema": [
            {
              "name": "Event Name",
              "type": "string"
            },
            {
              "name": "Event Date",
              "type": "time"
            },
            {
              "name": "Distance",
              "type": "string"
            },
            {
              "name": "Finish Time",
              "type": "string"
            },
            {
              "name": "Pace",
              "type": "string"
            },
            {
              "name": "Gun Time",
              "type": "string"
            },
            {
              "name": "Overall Place",
              "type": "number"
            },
            {
              "name": "Gender Place",
              "type": "number"
            },
            {
              "name": "Age-Group Place",
              "type": "number"
            },
            {
              "name": "Age-Graded Time",
              "type": "string"
            },
            {
              "name": "Age-Graded Place",
              "type": "number"
            },
            {
              "name": "Age-Graded Percent",
              "type": "number"
            }
          ],
          "skipRows": 0
        }
      ],
      "title": "NYRR.org overall results",
      "transformations": [
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": false,
                "field": "Age-Graded Percent"
              }
            ]
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {
              "Age-Group Place": 8,
              "Distance": 1,
              "Event Date": 0,
              "Event Name": 2,
              "Finish Time": 3,
              "Gender Place": 7,
              "Gun Time": 5,
              "Overall Place": 6,
              "Pace": 4
            },
            "renameByName": {
              "Finish Time": "",
              "Pace": "Pace (minutes/mile)"
            }
          }
        },
        {
          "id": "partitionByValues",
          "options": {
            "fields": [
              "Distance"
            ]
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "marcusolsson-csv-datasource",
        "uid": "${DS_NYRR.ORG_RESULTS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd",
            "seriesBy": "last"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 20,
            "gradientMode": "scheme",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 3,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": 3600000,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 18
      },
      "id": 3,
      "options": {
        "legend": {
          "calcs": [
            "count"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "datasource": {
            "type": "marcusolsson-csv-datasource",
            "uid": "${DS_NYRR.ORG_RESULTS}"
          },
          "decimalSeparator": ".",
          "delimiter": ",",
          "header": true,
          "ignoreUnknown": true,
          "refId": "A",
          "schema": [
            {
              "name": "Event Date",
              "type": "time"
            },
            {
              "name": "Age-Graded Percent",
              "type": "number"
            }
          ],
          "skipRows": 0,
          "timezone": "America/New_York"
        }
      ],
      "title": "NYRR.org races",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "dateFormat": "MM-DD-YYYY",
                "destinationType": "time",
                "targetField": "Event Date"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "timeseries"
    }
  ],
  "schemaVersion": 37,
  "style": "dark",
  "tags": [
    "running",
    "fitness",
    "nyrr"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-15y",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "2h",
      "1d"
    ]
  },
  "timezone": "America/New_York",
  "title": "NYRR",
  "uid": "vPBMUrpVz",
  "version": 23,
  "weekStart": "",
  "gnetId": 17832
}