timriffe / TR1

Read Human Mortality Database and Human Fertility Database Data from the Web
10 stars 4 forks source link

Country code for GBRTENW not found #20

Closed ubasellini closed 1 year ago

ubasellini commented 1 year ago

Hi @timriffe It seems like the country code for England and Wales (GBRTENW) is not available when reading data from HMD. Probably this has to do with the recent HMD website update. Thank you so much for this great package! Best, Ugo

nmueller18 commented 1 year ago

I can confirm this issue. It seems that getHMDcountries() only grabs the main countries but not subdivisions as available for France, Germany, New Zealand and UK. Is this a problem witht the package or related to the structure of the new website?

timriffe commented 1 year ago

It’s both; the package will need to be modified to drill into subcategories not initially displayed on the main page. I simply forgot to account for this in the update. The most expedient solution would be to just make a static data object in the package for the unabridged list of populations. Will do this soon, or accept a PR, whichever comes first

On Sun, 5 Mar 2023 at 14:15, Nils Müller-Scheeßel @.***> wrote:

I can confirm this issue. It seems that getHMDcountries() only grabs the main countries but not subdivisions as available for France, Germany, New Zealand and UK. Is this a problem witht the package or related to the structure of the new website?

— Reply to this email directly, view it on GitHub https://github.com/timriffe/TR1/issues/20#issuecomment-1455089401, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG43GY3M4VG7MS5ZAWC6YLW2SGY7ANCNFSM6AAAAAAVB32JZU . You are receiving this because you were mentioned.Message ID: @.***>

timriffe commented 1 year ago

I've patched getHMDcountries() with the subpopulations, so everything should worrk now if you install from github. This will make it to CRAN sometime soon, but not hyperspeed soon