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

Provide default table object when not parsing into standard format #115

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

alecloudenback
Copy link
Member

@alecloudenback alecloudenback commented Oct 19, 2021

Closes #107

  • return generic datatype for non-standard tables
  • decouple parsing logic to not assume everthing is a select or ultimate mortality table

improve generic data returned by:

  • add usage warning via @info

  • refactor interim steps to make fewer assumptions about the contents of the table (e.g. parse_2D_table assumes indices are issue_age and duration)

  • iterate on generic table API to get to a happy spot

  • parse table metadata for display methods and/or value index information

  • how to handle non-contiguous indices? idea: just be missing for missing values
    other todo:

  • docuemnt in API which parts are stable, experimental

  • add test cases

@codecov
Copy link

codecov bot commented Oct 19, 2021

Codecov Report

Merging #115 (55cab4a) into master (171fa69) will decrease coverage by 67.24%.
The diff coverage is 87.09%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #115       +/-   ##
===========================================
- Coverage   90.16%   22.92%   -67.25%     
===========================================
  Files           9        8        -1     
  Lines         366      349       -17     
===========================================
- Hits          330       80      -250     
- Misses         36      269      +233     
Impacted Files Coverage Δ
src/XTbML.jl 66.08% <87.09%> (+0.97%) ⬆️
src/get_SOA_table.jl 0.00% <0.00%> (-100.00%) ⬇️
src/MortalityTable.jl 0.00% <0.00%> (-98.19%) ⬇️
src/parameterized_models.jl 0.00% <0.00%> (-98.06%) ⬇️
src/CSV.jl 0.00% <0.00%> (-97.73%) ⬇️
src/life_expectancy.jl 0.00% <0.00%> (-90.91%) ⬇️
src/death_distribution.jl

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 171fa69...55cab4a. Read the comment docs.

@MatthewCaseres
Copy link
Contributor

I am thinking about doing no modifications to the existing API, except restrict the tables that can be loaded to ones that we are certain are going to work well. then provide a new API which is a constructor of an XTbML struct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Irregular tables
2 participants