Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

There is a BLADE option on the Riding tab that generates a set of riding data that can be used to help generate content for riding profile pages. It is intended to provide a set of data that can be plugged in to a template.

To trigger this Riding Profile output:

  • In the BLADE module select the Riding tab

  • In the Riding URL Generator section

 Sample output json fragment
 {
      "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"
        },
        ...
      ]
    }

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

This riding profile result should almost always identify someone as being the incumbent.

  • If a current candidate is flagged as the incumbent in the system

    • then use their name and party info

    • otherwise look for the previous winner

      • in a by-election in the same riding (if one exists)

      • in the last general election in same riding

  • Except when the riding previous party is assigned to the Vacant Party (VAC)

    • then the incumbent will be blank

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.

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.

Candidates

There are candidates listed in the results with each riding as well that identify the current candidates. The first candidate will be the incumbent if there is one. The rest of the candidates will be sorted in Party priority order.

  • No labels