{
  "format": "dataset-manifest/1",
  "slug": "legislative-insights-network",
  "version": 1,
  "seed": "legislative-insights-network:1",
  "spec": {
    "format": "dataset/1",
    "slug": "legislative-insights-network",
    "name": "Legislative Insights Network",
    "tagline": "User interactions and legislation proposals within a network of lawmakers, including comments and tags.",
    "description": "The Legislative Insights Network is a synthetic dataset designed to model the interactions within a platform for lawmakers. This dataset captures the dynamics of proposing new legislation, tagging those proposals for easier searchability, and tracking user engagement through comments and votes. The structure reflects a graph-edges model, capturing the relationships between users, legislation, comments, and tags. Developers can explore how different proposals attract varying levels of engagement, with some legislation sparking rich discussions and others receiving minimal attention. This dataset is especially useful for practicing SQL queries, providing insights into user interactions and legislative processes. It allows users to analyze trends in voting patterns, comment frequency, and the popularity of different legislative topics. The dataset is fully synthetic, crafted to provide a realistic but manageable volume of data for effective analysis.",
    "domain": "saas",
    "shape": "graph-edges",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "legislation",
      "lawmakers",
      "user engagement",
      "comments",
      "votes",
      "tags",
      "proposals"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "users": {
        "description": "This table contains information about users on the platform, including lawmakers and constituents. Each user can engage with legislation through comments and votes.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each user."
          },
          "full_name": {
            "kind": "fullName",
            "description": "Full name of the user.",
            "nullable": true,
            "when": {
              "column": "role",
              "in": [
                "lawmaker"
              ]
            }
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "User's email address.",
            "nullable": true
          },
          "role": {
            "kind": "enum",
            "values": [
              "lawmaker",
              "constituent"
            ],
            "description": "Role of the user on the platform."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date and time the user joined the platform.",
            "dayProfile": "waking"
          }
        }
      },
      "legislation": {
        "description": "This table holds details about legislative proposals made on the platform. Each proposal can be tagged and has associated interaction data.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each legislative proposal."
          },
          "title": {
            "kind": "sentence",
            "min": 5,
            "max": 50,
            "description": "Title of the legislative proposal.",
            "nullable": true
          },
          "description": {
            "kind": "paragraph",
            "min": 20,
            "max": 300,
            "description": "Detailed description of the legislative proposal.",
            "nullable": true
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "Identifier of the user proposing the legislation."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date and time the proposal was created.",
            "dayProfile": "business",
            "trend": "growing"
          }
        }
      },
      "comments": {
        "description": "This table records comments made on legislative proposals. Each comment is linked to a specific proposal and a user.",
        "rows": 400,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each comment."
          },
          "legislation_id": {
            "kind": "fk",
            "ref": "legislation.id",
            "description": "Identifier of the legislative proposal being commented on."
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "Identifier of the user making the comment."
          },
          "content": {
            "kind": "sentence",
            "min": 10,
            "max": 200,
            "description": "Content of the comment.",
            "nullable": true
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date and time the comment was made.",
            "dayProfile": "waking"
          }
        }
      },
      "tags": {
        "description": "This table contains tags associated with legislative proposals for easier searchability. Tags help categorize proposals by topic.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each tag."
          },
          "name": {
            "kind": "sentence",
            "min": 1,
            "max": 15,
            "description": "Name of the tag.",
            "nullable": true
          },
          "legislation_id": {
            "kind": "fk",
            "ref": "legislation.id",
            "description": "Identifier of the legislative proposal associated with the tag."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "timestamped",
      "nullable"
    ],
    "analysisQuestions": [
      "What types of legislative proposals attract the most comments?",
      "How does user engagement vary by the role of the user?",
      "Which tags are most commonly associated with successful proposals?",
      "What is the average time taken for a proposal to receive its first comment?"
    ],
    "suggestedQueries": [
      {
        "title": "Retrieve all legislation proposed by a specific user",
        "sql": "SELECT * FROM legislation WHERE user_id = ?",
        "dialect": "postgres"
      },
      {
        "title": "Count comments per legislative proposal",
        "sql": "SELECT legislation_id, COUNT(*) FROM comments GROUP BY legislation_id",
        "dialect": "postgres"
      },
      {
        "title": "Find the most popular tags used in legislation",
        "sql": "SELECT name, COUNT(*) FROM tags GROUP BY name ORDER BY COUNT(*) DESC",
        "dialect": "postgres"
      },
      {
        "title": "Get user engagement statistics over time",
        "sql": "SELECT created_at::date, COUNT(*) FROM comments GROUP BY created_at::date",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Teaching SQL with Real-World Data",
        "body": "Educators can use this dataset to teach students SQL by allowing them to practice writing queries that analyze legislative engagement, user interactions, and proposal trends. The structured nature of the data helps students learn to join tables, aggregate data, and extract meaningful insights."
      },
      {
        "title": "Developing Analytics Tools for Legislative Tracking",
        "body": "Developers can leverage this dataset to build analytics dashboards that visualize user engagement with legislative proposals. By querying the data, they can create metrics around comment frequency, popular tags, and user activity, helping policymakers understand public sentiment."
      },
      {
        "title": "Conducting Research on Legislative Engagement",
        "body": "Researchers can utilize this dataset to explore patterns in legislative engagement among users of different roles. They can analyze how comments and votes vary based on user types, gaining insights into how constituents and lawmakers interact on the platform."
      }
    ]
  },
  "counts": {
    "users": 150,
    "legislation": 300,
    "comments": 400,
    "tags": 200
  },
  "stats": {
    "users": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "full_name": {
          "nulls": 76,
          "distinct": 74,
          "min": "Amir Yilmaz",
          "max": "Zoe Weber"
        },
        "email": {
          "nulls": 81,
          "distinct": 69
        },
        "role": {
          "nulls": 0,
          "distinct": 2,
          "min": "constituent",
          "max": "lawmaker"
        },
        "created_at": {
          "nulls": 0,
          "distinct": 150,
          "min": "2023-01-02 10:08:17",
          "max": "2023-12-31 14:28:23"
        }
      }
    },
    "legislation": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "title": {
          "nulls": 30,
          "distinct": 269
        },
        "description": {
          "nulls": 33,
          "distinct": 267
        },
        "user_id": {
          "nulls": 0,
          "distinct": 131,
          "min": 1,
          "max": 150
        },
        "created_at": {
          "nulls": 0,
          "distinct": 300,
          "min": "2023-01-03 10:16:54",
          "max": "2023-12-31 12:52:49"
        }
      }
    },
    "comments": {
      "rows": 400,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 400,
          "min": 1,
          "max": 400
        },
        "legislation_id": {
          "nulls": 0,
          "distinct": 206,
          "min": 3,
          "max": 299
        },
        "user_id": {
          "nulls": 0,
          "distinct": 137,
          "min": 1,
          "max": 150
        },
        "content": {
          "nulls": 54,
          "distinct": 346
        },
        "created_at": {
          "nulls": 0,
          "distinct": 400,
          "min": "2023-01-01 12:22:13",
          "max": "2023-12-31 19:42:47"
        }
      }
    },
    "tags": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "name": {
          "nulls": 22,
          "distinct": 178
        },
        "legislation_id": {
          "nulls": 0,
          "distinct": 148,
          "min": 1,
          "max": 299
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/users.csv",
      "format": "csv",
      "table": "users",
      "key": "datasets/legislative-insights-network/v1/csv/users.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/csv/users.csv",
      "bytes": 7958,
      "sha256": "b99b6970baf4edbfb2441e667724435aa87b3500739bfb270b5cef83fd0d5016",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/legislation.csv",
      "format": "csv",
      "table": "legislation",
      "key": "datasets/legislative-insights-network/v1/csv/legislation.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/csv/legislation.csv",
      "bytes": 68992,
      "sha256": "d9151887d6bb298214f1db8b61f7e06b6ae4dbb76109bffc0952bd9d485d54bd",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/comments.csv",
      "format": "csv",
      "table": "comments",
      "key": "datasets/legislative-insights-network/v1/csv/comments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/csv/comments.csv",
      "bytes": 32353,
      "sha256": "e9c937d290bb3a232fa65dc54d8c23d0f0507c064a96f3ebd55820ecdd15ed7b",
      "rows": 400,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/tags.csv",
      "format": "csv",
      "table": "tags",
      "key": "datasets/legislative-insights-network/v1/csv/tags.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/csv/tags.csv",
      "bytes": 11776,
      "sha256": "ee150d544512b3d9706df3e66c90519f84bd7e03c65c2c8ceff70f2784fbaf27",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "legislative-insights-network.json",
      "format": "json",
      "table": null,
      "key": "datasets/legislative-insights-network/v1/legislative-insights-network.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/legislative-insights-network.json",
      "bytes": 225901,
      "sha256": "7620e8060eda60238c20fb5a311c66a702e094ec9c618a0f41aaf3ea9f47803c",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/legislative-insights-network/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/sql/postgres.sql",
      "bytes": 138470,
      "sha256": "df2bc99185f6ab72f8071208018d78990b34ab35ee07e298d456803fabca79cc",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/legislative-insights-network/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/sql/mysql.sql",
      "bytes": 138036,
      "sha256": "3fbc40c54b058e19652ee2089ad36f8da365727d5df1b18c661ef50263416f3c",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/legislative-insights-network/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/sql/mssql.sql",
      "bytes": 140518,
      "sha256": "7bec28a9b6b97ecfa5ae000b7a20763f4840cd8634e6e385556b6abce42c8ecb",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/legislative-insights-network/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/sql/sqlite.sql",
      "bytes": 137865,
      "sha256": "1d6709a24f4c94a5e750d8785d0374075ac6d7ed294d748dd9759b8cb2d803f1",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/legislative-insights-network/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/prisma/seed.ts",
      "bytes": 201535,
      "sha256": "afac9399a8b67adf837ae2fb03c0d74623bc662ec6c500dbd89a2154845841ad",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/legislative-insights-network/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legislative-insights-network/v1/django/fixtures.json",
      "bytes": 268925,
      "sha256": "0d14647dda2c03a8bfee8b0c6ccbe3026598dc23371cd11526be45ecb9fd4f80",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788768445783,
  "updatedAt": 1788768445783
}
