Data Visualization
2024-12-17
1 / 2
Data Visualization
How many children under 5 worldwide?
Yang Liu
/
2024-12-13
Since these figures are not directly available via Google search, I calculated them using the mid-year population estimates from the World Population Prospects (WPP) 2024: World Population: In 2024, the global population is estimated at 8.2 billion (8,162 million). The population is projected to peak in 2084 at 10.3 billion. Children Under 5 Years Old: The number of children under 5 is 647 million…
Data Visualization
Plot multiple countries on the world map
Yang Liu
/
2023-05-29
This post will show it’s quite easy to download and plot the administrative areas of multiple countries on the world map. I will also showcase a bug that puzzled me for a long time and I recently figured out: strange connecting lines among countries! […] (You may download the world map from Github) suppressPackageStartupMessages({ library("data.table") library("ggplot2")…
Data Visualization
US and China Admin1 COVID19 mortality and incidence rate
Yang Liu
/
2020-06-14
Similar to the last heatmap post I just revised, here I wrapped up the function and showing COVID-19 data just downloaded from JHU CSSE Github page. The function can take a given dataset and plot designated variable. Code hosted on my Github repo. […] # major function, can download from Github repo Blogdown/hugo-xmag/Code source(here::here("Code/COVID_make_map.R")) # US dt_JUH_US…
Data Visualization
ggplot US state and China province heatmap
Yang Liu
/
2020-06-12
(Updated on 2020-06-12, First posted on 2019-04-17) It sounds easy but turned out not as straight-forward as I thought. I will show: […] 50-state (including Alaska and Hawaii) United States thematic map, with map scale and with state abbreviations […] China thematic map, with map scale, with names of provinces in either English or Chinese […] The dt1 below can be used by both…
R package
SHAP for XGBoost in R: SHAPforxgboost
Yang Liu
/
2019-07-18
I wrote the R package SHAPforxgboost to cover all the plotting functions illustrated in this post. This post serves as the vignette for the package. Please install from CRAN or Github. install.packages("SHAPforxgboost") # or devtools::install_github("liuyanguu/SHAPforxgboost") Why SHAP values SHAP’s main advantages are local explanation and consistency in global model…
Data Visualization
Shiny in Blogdown
Yang Liu
/
2019-02-24
Since Blogdown is for static websites, it cannot run Shiny in rmarkdown directly. According to discussion here and document here. The only way to do it is using iframe and write outside the chunk: <iframe src="https://liuyanguu.shinyapps.io/bcl_app/" width=1000 height=800"></iframe> There is also a built-in function in knitr to do the same thing and write in the chunk. The only…
««
«
1
2
»
»»