{"_id":"57d05b980e5a0e1900df04c8","user":{"_id":"546d17e2eb9cfd1400dd4529","username":"","name":"World Triathlon"},"__v":0,"initVersion":{"_id":"55773a5ba042551900b002ce","version":"1"},"project":"55773a5ba042551900b002cb","createdAt":"2016-09-07T18:25:28.167Z","changelog":[],"body":"To complement our [Olympic head-to-head matchups tool](https://developers.triathlon.org/blog/scaffolding-the-olympic-head-to-head-simulator) we have developed a similar version for the [Paralympic Games in Rio](https://data.triathlon.org/paralympic-matchups/PT1M?athlete1=32627&athlete2=75037).\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f783193-paralympic-matchups.png\",\n        \"paralympic-matchups.png\",\n        1090,\n        976,\n        \"#2a3b5e\"\n      ],\n      \"caption\": \"Paralympic head-to-head tool\",\n      \"sizing\": \"smart\"\n    }\n  ]\n}\n[/block]\nOnce again, all data comes from the Triathlon API and a similar logic may be used (as detailed in [this article](https://developers.triathlon.org/blog/scaffolding-the-olympic-head-to-head-simulator)) to extract the data. Additional information in terms of detailed biographies, which are included as part of the [Retrieve Athlete Information API call](https://developers.triathlon.org/docs/retrieve-athlete-information) have been included as well as a full World Championship results history. \n\nWhen accessing the World Championship results for an athlete care must be taken to exclude programs that are not Paratriathlon World Championships (for example an \"Open\" race). For example the API call for [Elizabeth Baker](http://www.triathlon.org/athletes/profile/96424/elizabeth_baker) would be:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl --header \\\"apikey: YOUR_APP_KEY\\\" \\\"https://api.triathlon.org/v1/athletes/96424/results?category_id=348\\\"\",\n      \"language\": \"curl\",\n      \"name\": \"World Championship Results\"\n    }\n  ]\n}\n[/block]\nA curtailed response from this API call is shown below which, whilst it indicates there is one World Championship result, on closer inspection of the `prog_name` is actually an \"Open\" race at the event and not the Paratriathlon World Championship proper and so should be excluded.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"code\\\": 200,\\n    \\\"status\\\": \\\"success\\\",\\n    \\\"total\\\": 1,\\n    \\\"per_page\\\": 10,\\n    \\\"current_page\\\": 1,\\n    \\\"last_page\\\": 1,\\n    \\\"next_page_url\\\": null,\\n    \\\"prev_page_url\\\": null,\\n    \\\"from\\\": 1,\\n    \\\"to\\\": 1,\\n    \\\"data\\\": [\\n        {\\n            \\\"event_id\\\": 90168,\\n            \\\"event_title\\\": \\\"2015 ITU World Triathlon Grand Final Chicago\\\",\\n            \\\"event_slug\\\": \\\"2015_itu_world_triathlon_grand_final_chicago\\\",\\n            \\\"event_edit_date\\\": \\\"2016-07-06T07:57:38+00:00\\\",\\n            \\\"event_venue\\\": \\\"Chicago\\\",\\n            \\\"event_country\\\": \\\"United States\\\",\\n            \\\"event_latitude\\\": 41.87811,\\n            \\\"event_longitude\\\": -87.6298,\\n            \\\"event_date\\\": \\\"2015-09-15\\\",\\n            \\\"event_finish_date\\\": \\\"2015-09-20\\\",\\n            \\\"event_country_isoa2\\\": \\\"US\\\",\\n            \\\"event_country_noc\\\": \\\"USA\\\",\\n            \\\"event_region_id\\\": 11,\\n            \\\"event_country_id\\\": 293,\\n            \\\"event_region_name\\\": \\\"Americas\\\",\\n            \\\"event_categories\\\": [\\n                {\\n                    \\\"cat_name\\\": \\\"World Championships\\\",\\n                    \\\"cat_id\\\": 348,\\n                    \\\"cat_parent_id\\\": null\\n                }\\n            ],\\n            \\\"event_flag\\\": \\\"https://f9ca11ef49c28681fc01-0acbf57e00c47a50e70a1acb89e86c89.ssl.cf1.rackcdn.com/images/icons/us.png\\\",\\n            \\\"event_listing\\\": \\\"http://www.triathlon.org/events/event/2015_itu_world_triathlon_grand_final_chicago\\\",\\n            \\\"event_api_listing\\\": \\\"https://api.triathlon.org/v1/v1/events/90168\\\",\\n            \\\"prog_id\\\": 278801,\\n            \\\"prog_name\\\": \\\"Women's PT5 OPEN\\\",\\n            \\\"result_id\\\": 503667,\\n            \\\"position\\\": 1,\\n            \\\"total_time\\\": \\\"01:17:41\\\",\\n            \\\"result_listing\\\": \\\"http://www.triathlon.org/results/result/2015_itu_world_triathlon_grand_final_chicago/278801\\\"\\n        }\\n    ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample World Championship Results Output\"\n    }\n  ]\n}\n[/block]\nDue to varying changes in Paratriathlon classification over the years, with the latest Paratriathlon classification system only coming into existence in 2014, some of the returned data can be more difficult to work with and makes historical comparisons much more difficult. If you have used the API to extract Paratriathlon information we'd be interested in hearing from you on our [Slack channel](http://slack.developers.triathlon.org).","slug":"paralympic-head-to-head-matchups","title":"Paralympic Head-to-Head Matchups"}

