hmd.mx
reads "Mx" (1x1) data from the Human Mortality Database (HMD http://www.mortality.org) and constructs a demogdata object suitable for plotting using plot.demogdata
and fitting an LC or BMS model using lca
or an
FDA model using fdm
.
hmd.pop
reads "Population" (1x1) data from the HMD and constructs a demogdata object suitable for plotting using plot.demogdata
.
hmd.e0
reads life expectancy at birth from the HMD and returns the result as a ts
object.
hmd.mx(country, username, password, label = country)
hmd.mx(country, username, password, label = country)
hmd.e0(country, username, password)
demogdata
with the following components:
rate
but containing population numbers instead of demographic rates.hmd.pop
returns a similar object but without the rate
component.
hmd.e0
returns an object of class ts
with columns male
, female
and total
.
The country codes (as at 31 July 2012) are as follows.
Australia |
AUS |
Austria |
AUT |
Belarus |
BLR |
Belgium |
BEL |
Bulgaria |
BGR |
Canada |
CAN |
Chile |
CHL |
Czech Republic |
CZE |
Denmark |
DNK |
Estonia |
EST |
Finland |
FIN |
France |
-- France total population |
FRATNP |
-- France civilian population |
FRACNP |
Germany |
-- Germany total population |
DEUTNP |
-- West Germany |
DEUTFRG |
-- East Germany |
DEUTGDR |
Hungary |
HUN |
Iceland |
ISL |
Ireland |
IRL |
Israel |
ISR |
Italy |
ITA |
Japan |
JPN |
Latvia |
LVA |
Lithuania |
LTU |
Luxembourg |
LUX |
Netherlands |
NLD |
New Zealand |
-- NZ total population |
NZL_NP |
-- NZ Maori |
NZL_MA |
-- NZ non-Maori |
NZL_NM |
Norway |
NOR |
Poland |
POL |
Portugal |
PRT |
Russia |
RUS |
Slovakia |
SVK |
Slovenia |
SVN |
Spain |
ESP |
Sweden |
SWE |
Switzerland |
CHE |
Taiwan |
TWN |
United Kingdom |
-- UK Total Population |
GBR_NP |
-- England & Wales Total Population |
GBRTENW |
-- England & Wales Civilian Population |
GBRCENW |
-- Scotland |
GBR_SCO |
-- Northern Ireland |
GBR_NIR |
U.S.A. |
USA |
Ukraine |
UKR |
demogdata
,read.demogdata
,plot.demogdata
, life.expectancy
## Not run:
# norway <- hmd.mx("NOR", username, password, "Norway")
# summary(norway)## End(Not run)
Run the code above in your browser using DataLab