Question: Programming in R. ONLY THIS! additional packages: ggplot2, eurostat, and dplyr can be used. Project description This project is about the harmonized index of consumer

Programming in R.

ONLY THIS! additional packages: ggplot2, eurostat, and dplyr can be used.

Project description

This project is about the harmonized index of consumer prices in the EU. It involves three simple steps. First, you must get the data, then its clustering.

Data

The data come from Eurostat. The easiest way to get the data is to use the eurostat package. We deal with the monthly HICP year-on-year data for the whole basket (CP00) for all EU countries from Feb 2000 through Sep 2022. The datasets code is prc_hicp_manr. In the dataset, there are only countries codes, e.g., `PL` for Poland or DE for Germany. You have to add proper country names.

The way I did It:

prc_hicp_manr$geo[prc_hicp_manr$geo == "AT"]

project3 % filter(coicop == 'CP00') %>% filter(time >= '2000-02-01') %>% filter(time % filter(geo %in% c('Austria', 'Belgium', 'Bulgaria', 'Croatia', 'Cyprus', 'Czechia', 'Denmark', 'Estonia', 'Finland', 'France', 'Germany', 'Greece', 'Hungary', 'Ireland', 'Italy', 'Latvia', 'Lithuania', 'Luxembourg', 'Malta', 'Netherlands', 'Poland', 'Portugal', 'Romania', 'Slovakia', 'Slovenia', 'Spain', 'Sweden')) project3

PLEASE USE project3 DataSet!!!!

I have a problem with clustering:

Clustering

An HICP time series represent each country. All time series are of equal length. We can treat these time series as vectors of equal dimension. We want to see how similar countries are in terms of HICP. Thus, we use the clustering analysis. In particular, you have to use agglomerative hierarchical clustering with complete linkage. Differences between the vectors (times series) should be computed with the Minkowski metrics for p=1.5p=1.5. Finally, based on the resulting tree, create 44 clusters. Once this is done, create a simple visualization. The following figure shows an example of the visualization.

Programming in R. ONLY THIS! additional packages: ggplot2, eurostat, and dplyr can

Thank you in advance for your help.

Transcribed image text

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!