Introduction
The WeVis team has been working with data related to Thai politics for many years. We found that Thai open data is scattered, lacks standardized collection sources, and is often in difficult-to-use formats such as PDFs. Therefore, we created “Politigraph” to elevate the standards of Open Data and Open API in Thailand.
System Structure
Section titled “System Structure”We use an Automation System to collect data from various official government sources, convert it into a machine-readable format, and have a team constantly reviewing its accuracy.
graph TD A[Official Government Websites] -->|Pull and Convert Data| B[Automation System] B -->|Update| C[Politigraph] D[WeVis Data Team] -->|Add, Review, Correct| C C -->|Query| E[Parliament Watch] C -->|Query| F[Other Projects] C -->|Query| G[Interested Users]
We intend to open Politigraph as a public database, allowing users and various projects to utilize the data. We believe that effective open data fosters innovation, supports civic participation, and builds a strong democratic society.
Data in Graph Format
Section titled “Data in Graph Format”Politigraph store the data in the “Graph” structure which consists of
-
“Node” representing each entity in the database (has circle symbol). Each node have they own data called “property” such as a node representing person might have properties of first name, last name, birthdate, etc.
-
“Relationship” or sometimes called edge (has arrow symbol) representing a relationship between two nodes.
graph TD A((Node A)) -->|Relationship| B((Node B))
Due to the large number of nodes and relationships in Politigraph, we need to extract data for each point of interest. We call the code writing process to select nodes and relationships of interest “query” and the returned data “response”, which is in JSON format: machine-readable and convenient for further use. However, to make it easier to visualize, we will visualize the response in this documentation in the form of a graph.
For example, if we want to know “Which vote event did Anutin Charnvirakul were agreeing with?” We can query a node representing him and the relationships that lead to the votes he were agreeing and the vote event.
บุคคลที่เกี่ยวข้องทางการเมือง เช่น สมาชิกสภา สมาชิกพรรคการเมือง ฯลฯ
- id: 4cc8dfaf-e5ce-41f4-94d3-53bf858308b4
- name: อนุทิน ชาญวีรกูล
- name_en: Anutin Charnvirakul
- image: https://politigraph.wevis.info/assets/people/อนุทิน-ชาญวีรกูล.webp
- votes:
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
- Agree
*Only showing nodes, properties, and relationships from the query see full schema
query People($where: PersonWhere, $votesWhere2: VoteWhere) { people(where: $where) { id name name_en image votes(where: $votesWhere2) { id option_en vote_events { id title nickname result start_date end_date } } }}{ "where": { "firstname_en": { "eq": "Anutin" }, "lastname_en": { "eq": "Charnvirakul" } }, "votesWhere2": { "option": { "eq": "เห็นด้วย" } }}{ "data": { "people": [ { "__typename": "Person", "id": "4cc8dfaf-e5ce-41f4-94d3-53bf858308b4", "name": "อนุทิน ชาญวีรกูล", "name_en": "Anutin Charnvirakul", "image": "https://politigraph.wevis.info/assets/people/อนุทิน-ชาญวีรกูล.webp", "votes": [ { "__typename": "Vote", "id": "fccf8c03-ddde-4284-a815-64feb4f758df", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "c5020633-bc5d-4e5e-a62f-2b5f8fa77c93", "title": "ร่างพระราชบัญญัติงบประมาณรายจ่ายประจำปีงบประมาณ พ.ศ. ๒๕๖๗ ซึ่งคณะกรรมาธิการวิสามัญพิจารณาเสร็จแล้ว", "nickname": "ร่าง พ.ร.บ. งบประมาณ 2567 (วาระ 3)", "result": "ผ่าน", "start_date": "2024-03-22", "end_date": "2024-03-22" } ] }, { "__typename": "Vote", "id": "5988f916-a50d-4331-97f3-28d49d7164a1", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "cfe71449-2dbe-4674-add8-0bdfac93d891", "title": "ร่างพระราชบัญญัติอาสาสมัครสาธารณสุขประจำหมู่บ้าน พ.ศ. .... วาระที่ ๑", "nickname": null, "result": "ผ่าน", "start_date": "2025-09-05", "end_date": "2025-09-05" } ] }, { "__typename": "Vote", "id": "990f0234-30fb-4bde-8126-f0212fd53538", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "18c9a969-756a-49b6-a927-a52922e58f86", "title": "ร่างพระราชบัญญัติองค์กรจัดสรรคลื่นความถี่และกำกับการประกอบกิจการวิทยุกระจายเสียง วิทยุโทรทัศน์ และกิจการโทรคมนาคม (ฉบับที่ ..) พ.ศ. .... วาระที่ ๑", "nickname": null, "result": "ผ่าน", "start_date": "2025-09-05", "end_date": "2025-09-05" } ] }, { "__typename": "Vote", "id": "1cffb467-ee37-4215-877b-6d1e22dcf200", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "e38ffbce-8a25-482d-a110-49045ee454fd", "title": "ร่างพระราชบัญญัติการประกอบกิจการกระจายเสียงและกิจการโทรทัศน์ (ฉบับที่ ..) พ.ศ. .... วาระที่ ๑", "nickname": null, "result": "ผ่าน", "start_date": "2025-09-05", "end_date": "2025-09-05" } ] }, { "__typename": "Vote", "id": "78b7458d-05eb-4078-93a4-544bbfd8743f", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "73347889-f837-435e-ad5f-423ee8923d7a", "title": "ร่างพระราชบัญญัติการรายงานและเปิดเผยข้อมูลการปล่อยและเคลื่อนย้ายสารมลพิษ พ.ศ. .... วาระที่ ๑", "nickname": null, "result": "ผ่าน", "start_date": "2025-09-05", "end_date": "2025-09-05" } ] }, { "__typename": "Vote", "id": "3fa6beb7-26cc-4abc-b244-2270c8c2c67e", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "3bfeee27-116b-40d0-9cfa-e61c09ea01cd", "title": "ร่างพระราชบัญญัติงบประมาณรายจ่ายประจำปีงบประมาณ พ.ศ. 2566", "nickname": "ร่าง พ.ร.บ. งบประมาณ 2566 (วาระ 3)", "result": null, "start_date": "2022-08-23", "end_date": "2022-08-23" } ] }, { "__typename": "Vote", "id": "6528ad1c-b938-44b5-8d12-138a2e1f244a", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "465de12e-5f5f-42ad-a3fe-4269520fdc9c", "title": "ร่างพระราชบัญญัติงบประมาณรายจ่ายประจำปีงบประมาณ พ.ศ. 2565", "nickname": "ร่าง พ.ร.บ. งบประมาณ 2565 (วาระ 3)", "result": null, "start_date": "2021-08-21", "end_date": "2021-08-21" } ] }, { "__typename": "Vote", "id": "8368ed80-8756-4c51-9fb8-4beae629c0f7", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "066eed5a-812e-4808-b3d4-f2c439f61605", "title": "ร่างพระราชบัญญัติงบประมาณรายจ่ายประจำปีงบประมาณ พ.ศ. 2565", "nickname": "ร่าง พ.ร.บ. งบประมาณ 2565 (วาระ 1)", "result": null, "start_date": "2021-06-02", "end_date": "2021-06-02" } ] }, { "__typename": "Vote", "id": "4cb81dbf-2422-42b5-bef7-1dab775cf370", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "d92c13ee-adc0-4285-a5e2-7f03b65a4942", "title": "ร่างพระราชบัญญัติยาเสพติดให้โทษ", "nickname": "ร่าง พ.ร.บ. ยาเสพติดให้โทษ (วาระ 1)", "result": null, "start_date": "2020-12-16", "end_date": "2020-12-16" } ] }, { "__typename": "Vote", "id": "4c3f49f0-c708-4f81-ba7a-a2afa1a3bed3", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "2a26a32f-ceb8-4a4c-95c5-ef75158e8cc1", "title": "ร่างพระราชบัญญัติหอการค้า", "nickname": "ร่าง พ.ร.บ. หอการค้า (วาระ 1)", "result": null, "start_date": "2020-11-26", "end_date": "2020-11-26" } ] }, { "__typename": "Vote", "id": "5b2b5408-2fcb-4114-8716-0d70eeb172b5", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "b8b0694c-0e98-47de-a8a2-529c17bb8fcf", "title": "ร่างพระราชบัญญัติงบประมาณรายจ่ายประจำปีงบประมาณ พ.ศ. 2563", "nickname": "ร่าง พ.ร.บ. งบประมาณ 2563 (วาระ 3) รอบที่ 1", "result": null, "start_date": "2020-01-11", "end_date": "2020-01-11" } ] }, { "__typename": "Vote", "id": "84d5e18d-6a74-4aec-93fa-073d9f581817", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "a55d0ad7-1211-4a21-a3cc-1f9c4f8f7f0d", "title": "ร่างพระราชบัญญัติว่าด้วยการปรับเป็นพินัย พ.ศ. …. วาระที่ ๑", "nickname": "ร่าง พ.ร.บ. การปรับเป็นพินัย (วาระ 1)", "result": "ผ่าน", "start_date": "2022-02-08", "end_date": "2022-02-08" } ] }, { "__typename": "Vote", "id": "0aae9306-9368-49ad-a72b-876a55760d81", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "2a6f77d9-81a1-4042-93ab-9ca9ecd8c763", "title": "ร่างพระราชบัญญัติควบคุมยุทธภัณฑ์ (ฉบับที่ ..) พ.ศ. .... ซึ่งคณะกรรมาธิการวิสามัญพิจารณาเสร็จแล้ว วาระที่ ๓", "nickname": null, "result": null, "start_date": "2022-01-19", "end_date": "2022-01-19" } ] }, { "__typename": "Vote", "id": "7ed52899-04a9-4e55-9ba9-20c97fca96a1", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "6392f04e-69c4-4e62-8a55-40045bf2aa91", "title": "ร่างพระราชบัญญัติกัญชา กัญชง พ.ศ. ....", "nickname": null, "result": null, "start_date": "2022-06-08", "end_date": "2022-06-08" } ] }, { "__typename": "Vote", "id": "7a8bf3cb-8a85-4de9-b81f-57489ad875b0", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "cfa662e2-41ad-4026-8ae9-6c4b704b6cb5", "title": "ร่างพระราชบัญญัติกองทุนเงินให้กู้ยืมเพื่อการศึกษา (ฉบับที่ ..) พ.ศ. …. วาระที่ ๑", "nickname": null, "result": null, "start_date": "2022-01-25", "end_date": "2022-01-25" } ] }, { "__typename": "Vote", "id": "19acdece-9d2f-4cb5-b9ca-efbb9f962136", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "f5fba3f4-67f0-4b52-b4b3-9f044d32f6a5", "title": "ร่างพระราชบัญญัติยกเลิกกฎหมายบางฉบับที่หมดความจำเป็นหรือซ้ำซ้อนกับกฎหมายอื่น พ.ศ. .... ซึ่งคณะกรรมาธิการวิสามัญพิจารณาเสร็จแล้ว วาระที่ ๓", "nickname": null, "result": null, "start_date": "2022-01-19", "end_date": "2022-01-19" } ] }, { "__typename": "Vote", "id": "240735aa-2ba6-4be5-82be-0e71cd3236d2", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "6fc457fe-4bf9-431a-a3a6-ccde30c47dae", "title": "ร่างพระราชบัญญัติบริษัทมหาชนจำกัด (ฉบับที่ ..) พ.ศ. .... วาระที่ ๑", "nickname": null, "result": null, "start_date": "2021-11-24", "end_date": "2021-11-24" } ] }, { "__typename": "Vote", "id": "ad062e5d-5da2-4a43-908d-a23667860d9b", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "f04a92e3-71e3-4f6b-9ccf-59b9e03e830f", "title": "ร่างพระราชบัญญัติสร้างเสริมสังคมสันติสุข พ.ศ. .... ซึ่ง นายปรีดา บุญเพลิง กับคณะ เป็นผู้เสนอ", "nickname": null, "result": "ผ่าน", "start_date": "2025-07-16", "end_date": "2025-07-16" } ] }, { "__typename": "Vote", "id": "f1fad3cb-2f89-48dc-bf7e-0f546b78a0c8", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "d3092abc-fc61-4118-b2af-b0027bcda62c", "title": "ร่างพระราชบัญญัติสร้างเสริมสังคมสันติสุข พ.ศ. .... ซึ่ง นายอนุทิน ชาญวีรกูล กับคณะ เป็นผู้เสนอ", "nickname": null, "result": "ผ่าน", "start_date": "2025-07-16", "end_date": "2025-07-16" } ] }, { "__typename": "Vote", "id": "e3d65832-77b5-4831-b507-d81525dfa9aa", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "4b9b1521-4591-4d93-8360-88ffd47276d6", "title": "ร่างพระราชบัญญัติสร้างเสริมสังคมสันติสุข พ.ศ. .... ซึ่ง นายวิชัย สุดสวาสดิ์ กับคณะ เป็นผู้เสนอ", "nickname": null, "result": "ผ่าน", "start_date": "2025-07-16", "end_date": "2025-07-16" } ] }, { "__typename": "Vote", "id": "6cac00cf-4ceb-460f-8885-27784dae9fb6", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "14e953ff-d04d-4368-8e2f-4853dcbeebe8", "title": "ร่างพระราชบัญญัติงบประมาณรายจ่ายประจำปีงบประมาณ พ.ศ. ๒๕๖๙", "nickname": null, "result": "ผ่าน", "start_date": "2025-05-31", "end_date": "2025-05-31" } ] }, { "__typename": "Vote", "id": "818d9bd4-4d63-49f6-9809-8b03eb5d642d", "option_en": "Agree", "vote_events": [ { "__typename": "VoteEvent", "id": "21e7395c-1d04-4069-b180-1bf5735adfea", "title": "ร่างพระราชบัญญัติงบประมาณรายจ่ายประจำปีงบประมาณ พ.ศ. ๒๕๖๘", "nickname": null, "result": "ผ่าน", "start_date": "2024-06-21", "end_date": "2024-06-21" } ] } ] } ] }}