<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/web-scraping-and-applied-clustering-global-happiness-and-social-progress-index/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://datascienceplus.com/web-scraping-and-applied-clustering-global-happiness-and-social-progress-index/"> DataScience+</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Increasing amount of data is available on the web. Web scraping is a technique developed to extract data from web pages automatically and transforming it into a data format for further data analysis and insights. Applied clustering is an unsupervised learning technique that refers to a family of pattern discovery and data mining tools with applications in machine learning, bioinformatics, image analysis, and segmentation of consumer types, among others. R offers several packages and tools for web scraping, data manipulation, statistical analysis and machine learning. The motivation for this post is to illustrate the applications of web scraping, dimension reduction and applied clustering tools in R.<br>
There are two separate data sets for web scraping in this post. The first data set is from a recently released World Happiness Report 2017 by the United Nations Sustainable Development Solutions Network. The 2017 report launched on March 20, the day of world happiness, contained global rankings for happiness and social well-being. The second data set for web scraping is the 2015 social progress index of countries in the world. Social Progress Index has been described as measuring the extent to which countries provide for the social and environmental needs of their citizens. In this exercise, the two data sets joined by country column were pre-processed prior to principal component analysis (PCA) and clustering. The goals of the clustering approach in this post were to segment rows of the over 150 countries in the data into separate groups (clusters), The expectation is that sets of countries within a cluster are as similar as possible to each other for happiness and social progress, and as dissimilar as possible to the other sets of countries assigned in different clusters.</p>
<p><strong>Load Required Packages</strong></p>
<pre>
require(rvest)
require(magrittr)
require(plyr)
require(dplyr)
require(reshape2)
require(ggplot2)
require(FactoMineR)
require(factoextra)
require(cluster)
require(useful)
</pre>
<h2>Web Scraping and Data Pre-processing</h2>
<pre>
# Import the first data set from the site
url1 &lt;- &quot;https://en.wikipedia.org/wiki/World_Happiness_Report&quot;
happy % 
        html_nodes(&quot;table&quot;) %>% 
        extract2(1) %>% 
        html_table()

# inspect imported data structure 

str(happy)
<em>## 'data.frame': 155 obs. of 12 variables:
## $ Overall Rank : int 1 2 3 4 5 6 7 8 9 10 ...
## $ Change in rank : int 3 -1 0 -2 0 1 -1 0 0 0 ...
## $ Country : chr &quot;Norway&quot; &quot;Denmark&quot; &quot;Iceland&quot; &quot;Switzerland&quot; ...
## $ Score : num 7.54 7.52 7.5 7.49 7.47 ...
## $ Change in score : num 0.039 -0.004 0.003 -0.015 0.056 0.038 -0.088 -0.02 -0.029 -0.007 ...
## $ GDP per capita : num 1.62 1.48 1.48 1.56 1.44 ...
## $ Social support : num 1.53 1.55 1.61 1.52 1.54 ...
## $ Healthy life expectancy : num 0.797 0.793 0.834 0.858 0.809 0.811 0.835 0.817 0.844 0.831 ...
## $ Freedom to make life choices: num 0.635 0.626 0.627 0.62 0.618 0.585 0.611 0.614 0.602 0.613 ...
## $ Generosity : num 0.362 0.355 0.476 0.291 0.245 0.47 0.436 0.5 0.478 0.385 ...
## $ Trust : num 0.316 0.401 0.154 0.367 0.383 0.283 0.287 0.383 0.301 0.384 ...
## $ Dystopia : num 2.28 2.31 2.32 2.28 2.43 ...</em></pre>
<p>Pre-process the first data set for analysis:</p>
<pre>
## Exclude columns with ranks and scores, retain the other columns
happy &lt;- happy[c(3,6:11)]
### rename column headers 
colnames(happy) &lt;- gsub(&quot; &quot;, &quot;_&quot;, colnames(happy), perl=TRUE)
names(happy)
<em>## [1] &quot;Country&quot; &quot;GDP_per_capita&quot; ## [3] &quot;Social_support&quot; &quot;Healthy_life_expectancy&quot; ## [5] &quot;Freedom_to_make_life_choices&quot; &quot;Generosity&quot; ## [7] &quot;Trust&quot;
### standardize names of selected countries to confirm with country names in the the map database happy$Country &lt;- as.character(mapvalues(happy$Country, from = c(&quot;United States&quot;, &quot;Congo (Kinshasa)&quot;, &quot;Congo (Brazzaville)&quot;, &quot;Trinidad and Tobago&quot;), to = c(&quot;USA&quot;,&quot;Democratic Republic of the Congo&quot;, &quot;Democratic Republic of the Congo&quot;, &quot;Trinidad&quot;)))</em></pre>
<h2>Import the second data set from the web</h2>
<pre>
### scrape social progress index data report from the site
url2 &lt;- &quot;https://en.wikipedia.org/wiki/List_of_countries_by_Social_Progress_Index&quot;
social % 
     html_nodes(&quot;table&quot;) %>% 
     .[[2]] %>% 
     html_table(fill=T)
