require(treemap)
## Loading required package: treemap
require(devtools)
## Loading required package: devtools
#devtools::install_github("timelyportfolio/d3treeR")
require(d3treeR)
## Loading required package: d3treeR
data(GNI2014)
##Static Plot
treemap(
GNI2014,
index=c("continent", "iso3"),
vSize="population",
vColor="GNI",
type="value",
palette="Purples"
)

#Interactive Version to help zero in on smaller
#Boxes
d3tree(
treemap(
GNI2014,
index=c("continent", "iso3"),
vSize="population",
vColor="GNI",
type="value",
palette="Purples"
)
,rootname = "World")



#devtools::install_github("jeromefroe/circlepackeR")
require(circlepackeR)
## Loading required package: circlepackeR
require(data.tree)
## Loading required package: data.tree
## Warning: package 'data.tree' was built under R version 3.4.4
# Create a column that displays the hierarchy in the format root/group/subgroup/...,
GNI2014$pathString<-paste("World", GNI2014$continent,
GNI2014$country, sep="/")
# Reformat data using the data.tree package
population<-as.Node(GNI2014)
circlepackeR(population, size = "population")
circlepackeR(population, size = "GNI",
color_min = "#FF0000")
require(dplyr)
## Loading required package: dplyr
## Warning: package 'dplyr' was built under R version 3.4.4
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
DataFest <- read.csv("~/Desktop/Courses/Data_Visualization/DataViz_Spring2019/Data/DataFest.csv")
DataFest$pathString<-paste("DataFest",
DataFest$CategoryA,
DataFest$CategoryB,
DataFest$Item, sep="/")
# Reformat data using the data.tree package
DataFest_Tree<-as.Node(DataFest)
# Make the plot
circlepackeR(DataFest_Tree, size = "propcost")