> ## Documentation Index
> Fetch the complete documentation index at: https://docs.effectiveai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# relativities.ppa.ca

> Derive California Good Driver, DUI convictions, chargeable accidents, offenses and DMV points from a book.

*Generated from the package's Python API.*

California law every CA personal auto carrier applies, derived from a PPA book.

A carrier's `prepare` calls these instead of asking the user for a verdict
such as "good driver". Each result is aligned with the book's own rows and is
`<NA>` where the book holds too few facts to decide, so a missing fact stays
unknown instead of reading as a clean record.

* `chargeable_accident`: an accident the driver was principally at fault in,
  with bodily injury or death, or property damage over \$1,000
  (Cal. Code Regs. tit. 10, § 2632.13).
* `dui_conviction`: a conviction under an offense California Insurance Code
  § 1861.025(c) names.
* `good_driver`: the Good Driver test of Insurance Code § 1861.025.
* `offense`: what the Vehicle Code or Penal Code section a violation cites
  prohibits, such as `unsafe_speed` for VC 22350. A carrier's program maps the
  offense to its own class, which its filing describes in words.
* `dmv_points`: the violation point count Vehicle Code 12810 and 12810.3 give
  each violation.

A violation counts as California's when `violation_jurisdiction` is `US-CA`,
or when it is blank and `violation_code` cites the Vehicle Code (`VC`) or
Penal Code (`PC`). A violation's point count comes from its `dmv_points`,
which `SCHEMA` (this module's extension of `ppa.SCHEMA`) declares; an
at-fault accident's point follows from its facts (10 CCR § 2632.13.1(b)(3)).
A `dmv_points` the book gives is the DMV's own record, so it is used as given;
a blank one is derived from the violation's code.

Carriers' own underwriting, such as how they count a license from outside the
US and Canada, stays in their programs.

## SCHEMA

```python theme={null}
SCHEMA: Schema
```

`ppa.SCHEMA` with the facts California law reads in its own terms: `incidents.dmv_points`, the violation point count California's DMV records under Vehicle Code 12810. A California carrier's program declares its own columns on this schema with `with_columns`.

## chargeable\_accident

```python theme={null}
def chargeable_accident(book: Book) -> pd.Series
```

Whether each incident is a chargeable at-fault accident, aligned with `book.incidents`.

True for an accident with `at_fault` true and either `injury` true or
`damage_amount` over $1,000 (10 CCR § 2632.13). False for a violation or
claim, an accident with `at_fault` false, or one with `injury` false and
$1,000 or less in damage. `<NA>` when a fact the test needs is blank, including `kind`.

## dmv\_points

```python theme={null}
def dmv_points(book: Book) -> pd.Series
```

Each incident's violation point count, aligned with `book.incidents`.

A `dmv_points` the book gives is used as it is. Otherwise a California
conviction gets the points Vehicle Code 12810 gives its code: two for the
offenses (a) to (e) name, such as DUI, reckless driving and hit and run, and
one for any other conviction involving safe operation. Under 12810.3 a
handheld-device conviction (VC 23123(a), 23123.5(a), 23124(b)) gets one point
when it occurred on or after July 1, 2021 within 36 months of a prior
conviction of the same offense, and zero points otherwise. A violation
dismissed or sent to traffic school gets zero points, and so does an accident
or claim, whose point follows from its facts. Violations that share an
`occurrence_id` are one occasion of citation, which 12810(j) counts once, at
its highest point count. `<NA>` when the code, jurisdiction, disposition or
a date the rule needs is unknown.

## dui\_conviction

```python theme={null}
def dui_conviction(book: Book) -> pd.Series
```

Whether each incident is a conviction for an offense Insurance Code
§ 1861.025(c) names, aligned with `book.incidents`.

False for an accident or claim, a California violation under another code,
or one dismissed or sent to traffic school. `<NA>` for a conviction from
another state, one under Vehicle Code 23550 or 23566 (the statute names only
felony violations of these), or one whose code, disposition or kind is blank.

## good\_driver

```python theme={null}
def good_driver(book: Book) -> pd.Series
```

Whether each driver meets the Good Driver test on the submission's
effective date, aligned with `book.drivers` (Insurance Code § 1861.025,
10 CCR § 2632.13.1).

A good driver:

* has been licensed for the previous three years (`first_licensed_date`);
* in those three years has at most one point: the Vehicle Code § 12810
  points (`dmv_points`) of violations convicted in that time, plus one for
  each chargeable accident with property damage only;
* in those three years has at most one violation dismissed through traffic
  school, and zero chargeable accidents with bodily injury or death;
* in the previous ten years has zero convictions `dui_conviction` finds.

A violation is dated by `conviction_date` and an accident by
`occurrence_date`. A violation with a blank conviction date that
occurred inside the period was convicted inside it too.

False as soon as one test fails. True only when every test passes whatever the blank facts are, and the
driver's history is complete (`history_complete_from` on or before ten
years back, `history_complete_through` on or after the effective date),
so that an empty incident list means a clean record. `<NA>` otherwise.

## offense

```python theme={null}
def offense(book: Book) -> pd.Series
```

What each California violation's code prohibits, aligned with `book.incidents`.

The offense names come from the sections themselves, such as `dui` for
VC 23152, `intoxicated_vehicular_manslaughter` for PC 191.5, `unsafe_speed` for VC 22350, `red_light` for VC 21453 and
`handheld_device` for VC 23123.5(a). A code is read as `VC 22350`,
`CVC 22350(a)` or `PC 191.5(b)`; a subdivision the table names must match.
`<NA>` for an accident or claim, a violation from another state, or a code
outside the table.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.