https://ppvs.media.mit.edu

Swagger

add your self and vote

Create User

curl -X POST -H "Content-Type: application/json" -d '{"name":"API_USER"}' https://ppvs.media.mit.edu/api/user
{"uuid":"8a5a2e8c-d0b2-450d-a2b6-873eb581380c","name":"API_USER","created_at":"2024-09-05T09:58:16.648455223-04:00"}

Get Session List

curl https://ppvs.media.mit.edu/api/sessions | jq .
[
  {
    "id": 2,
    "title": "[demo] Cambridge Participatory Budgeting 2024",
    "created_at": "2024-04-14T13:48:43.796175Z",
    "locked": false
  },
  {
    "id": 3,
    "title": "Cambridge PB w/ Junior High School Students",
    "created_at": "2024-04-14T13:48:43.801083Z",
    "locked": true
  },
  {
    "id": 1,
    "title": "Test Family Dinner",
    "created_at": "2024-04-14T13:48:43.762508Z",
    "locked": true
  }
]

Get Session

curl https://ppvs.media.mit.edu/api/session/2 | jq .
{
  "id": 2,
  "title": "[demo] Cambridge Participatory Budgeting 2024",
  "owner_id": "a6d13d5f-9bc1-4141-8150-f019f0b8a4fa",
  "owner_name": "admin",
  "topic_id": "9a013c63-cf30-486e-92aa-967a4b96cdf3",
  "topic_title": "Cambridge Participatory Budgeting 2024",
  "group_id": "bff8831e-4085-4064-bca9-4618151275fb",
  "group_name": "OPEN",
  "description": {
    "String": "Cambridge Participatory Budgeting 2024",
    "Valid": true
  },
  "created_at": "2024-04-14T13:48:43.796175Z",
  "locked": false
}

Join Group

curl -X POST https://ppvs.media.mit.edu/api/group/join -H "Content-Type: application/json" -d '{"group": "bff8831e-4085-4064-bca9-4618151275fb", "user": "8a5a2e8c-d0b2-450d-a2b6-873eb581380c" }'
{"status":"ok"}

Get Group/Topic

curl https://ppvs.media.mit.edu/api/group/bff8831e-4085-4064-bca9-4618151275fb | jq .
{
  "created_at": "2024-04-14T13:48:43.686206Z",
  "id": "bff8831e-4085-4064-bca9-4618151275fb",
  "name": "OPEN"
}
curl https://ppvs.media.mit.edu/api/topic/9a013c63-cf30-486e-92aa-967a4b96cdf3 | jq .
{
  "created_at": "2024-04-14T13:48:43.793913Z",
  "id": "9a013c63-cf30-486e-92aa-967a4b96cdf3",
  "title": "Cambridge Participatory Budgeting 2024"
}

See Child (Through Node Info)

type variant meaning
0 tree it’s a tree in the network
1 leaf it’s the end node of the network
sub-type variant meaning
0 delegate group / delegate
1 policy topic / policy
curl https://ppvs.media.mit.edu/api/node/9a013c63-cf30-486e-92aa-967a4b96cdf3 | jq .
{
  "child": [
    {
      "uuid": "c28421c2-2d3d-4b58-a3a1-a5c7d3f19c23",
      "type": 1,
      "sub_type": 1,
      "label": "Transportation, Streets and Sidewalks",
      "created_at": "2024-04-14T13:48:43.803756Z"
    },
    {
      "uuid": "cbe3bdd3-ebe8-41a0-8334-cb9ba5ccc653",
      "type": 1,
      "sub_type": 1,
      "label": "Community Resources",
      "created_at": "2024-04-14T13:48:43.806286Z"
    },
    {
      "uuid": "f4d1bbba-5fe6-4dad-b5d6-d68c9fb0262e",
      "type": 1,
      "sub_type": 1,
      "label": "Facilities, Parks, and Recreation",
      "created_at": "2024-04-14T13:48:43.80876Z"
    },
    {
      "uuid": "459a001b-3ae9-4f0c-9e8c-82387a4486d1",
      "type": 1,
      "sub_type": 1,
      "label": "Environment",
      "created_at": "2024-04-14T13:48:43.811765Z"
    }
  ],
  "node": {
    "uuid": "9a013c63-cf30-486e-92aa-967a4b96cdf3",
    "type": 1,
    "sub_type": 1,
    "label": "Cambridge Participatory Budgeting 2024",
    "description": {
      "String": "https://pb.cambridgema.gov/",
      "Valid": true
    },
    "created_at": "2024-04-14T13:48:43.793913Z"
  }
}
curl https://ppvs.media.mit.edu/api/node/459a001b-3ae9-4f0c-9e8c-82387a4486d1 | jq .
{
  "child": [
    {
      "uuid": "81dca7b5-de5f-4e56-9904-19e48f7a82d5",
      "type": 0,
      "sub_type": 1,
      "label": "Smart Recycling and Trash Compactors",
      "created_at": "2024-04-14T13:48:43.823922Z"
    },
    {
      "uuid": "82ca883d-3091-45e4-a670-66b2e2813c88",
      "type": 0,
      "sub_type": 1,
      "label": "Tree and Community Garden Engagement Coordinator",
      "created_at": "2024-04-14T13:48:43.831389Z"
    },
    {
      "uuid": "39f273d2-63ca-4a56-8542-c02bc9fcefaa",
      "type": 0,
      "sub_type": 1,
      "label": "Expanding Space for Street Trees",
      "created_at": "2024-04-14T13:48:43.836508Z"
    },
    {
      "uuid": "4356dbc4-cec2-44b0-8732-a27b4b4e075e",
      "type": 0,
      "sub_type": 1,
      "label": "Smart Traps for Rat Reduction",
      "created_at": "2024-04-14T13:48:43.852145Z"
    },
    {
      "uuid": "9a4e599c-f96d-4a06-bc3c-8d5c3d51c5cb",
      "type": 0,
      "sub_type": 1,
      "label": "Electric Vehicle Chargers",
      "created_at": "2024-04-14T13:48:43.857137Z"
    }
  ],
  "node": {
    "uuid": "459a001b-3ae9-4f0c-9e8c-82387a4486d1",
    "type": 1,
    "sub_type": 1,
    "label": "Environment",
    "description": {
      "String": "Environment",
      "Valid": true
    },
    "created_at": "2024-04-14T13:48:43.811765Z"
  }
}

Vote

curl https://ppvs.media.mit.edu/api/vote -X POST -H "Content-Type: application/json" -d '{"session":2 , "source":"39f273d2-63ca-4a56-8542-c02bc9fcefaa" , "destination":"9a4e599c-f96d-4a06-bc3c-8d5c3d51c5cb" , "value":0.4 }'
{"voted_at":"2024-09-05T10:08:16.055745952-04:00"}

Research Considerations

COUHES (MIT’s IRB Process) <2024-09-06 Fri>

We have obtained exempt status, including approval from Kent.

Application title: Sentiment Analysis through Propagational Proxy Voting

Exempt Category 2 - Educational Testing, Surveys, Interviews or Observation Research involving surveys, interviews, educational tests or observation of public behavior with adults or children and disclosure of the subjects’ responses outside the research could not reasonably place the subjects at risk for criminal or civil liability or be damaging to the subjects’ financial standing, employability, educational advancement, or reputation. Research activities with children must be limited to educational tests or observation of public behavior and cannot include direct intervention by the investigator. 45 CFR 46.104(d)(2)

Archive

Injection

a wild injection attempt!

ppvs_injection.png

why?

Date: 2024-09-05 Thu 06:21