-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.xml
308 lines (272 loc) · 17.2 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Welcome to my blog</title>
<link>https://liuyanguu.github.io/</link>
<description>Recent content on Welcome to my blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sun, 15 Dec 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://liuyanguu.github.io/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>2024 National K-12: Does a Higher Rating Lead to a Higher Standing?</title>
<link>https://liuyanguu.github.io/post/2024/12/15/2024-national-k-12-does-a-higher-rating-lead-to-a-higher-standing/</link>
<pubDate>Sun, 15 Dec 2024 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2024/12/15/2024-national-k-12-does-a-higher-rating-lead-to-a-higher-standing/</guid>
<description>Statistics of 2024 National K-12 Grades Championship
https://www.uschess.org/results/2024/k12/
Update: An interactive chart of all players has been added
Over 2,600 contestants from 43 states participated in the 2024 National K-12 Grades ChampionshipThe 2024 National K-12 Grades Championship attracted a total of 2,679 participants from 43 states. More than 1,000 participants (40%) came from New York, followed by Virginia with 250 participants (9%) and New Jersey with 218 participants (8%).</description>
</item>
<item>
<title>How many children under 5 worldwide?</title>
<link>https://liuyanguu.github.io/post/2024/12/13/how-many-children-under-5-worldwide/</link>
<pubDate>Fri, 13 Dec 2024 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2024/12/13/how-many-children-under-5-worldwide/</guid>
<description>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 in 2024. This figure peaked in 2017 at 698 million and is projected to decline to 550 million by 2100.</description>
</item>
<item>
<title>Plot multiple countries on the world map</title>
<link>https://liuyanguu.github.io/post/2023/05/29/plot-multiple-countries-on-the-world-map/</link>
<pubDate>Mon, 29 May 2023 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2023/05/29/plot-multiple-countries-on-the-world-map/</guid>
<description>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!
The most straightforward way(You may download the world map from Github)
suppressPackageStartupMessages({library(&quot;data.table&quot;)library(&quot;ggplot2&quot;)library(&quot;rgdal&quot;)library(&quot;raster&quot;)library(&quot;rgeos&quot;)library(&quot;here&quot;)library(&quot;ggthemes&quot;)})# download data from GADM directly and row-bind the spatial polygons data framecnames &lt;- c(&quot;Haiti&quot;, &quot;Togo&quot;, &quot;Uganda&quot;, &quot;Ghana&quot;, &quot;South Africa&quot;, &quot;Angola&quot;)download.</description>
</item>
<item>
<title>RMarkdown to Github Pages</title>
<link>https://liuyanguu.github.io/post/2021/01/06/rmarkdown-to-github-pages/</link>
<pubDate>Wed, 06 Jan 2021 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2021/01/06/rmarkdown-to-github-pages/</guid>
<description>RMarkdown into Github PagesExample of one of my Github pages:You might have read this GitHub and RStudio tutorial by searching this topic. It is quite long and confusing as it tries to teach Git at the same time. You don’t need any of those branch operations. And the example yaml code is not indented correctly (corrected below).
Here is the short version:
Create in the root directory a yaml file: "</description>
</item>
<item>
<title>US and China Admin1 COVID19 mortality and incidence rate</title>
<link>https://liuyanguu.github.io/post/2020/06/14/us-and-china-admin1-covid19-mortality-and-incidence-rate/</link>
<pubDate>Sun, 14 Jun 2020 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2020/06/14/us-and-china-admin1-covid19-mortality-and-incidence-rate/</guid>
<description>USChinaCompared to lung cancer mortalitySimilar 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.
US# major function, can download from Github repo Blogdown/hugo-xmag/Codesource(here::here(&quot;Code/COVID_make_map.R&quot;))# USdt_JUH_US &lt;- get.JHU.us.state()make_heatmap(data = dt_JUH_US, geo_data = get_state_name(),state_var = &quot;Province_State&quot;, fill_var = &quot;Mortality_Rate&quot;, label_var = &quot;abb&quot;)us_maps &lt;- lapply(c(&quot;Mortality_Rate&quot;, &quot;Incident_Rate&quot;, &quot;Testing_Rate&quot;, &quot;Hospitalization_Rate&quot;),make_heatmap, data = dt_JUH_US, geo_data = get_state_name(),state_var = &quot;Province_State&quot;, label_var = &quot;abb&quot;)plot_grid &lt;- gridExtra::grid.</description>
</item>
<item>
<title>ggplot US state and China province heatmap</title>
<link>https://liuyanguu.github.io/post/2020/06/12/ggplot-us-state-and-china-province-heatmap/</link>
<pubDate>Fri, 12 Jun 2020 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2020/06/12/ggplot-us-state-and-china-province-heatmap/</guid>
<description>1. US Map by state Method 1. Use usmap Method 2. Use map_data and build from shape files 2. China map by province Method 1. China map by province using downloaded shap files Method 2. Using geojsonMap (leaflet) (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</description>
</item>
<item>
<title>Working with 3D array as long-format data in R</title>
<link>https://liuyanguu.github.io/post/2020/01/11/working-with-3d-array-as-long-format-data-in-r/</link>
<pubDate>Sat, 11 Jan 2020 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2020/01/11/working-with-3d-array-as-long-format-data-in-r/</guid>
<description>Example: a 3-D array with dimension 4x3x2Melt into longRecover the arraycheck.and.install.pkgs &lt;- function(pkgs){new.packages &lt;- pkgs[!pkgs %in% installed.packages()[,&quot;Package&quot;]]if(length(new.packages)) install.packages(new.packages, dependencies = TRUE)suppressPackageStartupMessages(invisible(lapply(pkgs, library, character.only = TRUE)))}check.and.install.pkgs(c(&quot;data.table&quot;, &quot;reshape2&quot;, &quot;scatterplot3d&quot;))Happy New Year!
Recently I spent some time working with array in R.
I believe it is a bad idea to work with array using for loop, which is both slow and error-prone. We can just melt it into a long data, do the work, and arrange back into array in the end if needed.</description>
</item>
<item>
<title>Drake: powerful tool for automatic reproducible workflow</title>
<link>https://liuyanguu.github.io/post/2019/09/15/drake-powerful-tool-for-automatic-reproducible-workflow/</link>
<pubDate>Sun, 15 Sep 2019 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2019/09/15/drake-powerful-tool-for-automatic-reproducible-workflow/</guid>
<description>drake is a powerful tool for automatic reproducible workflow. I found it a perfect match when used together with RMarkdown. There are great documentations online for drake thus here I only show a simple example working with RMarkdown.
RMarkdown file could be very slow to generate if lots of calculations are involved. Any small revise makes you rerun everything. When we use drake we can do all the calculations in advance thus the rendering is super fast since we only need to re-do the revised object.</description>
</item>
<item>
<title>Notes on writing an R package</title>
<link>https://liuyanguu.github.io/post/2019/07/28/some-experience-on-writing-r-package/</link>
<pubDate>Sun, 28 Jul 2019 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2019/07/28/some-experience-on-writing-r-package/</guid>
<description>Some of my own experienceOn descriptionNamespaceload vs attachDocumentationPotential problems when checking the packageSome nice suggestions from the CRAN team when submitting the packageAlthough ‘SHAPforxgboost’ is not a package too complicated, it took me some time to get the package pass all the cran check. Now (Aug.03,2019) it is available on cran. Install by either
install.packages(&quot;SHAPforxgboost&quot;)or
devtools::install_github(&quot;liuyanguu/SHAPforxgboost&quot;)Use the ‘usethis’ package https://usethis.r-lib.org/ to set up the structure of the package.</description>
</item>
<item>
<title>SHAP for XGBoost in R: SHAPforxgboost</title>
<link>https://liuyanguu.github.io/post/2019/07/18/visualization-of-shap-for-xgboost/</link>
<pubDate>Thu, 18 Jul 2019 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2019/07/18/visualization-of-shap-for-xgboost/</guid>
<description>The SHAPforxgboost packageWhy SHAP valuesLocal explanationConsistency in global feature importanceSHAP plotsSummary plotDependence plotInteraction effectsSHAP force plotReferencesThe SHAPforxgboost packageI 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(&quot;SHAPforxgboost&quot;)# or devtools::install_github(&quot;liuyanguu/SHAPforxgboost&quot;)Why SHAP valuesSHAP’s main advantages are local explanation and consistency in global model structure.</description>
</item>
<item>
<title>Shiny in Blogdown</title>
<link>https://liuyanguu.github.io/post/2019/02/24/shiny-in-blogdown/</link>
<pubDate>Sun, 24 Feb 2019 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2019/02/24/shiny-in-blogdown/</guid>
<description>How to embed ShinyMy Shiny app exampleHow to embed ShinySince 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:
&lt;iframe src="https://liuyanguu.shinyapps.io/bcl_app/" width=1000 height=800"&gt;&lt;/iframe&gt;
There is also a built-in function in knitr to do the same thing and write in the chunk. The only difference is that we can only set height, and the shiny app would appear slightly different with the siderbarPanel at the top and the mainPanel beneath it.</description>
</item>
<item>
<title>Study shrinkage and DART in xgboost modeling using a simple dataset</title>
<link>https://liuyanguu.github.io/post/2018/11/15/xgboost-dart-example/</link>
<pubDate>Thu, 15 Nov 2018 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2018/11/15/xgboost-dart-example/</guid>
<description>DataShrinkageDART: Dropout - MARTskip_droprate_dropone_dropIt is always a good idea to study the packaged algorithm with a simple example. Inspired by my colleague Kodi’s excellent work showing how xgboost handles missing values, I tried a simple 5x2 dataset to show how shrinkage and DART influence the growth of trees in the model.
Dataset.seed(123)n0 &lt;- 5X &lt;- data.frame(x1 = runif(n0), x2 = runif(n0))Y &lt;- c(1, 5, 20, 50, 100)cbind(X, Y)## x1 x2 Y## 1 0.</description>
</item>
<item>
<title>SHAP Visualization in R (first post)</title>
<link>https://liuyanguu.github.io/post/2018/10/14/shap-visualization-for-xgboost/</link>
<pubDate>Sun, 14 Oct 2018 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2018/10/14/shap-visualization-for-xgboost/</guid>
<description>Example 1SHAP summary plotAlternative ways:SHAP dependence plotSHAP interaction effect plotSHAP force plotExample 2Summary plotDependence plot for each featureForce plotStack plot by clustering groupsUpdate 19/07/21:
Since my R Package SHAPforxgboost has been released on CRAN, I updated this post using the new functions and illustrate how to use these functions using two datasets. For more information, please refer to: SHAP visualization for XGBoost in R</description>
</item>
<item>
<title>Spatial data in R: Dividing raster layers into equal-area rings</title>
<link>https://liuyanguu.github.io/post/2018/07/20/spatial-data-in-r-dividing-raster-layers-into-equal-area-rings/</link>
<pubDate>Fri, 20 Jul 2018 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2018/07/20/spatial-data-in-r-dividing-raster-layers-into-equal-area-rings/</guid>
<description>Saturation in ten cities with equal-area ringsR Code for one cityResults for the ring saturationsAverage saturation in each ringMethodologyOriginal CodeThis data visualization example include:
* Import .img file as a raster
* Turn raster into a data.frame of points (coordinates) and values
* Dividing the points into 100 equal-area rings
* Calculate Built-up Area/Urban Extent for each ring
* Turn dataframe into raster</description>
</item>
<item>
<title>How to Draw Heatmap with Colorful Dendrogram</title>
<link>https://liuyanguu.github.io/post/2018/07/16/how-to-draw-heatmap-with-colorful-dendrogram/</link>
<pubDate>Mon, 16 Jul 2018 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2018/07/16/how-to-draw-heatmap-with-colorful-dendrogram/</guid>
<description>DataVersion 1: Color both the branches and labelsVersion 2: color only the labels.Version 3: If there is no color, and we do not reorder the branchesThis data visualization example include:
* Hierarchical clustering, dendrogram and heat map based on normalized odds ratios
* The dendrogram was built separately to give color to dendrogram’s branches/labels based on cluster using dendextend
* Heatmap is made by heatmap.2 from gplots using the built dendrogram</description>
</item>
<item>
<title>Catalog of my old blog</title>
<link>https://liuyanguu.github.io/post/2018/07/01/catalogue-of-my-old-blog/</link>
<pubDate>Sun, 01 Jul 2018 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/post/2018/07/01/catalogue-of-my-old-blog/</guid>
<description>Introducing my new blog written solely in R MarkdownWhen I realized it was so convenient to write blog directly using R Markdown, I searched if there is a specific tool for it. And I found Blogdown, an R package developed by Yihui Xie, who also developed R Markdown.
CatalogAs a summary, I would like to create a catalog for the main topics I wrote on google blogger before July 2018.</description>
</item>
<item>
<title>About Blogdown and Hugo XMag Theme</title>
<link>https://liuyanguu.github.io/about-hugo/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/about-hugo/</guid>
<description>Yang: This is an original page enclosed by Yihui Xie in the Hugo XMag theme he wrote. I really like it and use it for this blog. This post gives a great introduction to how this blog works.
XMag is the second Hugo theme I have designed. It is based on my first Hugo theme XMin, and similarly, features minimalism but with a magazine style on the homepage inspired by The Signpost on Wikipedia.</description>
</item>
<item>
<title>Yang Liu</title>
<link>https://liuyanguu.github.io/about-me/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://liuyanguu.github.io/about-me/</guid>
<description>Thank you for visiting my blog.
I am a statistician focused on child mortality at UNICEF. Prior to my current role, I contributed to environmental epidemiology projects at Mount Sinai Hospital and engaged in urban science research at the NYU Marron Institute. I&rsquo;ve been residing in New York since 2014.
In 2018, I launched a blog to document my projects and share insights from my experience with R programming. As my engagement with the blog and my audience grew, I transitioned to a more advanced platform created with R Blogdown, seeking to leverage its enhanced features for a better blogging experience.</description>
</item>
</channel>
</rss>