Grand Debat API
This module provides data types for the French “Grand Debat National” dataset, a large-scale public consultation conducted in France in 2019.
The dataset contains citizen contributions (opinions and responses) to questions across four main themes: ecological transition, taxation, democracy and citizenship, and state organization and public services.
Data Classes
- class datamaestro_text.data.debate.granddebat.GrandDebatEntry(id: str, reference: str, title: str, created_at: str, published_at: str, updated_at: str | None, trashed: bool, trashed_status: str | None, author_id: str, author_type: str, author_zip_code: str, responses: ~typing.List[~datamaestro_text.data.debate.granddebat.GrandDebatResponse] = <factory>)
Bases:
objectAn entry (contribution) in the Grand Débat National dataset
Represents a single contribution with metadata (author info, timestamps) and a list of responses to questions.
- class datamaestro_text.data.debate.granddebat.GrandDebatResponse(question_id: str, question_title: str, value: str | None, formatted_value: str | None)
Bases:
objectA response to a question in the Grand Débat National
Represents a response to a specific question in the consultation.
File Access
- XPM Configdatamaestro_text.data.debate.granddebat.GrandDebatFile(*, id, path)
Bases:
FileA Grand Débat National JSONL file with iteration support
- id: str
The unique (sub-)dataset ID
- path: Path
The path of the file
JSONL file containing Grand Debat contributions. Supports iteration over entries.
Example usage:
from datamaestro import prepare_dataset
# Load Grand Debat dataset
gd = prepare_dataset("fr.granddebat.democratie")
# Iterate over contributions
for entry in gd:
print(f"Contribution {entry.id}: {entry.title}")
print(f" Author type: {entry.author_type}")
print(f" ZIP code: {entry.author_zip_code}")
# Access responses to questions
for response in entry.responses:
print(f" Q: {response.question_title}")
print(f" A: {response.formatted_value}")