hefpi
is a web application for the visual exploration of the World
Bank’s Health Equity and Financial Protection Indicators. It is
currently under active development.
You can install hefpi from github by running the following:
devtools::install_github('databrew/hefpi')
To work on developing this package, you’ll likely want to focus on the following files:
R/app_server.R
: The server-side codeR/app_ui.R
: The user interfacedev/run_dev.R
: The code you’ll use to run the app locally after making changes
To deploy on a shiny server, simply place an app.R
file in a folder as
one normally would do, and populate that file with the following lines:
library(hefpi)
run_app()
When re-deploying, you won’t need to re-do the above. But you will need to remove the previous iteration of the app, reinstall, and restart the shiny server.
sudo su - -c "R -e \"remove.packages('hefpi')\""
sudo su - -c "R -e \"devtools::install_github('databrew/hefpi', dependencies = TRUE, force = TRUE)\""
sudo systemctl restart shiny-server
In order to build this package and run the application correctly, one should:
- Clone this repository:
git clone https://github.com/databrew/hefpi
. - Populate the
data-raw/from_web
directory with the following two files (supplied directly from the WB): (a)hefpi_full_database.dta
and (b)Indicator_description.xlsx
. - Populate the
data-raw/from_website
directory with the following three files (taken from the HEFPI website): (a)HEFPICountry.csv
, (b)HEFPIData.csv
, and (c)HEFPISeries.csv
. - Run the script in the same directory to generate R-compatible data
files:
Rscript raw_data.R
- Run
Rscript dev/run_dev.R