Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs for Documenter 1.0 #129

Merged
merged 3 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/github_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.5'
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Expand Down
6 changes: 6 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
MortalityTables = "4780e19d-04b9-53dc-86c2-9e9aa59b5a12"

[compat]
Documenter = "1"
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
Loading