The current version av Mortchartgen causes segfaults with Julia 1.x earlier than 1.1.0-DEV.199, which seems to be related to a bug with array deserialization.
This package can be used to generate charts of mortality trends from the WHO Mortality Database, as well as web templates and documentation for these charts. It is a reimplementation of the mortchartgen program, which uses Python and R for chart generation. I use the package the generate my site with mortality charts, which is available in English and Swedish versions.
Besides the Julia requirements, generation of the site requires the following:
In order to generate the site in a given language (
sv are currently
defined in the configuration file):
mysql --defaults-extra-file=tableimp.cnf < setupdb.sql. The tableimp.cnf file should be edited before the script is run, in order to suit your MySQL configuration.
wpp_convertin Download.jl. This downloads and imports the WHO data into a MySQL database, and also downloads data from the UN World Population Projections, which is used to calculate mortality rates for some countries where population is lacking in WHO Mortality Database for recent years, and converts this data so that it can be merged with the population data frame created in the next step.
$HOME/.odbc.ini. You may have to edit the settings to suit your MySQL configuration.
Mortchartgen.save_frames(cgen_frames())in Mortchartgen.jl. The saved frame can then be reloaded with
writeplotsitewith loaded frames, language and output directory, e.g.
Mortchartgen.writeplotsite(frames, "en", normpath(Mortchartgen.mainpath, "mortchart-site-en")).
site.hsfile in the output directory. Using the Glasgow Haskell Compiler, you can run
ghc --make sitefrom the shell.
./site buildin the output directory. The site will be placed in the
_sitedirectory under the output directory.
about 1 year ago