Blog

R Assignment ( Case Study to use 'Data Transformation' & 'Data Visualization' tools of R ) -

 

1) Install a package called "unvotes" into your system  ( this is a package available at CRAN ) 

 

2) show the list of datasets available in "unvotes" package as Char Vector

 

3) Show the structure of all the datasets available in "unvotes" package by 

    creating a user_defined_function which will take the name of a  package as input           

    and which will return the following output -

           a) Name of the Dataset in the package given as input

           b) brief description of each dataset in the package

    Name the user Defined Package as "UDF_Glimpse_All_DS"

 

4) Load the datasets in the "unvotes" package into R 

    Show the structure of all Datasets in "unvotes" package 

 

5) Find the number of distinct countries in the un_votes table

 

6) update the table un_votes to also include the 'Session ' & 'date' columns 

     from the un_roll_calls table based upon the common column 'rcid' between

     the 2 tables 

 

7) show the summary view from un_votes at the level of Country Name , 

     and for each country 

     show the number of records per country in un_votes dataset 

        and also show the number of 'Yes' voting by the country 

        and also show the number of 'No' voting by the country

        and also show the number of voting which is neither no or yes by country

        and finally sort the output by count of 'yes' votes in descending order

 

8) Show the countries and their total voting from un_votes table 

     where the countries have a total 'Yes' voting count of less than 100

 

9) Take the updated un_votes table containing the date column

     now show a summary of percentage of yes vote per year 

 

10) Draw a line plot showing the evolution of yes votes % over the years 

      for all the countries combined voting pattern.

      give a title to the plot as "Line Plot for Yearly Yes Vote %"

 

11) Draw a line plot showing the evolution of yes votes % over the years 

      for India's voting pattern,

      give a title to the plot as "Line Plot for Yearly Yes Vote % by India"

@AUTHOR : Admin

Tags:Eco, Water, Air, Environment

Comments (0)

    No Comments Found
Leave a Comment