# Introduction The [WeVis](https://wevis.info) 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. > **Caution: We cannot be held responsible for any errors or consequences arising from the use of this data.** > > We are not a government agency that directly owns and is responsible for publishing this data. > If you have any suggestions or feedback, please email team@wevis.info > or create a new issue on the project's [GitHub](https://github.com/wevisdemo/politigraph). ## System Structure For data that the government publishes through official online channels in a format that supports regular collection, we use an [Automation System](https://github.com/wevisdemo/politigraph-automation) to collect and convert the data into a machine-readable format, with a team reviewing its accuracy. For data that the government does not publish through a regular channel or update pattern, we collect and update it on an ad-hoc basis as the relevant situation arises. See the full list of regularly updated and ad-hoc data at [Data Sources and Limitations](https://politigraph.wevis.info/en/data-source) ```mermaid graph TD A[Official Government Websites] -->|Pulled and converted by| B[Automation System] D[Other Sources] -->|Pulled and converted by| E[Ad-hoc Research Team] B -->|Input| F E -->|Input| F subgraph P[Politigraph] F[Accuracy Review Team] --> G[Published] end G -->|Output| H[Parliament Watch] G -->|Output| I[Other Projects] G -->|Output| J[Interested Users] G -->|Output| K[AI Agent] style P fill:#1c7ed620,stroke:#1c7ed6,stroke-width:1px ``` We intend to open Politigraph as a public database, allowing users, various projects and AI agents to utilize the data. We believe that effective open data fosters innovation, supports civic participation, and builds a strong democratic society. > **Tip: For general users interested in the work of the Thai Parliament** > > We recommend using [Parliament Watch](https://parliamentwatch.wevis.info), > a website that displays data from Politigraph in an easy-to-understand format. ## Data in Graph Format Politigraph store the data in the **"Graph"** structure which consists of 1. **"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. 2. **"Relationship"** or sometimes called edge (has arrow symbol) representing a relationship between two nodes. ```mermaid 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. ```graphql query People { people( where: { firstname_en: { eq: "Anutin" } lastname_en: { eq: "Charnvirakul" } } ) { id name name_en image votes(where: { option: { eq: "เห็นด้วย" } }) { id option_en vote_event { id title nickname result start_date end_date } } } } ``` [Run this query in the playground](https://politigraph.wevis.info/graphql?explorerURLState=N4IgJg9gxgrgtgUwHYBcQC4QEcYIE4CeABAAoIQAOANgkcADpJFEXnUIAUjzzA7gBb4E6Otx7MAZgEs8AZxRIAhogD6yEcCIIsI+iACCSGCilI9RAL5jxVRfKWr1dLTqJ6Awv0V4kANxmKANYwVOZWTDzhzACUohHMUmDWRA4IyalqZvFEUnCKAOZp2b4QKAiyHAJCGkSUJhBINdq6IIACcIDUcIDicICYcIAocICScIDkcIBEcGGWsQzZCUlTtRT1SJnJzCVlar7IKHHi4onLPCYoNPvMSFJQgaknRHjlISjX8t4oKmCKZdfIYK-vRTuWySiAKQFhAABoQL5vFJFAAjGiyDAgEAWIA) You can also visit [Explore](https://politigraph.wevis.info/en/explore) to browse the data in Politigraph without writing any code.