Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleSample output json fragment
Code Block
 {
      "id": 1,
      "name": "Ajax",
      "broadcastName": "Ajax",
      "line1": "Ajax",
      "line2": "",
      "candidateCount": 7,
      "candidateShowCount": 3,
      "pollsReported": 42,
      "pollsTotal": 42,
      "pollsClosingTime": null,
      "isPollsClosed": null,
      "pollsClosingTime24": null,
      "regionName": "GTA",
      "previousPartyName": "Liberal",
      "previousPartyShortName": "LIB",
      "previousPartyDatafeedChar": "LIB",
      "isNew": true,
      "votes": 48860,
      "electors": null,
      "mailBallots": null,
      "modifiedDate": "2022-02-25T15:55:35Z",
      "incumbentName": "Joe Dickson",
      "incumbentFirstName": "Joe",
      "incumbentLastName": "Dickson",
      "incumbentSinceYear": null,
      "incumbentPartyName": "Ontario Liberal Party",
      "incumbentPartyCode": "LIB",
      "incumbentLastVotes": 26257,
      "incumbentLastPercent": 51.06,
      "candidates": [
        {
          "name": "Joe Dickson",
          "firstName": "Joe",
          "lastName": "Dickson",
          "isIncumbent": true,
          "incumbentSinceYear": null,
          "electedBefore": true,
          "isElected": false,
          "votes": 12607,
          "percent": 25.8,
          "partyName": "Ontario Liberal Party",
          "partyDatafeedChar": "LIB",
          "partyCode": "LIB",
          "lastVotes": 26257,
          "lastPercent": 51.06,
          "modifiedDate": "2022-04-13T14:22:09Z"
        },
        {
          "name": "Rod Phillips",
          "firstName": "Rod",
          "lastName": "Phillips",
          "isIncumbent": false,
          "incumbentSinceYear": null,
          "electedBefore": false,
          "isElected": true,
          "votes": 19078,
          "percent": 39.05,
          "partyName": "PC Party of Ontario",
          "partyDatafeedChar": "PC",
          "partyCode": "PC",
          "lastVotes": 0,
          "lastPercent": 0.0,
          "modifiedDate": "2019-04-05T02:04:28Z"
        },
        {
          "name": "Monique Hughes",
          "firstName": "Monique",
          "lastName": "Hughes",
          "isIncumbent": false,
          "incumbentSinceYear": null,
          "electedBefore": false,
          "isElected": false,
          "votes": 15130,
          "percent": 30.97,
          "partyName": "Ontario NDP",
          "partyDatafeedChar": "NDP",
          "partyCode": "NDP",
          "lastVotes": 0,
          "lastPercent": 0.0,
          "modifiedDate": "2019-03-08T21:04:51Z"
        },
        {
          "name": "Stephen Leahy",
          "firstName": "Stephen",
          "lastName": "Leahy",
          "isIncumbent": false,
          "incumbentSinceYear": null,
          "electedBefore": false,
          "isElected": false,
          "votes": 1224,
          "percent": 2.51,
          "partyName": "Green Party of Ontario",
          "partyDatafeedChar": "GRN",
          "partyCode": "GRN",
          "lastVotes": 0,
          "lastPercent": 0.0,
          "modifiedDate": "2019-03-08T21:04:51Z"
        },
        ...
      ]
    }

Incumbent Fields

The incumbent fields of the riding object are determined using logic that follows the following rules:

...

If the current incumbent was elected as part of a different party then they are currently running as - the profile will identify them with their current party. As an example in 2018 Belinda Karahalios won as a Progressive Conservative and remained for full term as the PC incumbent. However she is running as a New Blue candidate in the next 2022 election. The profile output in this case will show Belinda as a New Blue incumbent for the Cambridge riding.

Previous Party Fields

The Previous Party (Name, Short Name and Datafeed Char) are pulled by using the Incumbent Party field of the current year’s ridings.

Riding Order

The ridings are listed in riding number order. This is usually happens to match alphabetical order in provincial elections but it doesn’t in the Federal elections.

...