Skip to content

Commit

Permalink
update docs for Documenter 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alecloudenback committed Oct 28, 2023
1 parent 505db36 commit a757004
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 14 deletions.
3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
MortalityTables = "4780e19d-04b9-53dc-86c2-9e9aa59b5a12"
6 changes: 3 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ makedocs(;
],
"Reference" => "Reference.md",
],
repo="https://github.com/JuliaActuary/MortalityTables.jl/blob/{commit}{path}#L{line}",
repo=Remotes.GitHub("JuliaActuary", "MortalityTables.jl"),
sitename="MortalityTables.jl",
authors="Alec Loudenback",
authors="Alec Loudenback"
)

deploydocs(;
repo="github.com/JuliaActuary/MortalityTables.jl",
repo="github.com/JuliaActuary/MortalityTables.jl"
)
2 changes: 1 addition & 1 deletion docs/src/ParametricMortalityModels.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Modules = [MortalityTables]
Order = [:type]
```

```@docs
```@docs; canonical=false
MortalityTables.Makeham
MortalityTables.Gompertz
MortalityTables.InverseGompertz
Expand Down
4 changes: 4 additions & 0 deletions docs/src/Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@

```@index
```

```@autodocs
Modules = [MortalityTables]
```
16 changes: 8 additions & 8 deletions docs/src/Tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ my_table = MortalityTable(
)
```

```@docs
```@docs; canonical=false
MortalityTables.readXTbML
MortalityTables.table
MortalityTables.get_SOA_table
Expand All @@ -143,7 +143,7 @@ MortalityTables.get_SOA_table

Use these to build your own `MortalityTables.jl`-compatible table:

```@docs
```@docs; canonical=false
MortalityTables.MortalityTable
MortalityTables.SelectMortality
MortalityTables.UltimateMortality
Expand All @@ -154,13 +154,13 @@ MortalityTables.mortality_vector

Basic metadata about the table (automatically populated for some tables).

```@docs
```@docs; canonical=false
MortalityTables.TableMetaData
```

Find the final age for which a table defines a rate.

```@docs
```@docs; canonical=false
MortalityTables.omega
```

Expand Down Expand Up @@ -216,11 +216,11 @@ julia> vbt2001.ultimate[95] # ultimate vectors only need to be called wit

### Docstrings

```@docs
```@docs; canonical=false
MortalityTables.survival
```

```@docs
```@docs; canonical=false
MortalityTables.decrement
```
## Life Expectancy
Expand All @@ -229,7 +229,7 @@ Calculate curtate or complete life expectancy.

### Docstrings

```@docs
```@docs; canonical=false
MortalityTables.life_expectancy
```

Expand All @@ -247,7 +247,7 @@ The three assumptions are:
- `Balducci()` which assumes a decreasing force of mortality over the year. It seems [to
be for making it easier](https://www.soa.org/globalassets/assets/library/research/actuarial-research-clearing-house/1978-89/1988/arch-1/arch88v17.pdf) to calculate successive months by hand rather than any theoretical basis.

```@docs
```@docs; canonical=false
MortalityTables.DeathDistribution
MortalityTables.Balducci
MortalityTables.Uniform
Expand Down
6 changes: 5 additions & 1 deletion docs/src/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ There are two types of MortalityTable subtypes for SOA data: `SelectUltimateTabl
A table with both select and ultimate rates:

```@example
using MortalityTables
MortalityTables.table("2001 VBT Residual Standard Select and Ultimate - Male Nonsmoker, ANB")
```

A table with just ultimate rates:

```@example
using MortalityTables
MortalityTables.table("1941 CSO Basic Table, ANB")
```

## Motivation for the current design
x

### Encourage data-driven design

Probably best explained with an example. In the following example, we calculate the ultimate survivorship for every age in the `cso` table from above. The table itself gives us the right range of ages to do this with. No need to assume a 100 or 121 omega age and handle edge cases when working with tables that don't line up to the usual expectations.
Expand Down Expand Up @@ -46,6 +49,7 @@ survival(MortalityTables.Makeham(),25,50) # 25 to 50 year old survival
When you display a table, you get to see related metadata, which can be lost if simply parsing into a matrix or dataframe:

```@example
using MortalityTables
MortalityTables.table("2001 VBT Residual Standard Select and Ultimate - Male Nonsmoker, ANB")
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ aus_life_table_female[0] # returns the attained age 0 rate of 0.10139

### From CSV

If you have a CSV file that is from [mort.SOA.org](mort.SOA.org), or follows the same structure, then you can load and parse the table into a `MortalityTable` like so:
If you have a CSV file that is from [mort.SOA.org](https://mort.SOA.org), or follows the same structure, then you can load and parse the table into a `MortalityTable` like so:

```julia
using CSV
Expand Down

0 comments on commit a757004

Please sign in to comment.