{
  "format": "dataset-manifest/1",
  "slug": "permit-applications",
  "version": 2,
  "seed": "permit-applications:1",
  "spec": {
    "format": "dataset/1",
    "slug": "permit-applications",
    "name": "Permit Applications",
    "tagline": "Permit applications data including applicants, types, statuses, inspections, and fees from a city permits office.",
    "description": "City officials process various permit applications, ensuring that construction and public projects comply with local regulations. Applicants submit their requests for permits, which are categorized into different types, such as building, electrical, or plumbing permits. Each application goes through a series of inspections to verify compliance with safety standards and local codes. Fees are associated with each permit type and application, contributing to the city's revenue while maintaining oversight of public safety. The operations of this office revolve around managing applications, tracking inspections, and processing payments effectively.\n\nThe dataset includes several interrelated tables. The 'applicants' table contains information about individuals or companies making permit requests. Each applicant can submit multiple applications documented in the 'applications' table. Each application is linked to a specific permit type found in the 'permit_types' table, detailing the nature of the permit being requested. As applications progress, they undergo inspections recorded in the 'inspections' table, where outcomes of these inspections are noted. The 'fees' table outlines the costs associated with each permit, while the 'application_history' table keeps track of the status changes and milestones of applications over time.\n\nThis dataset is designed to answer numerous questions related to the permit application process, such as the average time taken to approve applications, the most common types of permits requested, inspection outcomes, and financial metrics related to fees collected. It serves as an excellent resource for developers looking to practice SQL queries, data analysis, or visualization techniques in a municipal context. Keep in mind that the data provided is synthetic, allowing for robust testing and experimentation without real-world implications.",
    "domain": "government",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "api-mocking"
    ],
    "keywords": [
      "permit",
      "applications",
      "government",
      "city",
      "inspections",
      "fees",
      "applicants",
      "types"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "applicants": {
        "description": "This table contains information about individuals applying for permits. Each applicant is linked to their respective applications.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the applicant."
          },
          "full_name": {
            "kind": "fullName",
            "description": "Full name of the applicant."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "Email address of the applicant."
          },
          "phone": {
            "kind": "phone",
            "description": "Contact phone number of the applicant."
          },
          "address": {
            "kind": "sentence",
            "description": "Residential address of the applicant.",
            "nullable": true
          }
        }
      },
      "permit_types": {
        "description": "This table lists the different types of permits that can be applied for, each with its associated fee structure.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the permit type."
          },
          "name": {
            "kind": "words",
            "description": "Name of the permit type.",
            "pool": [
              "building",
              "construction",
              "demolition",
              "renovation",
              "landscaping",
              "electrical",
              "plumbing",
              "signage",
              "zoning",
              "special",
              "event",
              "fire",
              "environmental",
              "occupancy",
              "temporary",
              "business",
              "home",
              "subdivision",
              "variance",
              "fence",
              "driveway",
              "accessory",
              "tree",
              "pool",
              "solar",
              "wind",
              "waste",
              "transportation",
              "parking",
              "road",
              "sewer",
              "water",
              "stormwater",
              "site",
              "historic",
              "certificate",
              "license",
              "permit",
              "excavation",
              "grading",
              "siteplan",
              "commercial",
              "residential",
              "agricultural",
              "industrial",
              "public"
            ],
            "min": 1,
            "max": 3
          },
          "fee": {
            "kind": "decimal",
            "min": 10,
            "max": 500,
            "description": "Fee associated with the permit type.",
            "distribution": "long-tail"
          }
        }
      },
      "applications": {
        "description": "This table records applications submitted by applicants, including their current status.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the application."
          },
          "applicant_id": {
            "kind": "fk",
            "ref": "applicants.id",
            "description": "Reference to the applicant."
          },
          "permit_type_id": {
            "kind": "fk",
            "ref": "permit_types.id",
            "description": "Reference to the type of permit requested."
          },
          "status": {
            "kind": "enum",
            "values": [
              "pending",
              "approved",
              "denied",
              "under review"
            ],
            "description": "Current status of the application."
          },
          "submitted_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date and time when the application was submitted.",
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "approved",
                "denied"
              ]
            },
            "dayProfile": "business"
          }
        }
      },
      "inspections": {
        "description": "This table logs inspections that are performed on applications, detailing the outcome of each inspection.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the inspection."
          },
          "application_id": {
            "kind": "fk",
            "ref": "applications.id",
            "description": "Reference to the application being inspected."
          },
          "inspector_name": {
            "kind": "fullName",
            "description": "Name of the inspector who conducted the inspection.",
            "nullable": true
          },
          "outcome": {
            "kind": "enum",
            "values": [
              "passed",
              "failed",
              "reinspection required"
            ],
            "description": "Outcome of the inspection.",
            "weights": [
              7,
              2,
              1
            ]
          },
          "inspection_date": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date of the inspection.",
            "nullable": true,
            "when": {
              "column": "outcome",
              "in": [
                "passed",
                "failed"
              ]
            },
            "dayProfile": "business"
          }
        }
      },
      "fees": {
        "description": "This table tracks fees paid for applications, linking them to specific applications.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the fee record."
          },
          "application_id": {
            "kind": "fk",
            "ref": "applications.id",
            "description": "Reference to the application for which the fee was paid."
          },
          "amount": {
            "kind": "decimal",
            "min": 10,
            "max": 500,
            "description": "Amount paid for the fee.",
            "distribution": "long-tail"
          },
          "paid_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date when the fee was paid.",
            "nullable": true,
            "dayProfile": "business"
          }
        }
      },
      "application_history": {
        "description": "This table records the history of changes in application statuses over time.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the history record."
          },
          "application_id": {
            "kind": "fk",
            "ref": "applications.id",
            "description": "Reference to the application whose history is recorded."
          },
          "status": {
            "kind": "enum",
            "values": [
              "pending",
              "approved",
              "denied",
              "under review"
            ],
            "description": "Status of the application at the time of the record."
          },
          "changed_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Timestamp when the status was changed.",
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "approved",
                "denied"
              ]
            },
            "dayProfile": "business",
            "trend": "growing"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "timestamped",
      "nullable",
      "monetary"
    ],
    "analysisQuestions": [
      "What is the average fee paid for different types of permits?",
      "How many applications are currently pending approval?",
      "What percentage of inspections pass on the first attempt?",
      "How long does it typically take for an application to be approved?",
      "What trends can be observed in application submissions over the year?"
    ],
    "suggestedQueries": [
      {
        "title": "Get all applications with their statuses",
        "sql": "SELECT applications.id, applications.status, applicants.full_name FROM applications JOIN applicants ON applications.applicant_id = applicants.id;",
        "dialect": "postgres"
      },
      {
        "title": "Count applications by status",
        "sql": "SELECT status, COUNT(*) FROM applications GROUP BY status;",
        "dialect": "postgres"
      },
      {
        "title": "Average fee per permit type",
        "sql": "SELECT permit_types.name, AVG(fees.amount) FROM fees JOIN applications ON fees.application_id = applications.id JOIN permit_types ON applications.permit_type_id = permit_types.id GROUP BY permit_types.name;",
        "dialect": "postgres"
      },
      {
        "title": "Inspection outcomes for each application",
        "sql": "SELECT applications.id, inspections.outcome FROM applications JOIN inspections ON applications.id = inspections.application_id;",
        "dialect": "postgres"
      },
      {
        "title": "Application status history",
        "sql": "SELECT application_id, status, changed_at FROM application_history ORDER BY changed_at;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Government Officials",
        "body": "City officials can utilize this dataset to analyze trends in permit applications and inspections. By understanding peak application times and common inspection outcomes, they can allocate resources more effectively and improve service delivery."
      },
      {
        "title": "Developers",
        "body": "Developers can use this dataset to create applications that simulate the permit application process. This can be helpful for building user interfaces that allow citizens to apply for permits, track their application status, and pay fees online."
      },
      {
        "title": "Data Analysts",
        "body": "Data analysts can leverage this dataset to perform in-depth analyses of the permitting process. They can generate reports on average processing times, rejection rates, and the financial impact of permit fees, providing valuable insights to government decision-makers."
      },
      {
        "title": "Educators",
        "body": "Educators can use this dataset in classroom settings to teach students about database management and SQL querying. By working with real-world-like data, students can develop practical skills in data analysis and reporting."
      }
    ]
  },
  "counts": {
    "applicants": 150,
    "permit_types": 10,
    "applications": 300,
    "application_history": 300,
    "fees": 300,
    "inspections": 200
  },
  "stats": {
    "applicants": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "full_name": {
          "nulls": 0,
          "distinct": 148,
          "min": "Alice Adams",
          "max": "Zoe Ruiz"
        },
        "email": {
          "nulls": 0,
          "distinct": 149
        },
        "phone": {
          "nulls": 0,
          "distinct": 142
        },
        "address": {
          "nulls": 23,
          "distinct": 127
        }
      }
    },
    "permit_types": {
      "rows": 10,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "name": {
          "nulls": 0,
          "distinct": 10
        },
        "fee": {
          "nulls": 0,
          "distinct": 10,
          "min": 11.01,
          "max": 359.84
        }
      }
    },
    "applications": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "applicant_id": {
          "nulls": 0,
          "distinct": 131,
          "min": 1,
          "max": 150
        },
        "permit_type_id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "status": {
          "nulls": 0,
          "distinct": 4,
          "min": "approved",
          "max": "under review"
        },
        "submitted_at": {
          "nulls": 141,
          "distinct": 159,
          "min": "2023-01-01 09:27:32",
          "max": "2023-12-28 12:26:17"
        }
      }
    },
    "inspections": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "application_id": {
          "nulls": 0,
          "distinct": 149,
          "min": 1,
          "max": 299
        },
        "inspector_name": {
          "nulls": 21,
          "distinct": 177,
          "min": "Alice Silva",
          "max": "Zoe Weber"
        },
        "outcome": {
          "nulls": 0,
          "distinct": 3,
          "min": "failed",
          "max": "reinspection required"
        },
        "inspection_date": {
          "nulls": 18,
          "distinct": 182,
          "min": "2023-01-01 18:05:11",
          "max": "2023-12-31 13:13:47"
        }
      }
    },
    "fees": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "application_id": {
          "nulls": 0,
          "distinct": 191,
          "min": 1,
          "max": 298
        },
        "amount": {
          "nulls": 0,
          "distinct": 297,
          "min": 10,
          "max": 494.65
        },
        "paid_at": {
          "nulls": 24,
          "distinct": 276,
          "min": "2023-01-01 10:23:38",
          "max": "2023-12-31 21:04:17"
        }
      }
    },
    "application_history": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "application_id": {
          "nulls": 0,
          "distinct": 196,
          "min": 2,
          "max": 299
        },
        "status": {
          "nulls": 0,
          "distinct": 4,
          "min": "approved",
          "max": "under review"
        },
        "changed_at": {
          "nulls": 147,
          "distinct": 153,
          "min": "2023-01-09 11:07:40",
          "max": "2023-12-28 09:26:00"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/applicants.csv",
      "format": "csv",
      "table": "applicants",
      "key": "datasets/permit-applications/v2/csv/applicants.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/csv/applicants.csv",
      "bytes": 15546,
      "sha256": "6528a1f7487d0b396a90716da2d93610c9f5cc7461ec872ac271607122c32e6b",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/permit_types.csv",
      "format": "csv",
      "table": "permit_types",
      "key": "datasets/permit-applications/v2/csv/permit_types.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/csv/permit_types.csv",
      "bytes": 300,
      "sha256": "386a9c6866bdad18178fa390bea78b11d95b7f4fcfa9ad5e4149e43a0569b629",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/applications.csv",
      "format": "csv",
      "table": "applications",
      "key": "datasets/permit-applications/v2/csv/applications.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/csv/applications.csv",
      "bytes": 9171,
      "sha256": "20b826e08162a53aa26f876f14304213b0d086a5a87520da435264bab7ef9458",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/application_history.csv",
      "format": "csv",
      "table": "application_history",
      "key": "datasets/permit-applications/v2/csv/application_history.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/csv/application_history.csv",
      "bytes": 8509,
      "sha256": "3a71284089a1df08d9af6660cb562dcf2e0a21affc2148b7239f42bb00aa979f",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/fees.csv",
      "format": "csv",
      "table": "fees",
      "key": "datasets/permit-applications/v2/csv/fees.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/csv/fees.csv",
      "bytes": 10020,
      "sha256": "eb28ee19d419c4367365fb7d13c87640f9237ecd893658e8fa14797e4d2f401f",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/inspections.csv",
      "format": "csv",
      "table": "inspections",
      "key": "datasets/permit-applications/v2/csv/inspections.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/csv/inspections.csv",
      "bytes": 9161,
      "sha256": "a422bd699e530326eb1dec97dfae50d2bf76784251c078d67cdd51a465c16efa",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "permit-applications.json",
      "format": "json",
      "table": null,
      "key": "datasets/permit-applications/v2/permit-applications.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/permit-applications.json",
      "bytes": 181826,
      "sha256": "edb159d814b8b85991e0ed5b7419e71a9d20e4d0edfd79f00053ec03c09fec6e",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/permit-applications/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/sql/postgres.sql",
      "bytes": 74185,
      "sha256": "95d76343b9bc57993d718b47005609f32d6dc6d729089e87a6269ed74b3d9682",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/permit-applications/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/sql/mysql.sql",
      "bytes": 73482,
      "sha256": "d27da7dc36b7917f8b62cc780a4d2daca25911e0e0c825becfb26d5665b93b50",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/permit-applications/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/sql/mssql.sql",
      "bytes": 76245,
      "sha256": "65c5c2c472c23b74b49a7dfe39d9f33c56a88929150eb7b542780b5ea333fe83",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/permit-applications/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/sql/sqlite.sql",
      "bytes": 73180,
      "sha256": "443bc36bf8d17650dd8287d1cfafd26baca9e651cf785141a9b361925c546956",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/permit-applications/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/prisma/seed.ts",
      "bytes": 151537,
      "sha256": "a31927b925ac66f58a0e27aed8271b0c5e72e98889ae9171324342b7338231e8",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/permit-applications/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/permit-applications/v2/django/fixtures.json",
      "bytes": 238588,
      "sha256": "3a088cc4359a02da471c667f002dff194aea5d34980ec70f0c6ef352a827eabc",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788768367745,
  "updatedAt": 1788785396765
}