# check imported data structure 
str(social)
<em>## 'data.frame': 163 obs. of 9 variables:
## $ Country : chr &quot;Norway&quot; &quot;Sweden&quot; &quot;Switzerland&quot; &quot;Iceland&quot; ...
## $ Rank (SPI) : chr &quot;1&quot; &quot;2&quot; &quot;3&quot; &quot;4&quot; ...
## $ Social Progress Index : chr &quot;88.36&quot; &quot;88.06&quot; &quot;87.97&quot; &quot;87.62&quot; ...
## $ Rank (BHN) : chr &quot;9&quot; &quot;8&quot; &quot;2&quot; &quot;6&quot; ...
## $ Basic Human Needs : chr &quot;94.8&quot; &quot;94.83&quot; &quot;95.66&quot; &quot;95&quot; ...
## $ Rank (FW) : chr &quot;1&quot; &quot;3&quot; &quot;2&quot; &quot;4&quot; ...
## $ Foundations of Well-being: chr &quot;88.46&quot; &quot;86.43&quot; &quot;86.5&quot; &quot;86.11&quot; ...
## $ Rank (O) : chr &quot;9&quot; &quot;5&quot; &quot;10&quot; &quot;11&quot; ...
## $ Opportunity : chr &quot;81.82&quot; &quot;82.93&quot; &quot;81.75&quot; &quot;81.73&quot; ...</em></pre>
<p>Pre-process the second data set for analysis:</p>
<pre>
### Again, exclude columns with ranks, keep the rest
social &lt;- social[c(1,5,7,9)]
### rename column headers 
names(social) &lt;- c(&quot;Country&quot;, &quot;basic_human_needs&quot;, &quot;foundations_well_being&quot;, &quot;opportunity&quot;)

