larray.load_example_data
- larray.load_example_data(name)[source]
Load arrays used in the tutorial so that all examples in it can be reproduced.
- Parameters
- namestr
Example data to load. Available example datasets are:
demography
demography_eurostat
- Returns
- Session
Session containing one or several arrays.
Examples
>>> demo = load_example_data('demography') >>> print(demo.summary()) hh: time, geo, hh_type (26 x 3 x 7) [int64] pop: time, geo, age, sex, nat (26 x 3 x 121 x 2 x 2) [int64] qx: time, geo, age, sex, nat (26 x 3 x 121 x 2 x 2) [float64] >>> demo = load_example_data('demography_eurostat') >>> print(demo.summary()) Metadata: title: Demographic datasets for a small selection of countries in Europe source: demo_jpan, demo_fasec, demo_magec and migr_imm1ctz tables from Eurostat gender: gender ['Male' 'Female'] (2) country: country ['Belgium' 'France' 'Germany'] (3) country_benelux: country_benelux ['Belgium' 'Luxembourg' 'Netherlands'] (3) citizenship: citizenship ['Belgium' 'Luxembourg' 'Netherlands'] (3) time: time [2013 2014 2015 2016 2017] (5) even_years: time[2014 2016] >> even_years (2) odd_years: time[2013 2015 2017] >> odd_years (3) births: country, gender, time (3 x 2 x 5) [int32] deaths: country, gender, time (3 x 2 x 5) [int32] immigration: country, citizenship, gender, time (3 x 3 x 2 x 5) [int32] pop: country, gender, time (3 x 2 x 5) [int32] pop_benelux: country, gender, time (3 x 2 x 5) [int32]