Paralympic Head-to-Head Matchups


To complement our [Olympic head-to-head matchups tool](https://developers.triathlon.org/blog/scaffolding-the-olympic-head-to-head-simulator) we have developed a similar version for the [Paralympic Games in Rio](https://data.triathlon.org/paralympic-matchups/PT1M?athlete1=32627&athlete2=75037). [block:image] { "images": [ { "image": [ "https://files.readme.io/f783193-paralympic-matchups.png", "paralympic-matchups.png", 1090, 976, "#2a3b5e" ], "caption": "Paralympic head-to-head tool", "sizing": "smart" } ] } [/block] Once again, all data comes from the Triathlon API and a similar logic may be used (as detailed in [this article](https://developers.triathlon.org/blog/scaffolding-the-olympic-head-to-head-simulator)) to extract the data. Additional information in terms of detailed biographies, which are included as part of the [Retrieve Athlete Information API call](https://developers.triathlon.org/docs/retrieve-athlete-information) have been included as well as a full World Championship results history. When accessing the World Championship results for an athlete care must be taken to exclude programs that are not Paratriathlon World Championships (for example an "Open" race). For example the API call for [Elizabeth Baker](http://www.triathlon.org/athletes/profile/96424/elizabeth_baker) would be: [block:code] { "codes": [ { "code": "curl --header \"apikey: YOUR_APP_KEY\" \"https://api.triathlon.org/v1/athletes/96424/results?category_id=348\"", "language": "curl", "name": "World Championship Results" } ] } [/block] A curtailed response from this API call is shown below which, whilst it indicates there is one World Championship result, on closer inspection of the `prog_name` is actually an "Open" race at the event and not the Paratriathlon World Championship proper and so should be excluded. [block:code] { "codes": [ { "code": "{\n \"code\": 200,\n \"status\": \"success\",\n \"total\": 1,\n \"per_page\": 10,\n \"current_page\": 1,\n \"last_page\": 1,\n \"next_page_url\": null,\n \"prev_page_url\": null,\n \"from\": 1,\n \"to\": 1,\n \"data\": [\n {\n \"event_id\": 90168,\n \"event_title\": \"2015 ITU World Triathlon Grand Final Chicago\",\n \"event_slug\": \"2015_itu_world_triathlon_grand_final_chicago\",\n \"event_edit_date\": \"2016-07-06T07:57:38+00:00\",\n \"event_venue\": \"Chicago\",\n \"event_country\": \"United States\",\n \"event_latitude\": 41.87811,\n \"event_longitude\": -87.6298,\n \"event_date\": \"2015-09-15\",\n \"event_finish_date\": \"2015-09-20\",\n \"event_country_isoa2\": \"US\",\n \"event_country_noc\": \"USA\",\n \"event_region_id\": 11,\n \"event_country_id\": 293,\n \"event_region_name\": \"Americas\",\n \"event_categories\": [\n {\n \"cat_name\": \"World Championships\",\n \"cat_id\": 348,\n \"cat_parent_id\": null\n }\n ],\n \"event_flag\": \"https://f9ca11ef49c28681fc01-0acbf57e00c47a50e70a1acb89e86c89.ssl.cf1.rackcdn.com/images/icons/us.png\",\n \"event_listing\": \"http://www.triathlon.org/events/event/2015_itu_world_triathlon_grand_final_chicago\",\n \"event_api_listing\": \"https://api.triathlon.org/v1/v1/events/90168\",\n \"prog_id\": 278801,\n \"prog_name\": \"Women's PT5 OPEN\",\n \"result_id\": 503667,\n \"position\": 1,\n \"total_time\": \"01:17:41\",\n \"result_listing\": \"http://www.triathlon.org/results/result/2015_itu_world_triathlon_grand_final_chicago/278801\"\n }\n ]\n}", "language": "json", "name": "Sample World Championship Results Output" } ] } [/block] Due to varying changes in Paratriathlon classification over the years, with the latest Paratriathlon classification system only coming into existence in 2014, some of the returned data can be more difficult to work with and makes historical comparisons much more difficult. If you have used the API to extract Paratriathlon information we'd be interested in hearing from you on our [Slack channel](http://slack.developers.triathlon.org).