casact / chainladder-python

Actuarial reserving in Python
https://chainladder-python.readthedocs.io/en/latest/
Mozilla Public License 2.0
192 stars 71 forks source link

Add Friedland gl and xyz disposal rate data sets. #353

Closed genedan closed 2 years ago

genedan commented 2 years ago

Partially addresses #346.

jbogaardt commented 2 years ago

Thanks @genedan. Quite a day, 3 PRs from 3 different contributors - it's really exciting to see this community grow.

On this PR in particular, For the datasets to be packaged with the releases, they have to be registered in MANIFEST.in

I haven't actually tried using load_sample with these new datasets, but I do wonder if it works. Its a horribly written function from my earlier days that has a lot of hardcodes of column names to simply call the Triangle constructor on pre-packaged data. It makes me cringe looking at it, but it may block users from accessing the triangles.

We now have quite a library of sample data, it might even be a good idea to make them discoverable somehow from python itself. Open to ideas on this. sklearn makes each dataset a discoverable function on the datasets module:

from sklearn import datasets
datasets.load_iris() # accessible through tab-complete

Very different to our setup, maybe some sort of list_samples function might solve this without causing too many breaking changes.