{
  "format": "dataset-manifest/1",
  "slug": "legal-insights-repository",
  "version": 1,
  "seed": "legal-insights-repository:1",
  "spec": {
    "format": "dataset/1",
    "slug": "legal-insights-repository",
    "name": "Legal Insights Repository",
    "tagline": "Legal topics, jurisdictions, case opinions, judges, and user comments gathered from a legal insights repository.",
    "description": "The Legal Insights Repository is a synthetic dataset designed to provide a wealth of information about laws, legal maxims, and judicial opinions. It serves as a resource for legal professionals and enthusiasts looking to explore various law sections and jurisdictions. The dataset comprises multiple interrelated tables that include legal topics, jurisdictions, case opinions, judges, and user comments. Each table captures different aspects of legal discourse, allowing users to analyze trends in legal interactions, popular topics, and the engagement levels of various jurisdictions. By working with this dataset, users can practice data analysis techniques, develop ETL pipelines, and enhance their understanding of legal information structures. The dataset is synthetic, ensuring a safe and flexible environment for experimentation.",
    "domain": "media",
    "shape": "slowly-changing",
    "useCases": [
      "etl-pipelines",
      "teaching"
    ],
    "keywords": [
      "law",
      "legal",
      "jurisdiction",
      "case opinions",
      "judges",
      "comments",
      "legal maxims",
      "analytics"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "legal_topics": {
        "description": "This table contains various legal topics that users can explore, along with their popularity metrics. Each topic connects to jurisdictions and case opinions.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each legal topic."
          },
          "title": {
            "kind": "words",
            "max": 10,
            "description": "The title of the legal topic."
          },
          "description": {
            "kind": "paragraph",
            "max": 500,
            "description": "A brief overview of the legal topic.",
            "nullable": true
          },
          "popularity": {
            "kind": "int",
            "min": 0,
            "max": 1000,
            "description": "A measure of how frequently the topic is accessed.",
            "nullable": true
          }
        }
      },
      "jurisdictions": {
        "description": "This table lists the different jurisdictions within which legal topics apply, linking to the legal topics table.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each jurisdiction."
          },
          "name": {
            "kind": "words",
            "max": 5,
            "description": "The name of the jurisdiction.",
            "nullable": true
          },
          "legal_topic_id": {
            "kind": "fk",
            "ref": "legal_topics.id",
            "description": "Reference to the related legal topic."
          }
        }
      },
      "case_opinions": {
        "description": "This table contains various judicial opinions related to legal topics, each linked to a specific jurisdiction and judge.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each case opinion."
          },
          "case_number": {
            "kind": "words",
            "max": 15,
            "description": "The case number associated with the opinion."
          },
          "jurisdiction_id": {
            "kind": "fk",
            "ref": "jurisdictions.id",
            "description": "Reference to the jurisdiction of the case."
          },
          "opinion_text": {
            "kind": "paragraph",
            "max": 1000,
            "description": "The text of the judicial opinion.",
            "nullable": true
          },
          "date": {
            "kind": "date",
            "from": "2000-01-01",
            "to": "2023-12-31",
            "description": "The date when the opinion was issued.",
            "trend": "seasonal"
          }
        }
      },
      "judges": {
        "description": "This table lists judges who have rendered opinions, linking them to the relevant case opinions.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each judge."
          },
          "full_name": {
            "kind": "fullName",
            "description": "The full name of the judge.",
            "nullable": true
          },
          "case_opinion_id": {
            "kind": "fk",
            "ref": "case_opinions.id",
            "description": "Reference to the related case opinion."
          }
        }
      },
      "user_comments": {
        "description": "This table contains comments submitted by users regarding specific case opinions, providing insight into public discourse.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each comment."
          },
          "case_opinion_id": {
            "kind": "fk",
            "ref": "case_opinions.id",
            "description": "Reference to the case opinion being commented on."
          },
          "user_name": {
            "kind": "fullName",
            "description": "The name of the user submitting the comment.",
            "nullable": true
          },
          "comment_text": {
            "kind": "paragraph",
            "max": 500,
            "description": "The text of the user's comment.",
            "nullable": true
          },
          "submitted_at": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "The date and time when the comment was submitted.",
            "dayProfile": "waking"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "nullable",
      "categorical",
      "high-cardinality"
    ],
    "analysisQuestions": [
      "What are the most popular legal topics among users?",
      "How do opinions vary across different jurisdictions?",
      "What trends can be observed in user comments over time?",
      "Which judges are most frequently referenced in case opinions?",
      "What is the average length of user comments?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Legal Topics with Jurisdictions",
        "sql": "SELECT lt.title, j.name FROM legal_topics lt JOIN jurisdictions j ON lt.id = j.legal_topic_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Case Opinions by Jurisdiction",
        "sql": "SELECT j.name, COUNT(co.id) FROM jurisdictions j LEFT JOIN case_opinions co ON j.id = co.jurisdiction_id GROUP BY j.name;",
        "dialect": "postgres"
      },
      {
        "title": "Average Popularity of Legal Topics",
        "sql": "SELECT AVG(lt.popularity) FROM legal_topics lt;",
        "dialect": "postgres"
      },
      {
        "title": "Get Recent User Comments on Case Opinions",
        "sql": "SELECT uc.comment_text, co.case_number FROM user_comments uc JOIN case_opinions co ON uc.case_opinion_id = co.id WHERE uc.submitted_at > NOW() - INTERVAL '30 days';",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Legal Research Training",
        "body": "Law students and professionals can utilize this dataset to practice legal research skills. By analyzing the relationships between legal topics, jurisdictions, and case opinions, they can better understand how to navigate legal information and identify relevant precedents."
      },
      {
        "title": "ETL Pipeline Development",
        "body": "Data engineers can use this dataset to develop and test ETL pipelines. By extracting, transforming, and loading data from the various tables, they can simulate real-world scenarios in legal data management and enhance their data processing skills."
      },
      {
        "title": "User Engagement Analysis",
        "body": "Marketing analysts can explore user comments to gauge public sentiment regarding different case opinions. By analyzing the comments, they can identify trends and topics that resonate with users, helping to inform content strategies and engagement initiatives."
      },
      {
        "title": "Judicial Opinion Review",
        "body": "Legal scholars can analyze the case opinions within this dataset to study judicial behavior and trends. By examining the opinions issued by different judges, they can assess how legal interpretations evolve over time and across jurisdictions."
      }
    ]
  },
  "counts": {
    "legal_topics": 300,
    "jurisdictions": 150,
    "case_opinions": 200,
    "judges": 100,
    "user_comments": 200
  },
  "stats": {
    "legal_topics": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "title": {
          "nulls": 0,
          "distinct": 300
        },
        "description": {
          "nulls": 23,
          "distinct": 277
        },
        "popularity": {
          "nulls": 37,
          "distinct": 218,
          "min": 7,
          "max": 999
        }
      }
    },
    "jurisdictions": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "name": {
          "nulls": 24,
          "distinct": 126
        },
        "legal_topic_id": {
          "nulls": 0,
          "distinct": 117,
          "min": 7,
          "max": 298
        }
      }
    },
    "case_opinions": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "case_number": {
          "nulls": 0,
          "distinct": 200
        },
        "jurisdiction_id": {
          "nulls": 0,
          "distinct": 115,
          "min": 2,
          "max": 150
        },
        "opinion_text": {
          "nulls": 19,
          "distinct": 181
        },
        "date": {
          "nulls": 0,
          "distinct": 196,
          "min": "2000-01-14",
          "max": "2023-12-09"
        }
      }
    },
    "judges": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "full_name": {
          "nulls": 11,
          "distinct": 88,
          "min": "Alice Fischer",
          "max": "Zara Novak"
        },
        "case_opinion_id": {
          "nulls": 0,
          "distinct": 78,
          "min": 1,
          "max": 200
        }
      }
    },
    "user_comments": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "case_opinion_id": {
          "nulls": 0,
          "distinct": 130,
          "min": 1,
          "max": 200
        },
        "user_name": {
          "nulls": 21,
          "distinct": 175,
          "min": "Alice Martin",
          "max": "Zoe Wright"
        },
        "comment_text": {
          "nulls": 18,
          "distinct": 182
        },
        "submitted_at": {
          "nulls": 0,
          "distinct": 200,
          "min": "2020-01-09 17:24:38",
          "max": "2023-12-28 14:52:34"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/legal_topics.csv",
      "format": "csv",
      "table": "legal_topics",
      "key": "datasets/legal-insights-repository/v1/csv/legal_topics.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/csv/legal_topics.csv",
      "bytes": 60826,
      "sha256": "6cf1fc92494e09418362f9955ac9229299a2e580ebe1eb73d445349cf8cf9344",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/jurisdictions.csv",
      "format": "csv",
      "table": "jurisdictions",
      "key": "datasets/legal-insights-repository/v1/csv/jurisdictions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/csv/jurisdictions.csv",
      "bytes": 4098,
      "sha256": "a1b4c22524542cfeace600361bb3f3972c3b757efcdfeb95cb66722972cfbc91",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/case_opinions.csv",
      "format": "csv",
      "table": "case_opinions",
      "key": "datasets/legal-insights-repository/v1/csv/case_opinions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/csv/case_opinions.csv",
      "bytes": 45322,
      "sha256": "a58bf22f243bd805407b043912c68adf668fffdfdc2043e5e0c83c26829f45dc",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/judges.csv",
      "format": "csv",
      "table": "judges",
      "key": "datasets/legal-insights-repository/v1/csv/judges.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/csv/judges.csv",
      "bytes": 1861,
      "sha256": "36eb716761ee32c27a65e88a4886ae64f4cea3327bad326a050e9ebcbc1c589a",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/user_comments.csv",
      "format": "csv",
      "table": "user_comments",
      "key": "datasets/legal-insights-repository/v1/csv/user_comments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/csv/user_comments.csv",
      "bytes": 38884,
      "sha256": "385ac6291f2642663800a1b233770a95ef43882bcaaba9a19f75826a6526f410",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "legal-insights-repository.json",
      "format": "json",
      "table": null,
      "key": "datasets/legal-insights-repository/v1/legal-insights-repository.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/legal-insights-repository.json",
      "bytes": 241470,
      "sha256": "95ab22fe5dbae074bc5d40f42f9e6c9189932197e97f71e59655505386328d2e",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/legal-insights-repository/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/sql/postgres.sql",
      "bytes": 166186,
      "sha256": "e6aec0e567fdd27e30345312809701eebed6900f027a4f393f31fda0c32fd8d1",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/legal-insights-repository/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/sql/mysql.sql",
      "bytes": 165600,
      "sha256": "667dbe82c70bb5a55f0933a2778282b161c829a1bc9b7a7c7157b3d47530909f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/legal-insights-repository/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/sql/mssql.sql",
      "bytes": 167906,
      "sha256": "d846da66c44a5d885067ea9aad4245ea34b1581b2b653dc7e55779ae12f6032f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/legal-insights-repository/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/sql/sqlite.sql",
      "bytes": 165374,
      "sha256": "8bbe3a8c6aef001fb437cf89671f754860bb644d5f844556b015bb67686cd08d",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/legal-insights-repository/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/prisma/seed.ts",
      "bytes": 216809,
      "sha256": "86327a05f61d48cb171400496d4ddc0f47f2bc69f97ecc992f161ef129b8318b",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/legal-insights-repository/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/legal-insights-repository/v1/django/fixtures.json",
      "bytes": 284453,
      "sha256": "8a677d26d7a64bdea2be717b31df0ec1ceedd427f6f07901beac8d27e307d5a3",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788734462566,
  "updatedAt": 1788734462566
}