### Standardize country names to confirm with country names in the map dataset 
social$Country &lt;- as.character(mapvalues(social$Country, 
                                         from = c(&quot;United States&quot;, &quot;Côte d'Ivoire&quot;,&quot;Democratic Republic of Congo&quot;, &quot;Congo&quot;, &quot;Trinidad and Tobago&quot;),
                                         to=c(&quot;USA&quot;, &quot;Ivory Cost&quot;,&quot;Democratic Republic of the Congo&quot;, &quot;Democratic Republic of the Congo&quot;, &quot;Trinidad&quot;)))

## coerce character data columns to numeric
social[, 2:4] &lt;- sapply(social[, 2:4], as.numeric)
<em>## Warning in lapply(X = X, FUN = FUN, ...): NAs introduced by coercion
## Warning in lapply(X = X, FUN = FUN, ...): NAs introduced by coercion
## Warning in lapply(X = X, FUN = FUN, ...): NAs introduced by coercion</em></pre>
<p>Join the two imported data sets</p>
<pre>
### perform left join
soc.happy &lt;- left_join(happy, social, by = c('Country' = 'Country'))
### check for missing values in the combined data set
mean(is.na(soc.happy[, 2:10]))
<em>## [1] 0.0353857</em></pre>
<p>Left joining the two data files introduced missing values (approximately 3.5% of the total data set) in the combined data set. R offers a variety of imputation algorithms to populate missing values. In this post, a median imputation strategy was applied by replacing missing values with the median for each column.</p>
<pre>
### median imputation
for(i in 1:ncol(soc.happy[, 2:10])) {
        soc.happy[, 2:10][is.na(soc.happy[, 2:10][,i]), i] &lt;- median(soc.happy[, 2:10][,i], na.rm = TRUE)
}
### summary of the raw data
summary(soc.happy[,2:10])
<em>## GDP_per_capita Social_support Healthy_life_expectancy
## Min. :0.0000 Min. :0.000 Min. :0.0000 ## 1st Qu.:0.6600 1st Qu.:1.042 1st Qu.:0.3570 ## Median :1.0550 Median :1.252 Median :0.6050 ## Mean :0.9779 Mean :1.187 Mean :0.5474 ## 3rd Qu.:1.3150 3rd Qu.:1.412 3rd Qu.:0.7190 ## Max. :1.8710 Max. :1.611 Max. :0.9490 ## Freedom_to_make_life_choices Generosity Trust ## Min. :0.0000 Min. :0.0000 Min. :0.0000 ## 1st Qu.:0.3010 1st Qu.:0.1530 1st Qu.:0.0570 ## Median :0.4370 Median :0.2320 Median :0.0890 ## Mean :0.4078 Mean :0.2461 Mean :0.1224 ## 3rd Qu.:0.5140 3rd Qu.:0.3220 3rd Qu.:0.1530 ## Max. :0.6580 Max. :0.8380 Max. :0.4640 ## basic_human_needs foundations_well_being opportunity ## Min. :26.81 Min. :44.12 Min. :21.12 ## 1st Qu.:61.94 1st Qu.:63.09 1st Qu.:41.43 ## Median :75.73 Median :69.41 Median :49.55 ## Mean :71.82 Mean :68.29 Mean :52.12 ## 3rd Qu.:84.73 3rd Qu.:74.79 3rd Qu.:62.83 ## Max. :96.03 Max. :88.46 Max. :86.58
</em></pre>
<p>An important procedure for meaningful clustering and dimension reduction steps involves data transformation and scaling variables. The simple function below will transform all variables to values between 0 and 1.</p>
<pre>
## transform variables to a range of 0 to 1
range_transform &lt;- function(x) {
     (x - min(x))/(max(x)-min(x))
 }
soc.happy[,2:10] &lt;- as.data.frame(apply(soc.happy[,2:10], 2, range_transform))

### summary of transformed data shows success of transformation
summary(soc.happy[,2:10])
<em>## GDP_per_capita Social_support Healthy_life_expectancy
## Min. :0.0000 Min. :0.0000 Min. :0.0000 ## 1st Qu.:0.3528 1st Qu.:0.6468 1st Qu.:0.3762 ## Median :0.5639 Median :0.7772 Median :0.6375 ## Mean :0.5227 Mean :0.7367 Mean :0.5768 ## 3rd Qu.:0.7028 3rd Qu.:0.8765 3rd Qu.:0.7576 ## Max. :1.0000 Max. :1.0000 Max. :1.0000 ## Freedom_to_make_life_choices Generosity Trust ## Min. :0.0000 Min. :0.0000 Min. :0.0000 ## 1st Qu.:0.4574 1st Qu.:0.1826 1st Qu.:0.1228 ## Median :0.6641 Median :0.2768 Median :0.1918 ## Mean :0.6198 Mean :0.2936 Mean :0.2638 ## 3rd Qu.:0.7812 3rd Qu.:0.3842 3rd Qu.:0.3297 ## Max. :1.0000 Max. :1.0000 Max. :1.0000 ## basic_human_needs foundations_well_being opportunity ## Min. :0.0000 Min. :0.0000 Min. :0.0000 ## 1st Qu.:0.5075 1st Qu.:0.4278 1st Qu.:0.3103 ## Median :0.7067 Median :0.5704 Median :0.4343 ## Mean :0.6503 Mean :0.5451 Mean :0.4735 ## 3rd Qu.:0.8368 3rd Qu.:0.6917 3rd Qu.:0.6372 ## Max. :1.0000 Max. :1.0000 Max. :1.0000
</em></pre>
<p>Although the previous data transformation step could have been adequate for next steps of this analysis, the function shown below would re-scale all variables to a mean of 0 and standard deviation of 1.</p>
<pre>
## Scaling variables to a mean of 0 and standard deviation of 1
sd_scale &lt;- function(x) {
     (x - mean(x))/sd(x)
 }
soc.happy[,2:10] &lt;- as.data.frame(apply(soc.happy[,2:10], 2, sd_scale))

### summary of the scaled data
summary(soc.happy[,2:10])
<em>## GDP_per_capita Social_support Healthy_life_expectancy
## Min. :-2.3045 Min. :-4.1377 Min. :-2.2984 ## 1st Qu.:-0.7492 1st Qu.:-0.5050 1st Qu.:-0.7994 ## Median : 0.1817 Median : 0.2271 Median : 0.2419 ## Mean : 0.0000 Mean : 0.0000 Mean : 0.0000 ## 3rd Qu.: 0.7944 3rd Qu.: 0.7849 3rd Qu.: 0.7206 ## Max. : 2.1046 Max. : 1.4787 Max. : 1.6863 ## Freedom_to_make_life_choices Generosity Trust ## Min. :-2.7245 Min. :-1.8320 Min. :-1.2102 ## 1st Qu.:-0.7137 1st Qu.:-0.6929 1st Qu.:-0.6467 ## Median : 0.1949 Median :-0.1048 Median :-0.3304 ## Mean : 0.0000 Mean : 0.0000 Mean : 0.0000 ## 3rd Qu.: 0.7093 3rd Qu.: 0.5652 3rd Qu.: 0.3023 ## Max. : 1.6713 Max. : 4.4067 Max. : 3.3767 ## basic_human_needs foundations_well_being opportunity ## Min. :-2.6059 Min. :-2.5434 Min. :-1.9025 ## 1st Qu.:-0.5721 1st Qu.:-0.5471 1st Qu.:-0.6559 ## Median : 0.2263 Median : 0.1180 Median :-0.1575 ## Mean : 0.0000 Mean : 0.0000 Mean : 0.0000 ## 3rd Qu.: 0.7474 3rd Qu.: 0.6842 3rd Qu.: 0.6576 ## Max. : 1.4016 Max. : 2.1228 Max. : 2.1154</em></pre>
<h2>Simple correlation analysis</h2>
<p>Now, the data is ready to explore variable relationships with each other.</p>
<pre>
corr &lt;- cor(soc.happy[, 2:10], method=&quot;pearson&quot;)
ggplot(melt(corr, varnames=c(&quot;x&quot;, &quot;y&quot;), value.name=&quot;correlation&quot;), 
       aes(x=x, y=y)) +
             geom_tile(aes(fill=correlation)) +
             scale_fill_gradient2(low=&quot;green&quot;, mid=&quot;yellow&quot;, high=&quot;red&quot;,
             guide=guide_colorbar(ticks=FALSE, barheight = 5),
             limits=c(-1,1)) + 
             theme(axis.text.x = element_text(angle = 90, hjust = 1)) + 
             labs(title=&quot;Heatmap of Correlation Matrix&quot;, 
                  x=NULL, y=NULL)</pre>
<p><a title="" data-rel="lightbox-0" target="_blank" rel="nofollow" href="https://i2.wp.com/datascienceplus.com/wp-content/uploads/2017/04/Picture1.png?ssl=1"><img sizes="(max-width: 490px) 100vw, 490px" alt="" class="wp-image-6095" src="https://i2.wp.com/datascienceplus.com/wp-content/uploads/2017/04/Picture1-490x392.png?w=450&ssl=1" data-recalc-dims="1"></a></p>
<h2>Principal Component Analysis</h2>
<p>Principal component analysis is a multivariate statistics widely used for examining relationships among several quantitative variables. PCA identifies patterns in the variables to reduce the dimensions of the data set in multiple regression and clustering, among others.</p>
<pre>
soc.pca &lt;- PCA(soc.happy[, 2:10], graph=FALSE)
fviz_screeplot(soc.pca, addlabels = TRUE, ylim = c(0, 65))</pre>
<p>Here is the plot:<br>
<a title="" data-rel="lightbox-1" target="_blank" rel="nofollow" href="https://i2.wp.com/datascienceplus.com/wp-content/uploads/2017/04/Picture4.png?ssl=1"><img sizes="(max-width: 490px) 100vw, 490px" alt="" class="wp-image-6098" src="https://i0.wp.com/datascienceplus.com/wp-content/uploads/2017/04/Picture4-490x392.png?w=450&ssl=1" data-recalc-dims="1"></a></p>
<p>The percentages on each bar indicate the proportion of total variance explained by the respective principal component. As seen in the scree plot, the first three principal components accounted for ~80% of the total variance.</p>
<pre>
soc.pca$eig
<em>## eigenvalue percentage of variance cumulative percentage of variance
## comp 1 5.0714898 56.349887 56.34989
## comp 2 1.4357885 15.953205 72.30309
## comp 3 0.6786121 7.540134 79.84323
## comp 4 0.6022997 6.692219 86.53544
## comp 5 0.4007136 4.452373 90.98782
## comp 6 0.3362642 3.736269 94.72409
## comp 7 0.2011131 2.234590 96.95868
## comp 8 0.1471443 1.634937 98.59361
## comp 9 0.1265747 1.406386 100.00000</em></pre>
<p>The output suggests that the first two principal components are worthy of consideration. A practical guide to determining the optimum number of principal component axes could be to consider only those components with eigen values greater than or equal to 1.</p>
<pre>
# Contributions of variables to principal components
soc.pca$var$contrib[,1:3]
<em>## Dim.1 Dim.2 Dim.3
## GDP_per_capita 15.7263477 2.455323e+00 3.162470e-02
## Social_support 12.0654754 5.445993e-01 1.345610e+00
## Healthy_life_expectancy 15.1886385 2.259270e+00 3.317633e+00
## Freedom_to_make_life_choices 6.6999181 2.207049e+01 8.064596e+00
## Generosity 0.3270114 4.189437e+01 5.406678e+01
## Trust 4.3688692 2.570658e+01 3.211058e+01
## basic_human_needs 14.5402807 3.836956e+00 1.021076e+00
## foundations_well_being 15.1664220 1.232353e+00 4.169125e-02
## opportunity 15.9170370 6.170376e-05 4.113192e-04
</em></pre>
<p>The first principal component explained approximately 57% of the total variation and appears to represent opportunity, GDP per capita, healthy life expectancy, Foundations of Well-being, and basic human needs.<br>
The second principal component explained a further 16% of the total variation and represented opportunity, social support, and generosity.</p>
<h2>Applied Clustering</h2>
<p>The syntax for clustering algorithms require specifying the number of desired clusters (k=) as an input. The practical issue is what value should k take? In the absence of a subject-matter knowledge, R offers various empirical approaches for selecting a value of k. One such R tool for suggested best number of clusters is the NbClust package.</p>
<pre>
require(NbClust)
nbc &lt;- NbClust(soc.happy[, 2:10], distance=&quot;manhattan&quot;, 
               min.nc=2, max.nc=30, method=&quot;ward.D&quot;, index='all')
<em>## Warning in pf(beale, pp, df2): NaNs produced
## *** : The Hubert index is a graphical method of determining the number of clusters.
## In the plot of Hubert index, we seek a significant knee that corresponds to a ## significant increase of the value of the measure i.e the significant peak in Hubert
## index second differences plot. ## ## *** : The D index is a graphical method of determining the number of clusters. ## In the plot of D index, we seek a significant knee (the significant peak in Dindex
## second differences plot) that corresponds to a significant increase of the value of
## the measure. ## ## ******************************************************************* ## * Among all indices: ## * 4 proposed 2 as the best number of clusters ## * 9 proposed 3 as the best number of clusters ## * 3 proposed 4 as the best number of clusters ## * 1 proposed 5 as the best number of clusters ## * 1 proposed 9 as the best number of clusters ## * 1 proposed 16 as the best number of clusters ## * 1 proposed 28 as the best number of clusters ## * 2 proposed 29 as the best number of clusters ## * 1 proposed 30 as the best number of clusters ## ## ***** Conclusion ***** ## ## * According to the majority rule, the best number of clusters is 3 ## ## ## *******************************************************************
</em></pre>
<p>The NbClust algorithm suggested a 3-cluster solution to the combined data set. So, we will apply K=3 in next steps.</p>
<pre>
set.seed(4653)
pamK3 &lt;- pam(soc.happy[, 2:10], diss=FALSE, 3, keep.data=TRUE)
# Number of countries assigned in the three clusters
fviz_silhouette(pamK3)
<em>## cluster size ave.sil.width
## 1 1 28 0.40
## 2 2 82 0.29
## 3 3 47 0.27</em></pre>
<p>The number of countries assigned in each cluster is displayed in the table above.<br>
An interesting aspect of the K-medoids algorithm is that it finds observations from the data that are typical of each cluster. So, the following code will ask for a list of “the typical countries” as selected by the algorithm to be closest to the center of the cluster. </p>
<pre>
## which countries were typical of each cluster
soc.happy$Country[pamK3$id.med]
<em>## [1] &quot;Germany&quot; &quot;Macedonia&quot; &quot;Burkina Faso&quot;</em></pre>
<h2>Putting it together</h2>
<p>We can now display individual countries and superimpose their cluster assignments on the plane defined by the first two principal components.</p>
<pre>
soc.happy['cluster'] &lt;- as.factor(pamK3$clustering)

fviz_pca_ind(soc.pca, 
             label=&quot;none&quot;,
             habillage = soc.happy$cluster, #color by cluster
             palette = c(&quot;#00AFBB&quot;, &quot;#E7B800&quot;, &quot;#FC4E07&quot;, &quot;#7CAE00&quot;, &quot;#C77CFF&quot;, &quot;#00BFC4&quot;),
             addEllipses=TRUE
)</pre>
<p><a title="" data-rel="lightbox-2" target="_blank" rel="nofollow" href="https://i1.wp.com/datascienceplus.com/wp-content/uploads/2017/04/Picture2.png?ssl=1"><img sizes="(max-width: 490px) 100vw, 490px" alt="" class="wp-image-6097" src="https://i2.wp.com/datascienceplus.com/wp-content/uploads/2017/04/Picture2-490x392.png?w=450&ssl=1" data-recalc-dims="1"></a></p>
<h2>Finally, displaying clusters of countries on a world map</h2>
<pre>
map.world &lt;- map_data(&quot;world&quot;)
# LEFT JOIN
map.world_joined &lt;- left_join(map.world, soc.happy, by = c('region' = 'Country'))
ggplot() +
        geom_polygon(data = map.world_joined, aes(x = long, y = lat, group = group, fill=cluster, color=cluster)) +
        labs(title = &quot;Applied Clustering World Happiness and Social Progress Index&quot;,
             subtitle = &quot;Based on data from:https://en.wikipedia.org/wiki/World_Happiness_Report and\n 
             https://en.wikipedia.org/wiki/List_of_countries_by_Social_Progress_Index&quot;, 
             x=NULL, y=NULL) +
        coord_equal() +
        theme(panel.grid.major=element_blank(),
              panel.grid.minor=element_blank(),
              axis.text.x=element_blank(),
              axis.text.y=element_blank(),
              axis.ticks=element_blank(),
              panel.background=element_blank()
        )</pre>
<p>The map of clusters:<br>
<a title="" data-rel="lightbox-3" target="_blank" rel="nofollow" href="https://i0.wp.com/datascienceplus.com/wp-content/uploads/2017/04/Picture3.png?ssl=1"><img sizes="(max-width: 490px) 100vw, 490px" alt="" class="wp-image-6096" src="https://i1.wp.com/datascienceplus.com/wp-content/uploads/2017/04/Picture3-490x392.png?w=450&ssl=1" data-recalc-dims="1"></a></p>
<h2>Concluding Remarks</h2>
<p>Cluster analysis and dimension reduction algorithms such as PCA are widely used approaches to split data sets into distinct subsets of groups as well as to reduce the dimensionality of the variables, respectively. Together, these analytics approaches: 1) make the structure of the data easier to understand, and 2) also make subsequent data mining tasks easier to perform. Hopefully, this post has attempted to illustrate the applications of web scraping, pre-processing data for analysis, PCA, and cluster analysis using various tools available in R. Please let us know your comments and suggestions. Ok to networking with the author in LinkdIn.</p>
<ul></ul>
<p><strong>
<p>Related Post</p>
<p>
<ol>
<li><a title="Permanent Link toKey Phrase Extraction from Tweets" target="_blank" rel="nofollow" href="https://datascienceplus.com/key-phrase-extraction-from-tweets/">Key Phrase Extraction from Tweets</a></li>
<li><a title="Permanent Link toFinancial time series forecasting – an easy approach" target="_blank" rel="nofollow" href="https://datascienceplus.com/financial-time-series-forecasting-an-easy-approach/">Financial time series forecasting – an easy approach</a></li>
<li><a title="Permanent Link toOutlier detection and treatment with R" target="_blank" rel="nofollow" href="https://datascienceplus.com/outlier-detection-and-treatment-with-r/">Outlier detection and treatment with R</a></li>
<li><a title="Permanent Link toImplementing Apriori Algorithm in R" target="_blank" rel="nofollow" href="https://datascienceplus.com/implementing-apriori-algorithm-in-r/">Implementing Apriori Algorithm in R</a></li>
<li><a title="Permanent Link toR for Publication: Lesson 6, Part 2 – Linear Mixed Effects Models" target="_blank" rel="nofollow" href="https://datascienceplus.com/r-for-publication-by-page-piccinini-lesson-6-part-2-linear-mixed-effects-models-lmem/">R for Publication: Lesson 6, Part 2 – Linear Mixed Effects Models</a></li>
</ol></strong>
<div>
<a target="_blank" rel="nofollow" href="http://feeds.feedburner.com/~ff/datascienceplus?a=4N3VTOJ-BGY:-YfGgmXxi_o:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/datascienceplus?i=4N3VTOJ-BGY:-YfGgmXxi_o:D7DqB2pKExk" border="0"></a> <a target="_blank" rel="nofollow" href="http://feeds.feedburner.com/~ff/datascienceplus?a=4N3VTOJ-BGY:-YfGgmXxi_o:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/datascienceplus?d=qj6IDK7rITs" border="0"></a> <a target="_blank" rel="nofollow" href="http://feeds.feedburner.com/~ff/datascienceplus?a=4N3VTOJ-BGY:-YfGgmXxi_o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/datascienceplus?d=yIl2AUoC8zA" border="0"></a>
</div>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://datascienceplus.com/web-scraping-and-applied-clustering-global-happiness-and-social-progress-index/"> DataScience+</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/wirsxwW4W_4"></a></div>