ggraph/ 0000755 0001762 0000144 00000000000 13617251652 011532 5 ustar ligges users ggraph/NAMESPACE 0000644 0001762 0000144 00000025167 13617226237 012765 0 ustar ligges users # Generated by roxygen2: do not edit by hand
S3method("[",geometry)
S3method("[<-",geometry)
S3method(as.data.frame,geometry)
S3method(as.data.frame,layout_ggraph)
S3method(autograph,default)
S3method(c,geometry)
S3method(create_layout,default)
S3method(create_layout,layout_ggraph)
S3method(create_layout,tbl_graph)
S3method(format,geometry)
S3method(ggplot_build,ggraph)
S3method(guide_gengrob,edge_direction)
S3method(guide_geom,edge_direction)
S3method(guide_merge,edge_direction)
S3method(guide_train,edge_colourbar)
S3method(guide_train,edge_direction)
S3method(is.na,geometry)
S3method(layout_to_table,"function")
S3method(layout_to_table,character)
S3method(layout_to_table,data.frame)
S3method(layout_to_table,default)
S3method(layout_to_table,matrix)
S3method(length,geometry)
S3method(makeContent,cappedpathgrob)
S3method(makeContent,parallelPath)
S3method(makeContent,textalong)
S3method(print,geometry)
S3method(rep,geometry)
S3method(scale_type,geometry)
export(FacetEdges)
export(FacetGraph)
export(FacetNodes)
export(GeomAxisHive)
export(GeomEdgeBezier)
export(GeomEdgeBspline)
export(GeomEdgeParallelPath)
export(GeomEdgeParallelSegment)
export(GeomEdgePath)
export(GeomEdgePoint)
export(GeomEdgeSegment)
export(GeomEdgeSpanPath)
export(GeomEdgeSpanSegment)
export(GeomEdgeTile)
export(GeomNodeTile)
export(StatAxisHive)
export(StatConnBundle)
export(StatConnBundle0)
export(StatConnBundle2)
export(StatEdgeArc)
export(StatEdgeArc0)
export(StatEdgeArc2)
export(StatEdgeBend)
export(StatEdgeBend0)
export(StatEdgeBend2)
export(StatEdgeDensity)
export(StatEdgeDiagonal)
export(StatEdgeDiagonal0)
export(StatEdgeDiagonal2)
export(StatEdgeElbow)
export(StatEdgeElbow0)
export(StatEdgeElbow2)
export(StatEdgeFan)
export(StatEdgeFan0)
export(StatEdgeFan2)
export(StatEdgeHive)
export(StatEdgeHive0)
export(StatEdgeHive2)
export(StatEdgeLink)
export(StatEdgeLink2)
export(StatEdgeLoop)
export(StatEdgeLoop0)
export(StatEdgeParallel)
export(StatEdgeParallel0)
export(StatEdgeParallel2)
export(StatFilter)
export(StatNodeArcBar)
export(StatNodeCircle)
export(StatNodeVoronoi)
export(autograph)
export(circle)
export(collect_connections)
export(collect_edges)
export(create_layout)
export(edge_angle)
export(ellipsis)
export(facet_edges)
export(facet_graph)
export(facet_nodes)
export(geom_axis_hive)
export(geom_conn_bundle)
export(geom_conn_bundle0)
export(geom_conn_bundle2)
export(geom_edge_arc)
export(geom_edge_arc0)
export(geom_edge_arc2)
export(geom_edge_bend)
export(geom_edge_bend0)
export(geom_edge_bend2)
export(geom_edge_density)
export(geom_edge_diagonal)
export(geom_edge_diagonal0)
export(geom_edge_diagonal2)
export(geom_edge_elbow)
export(geom_edge_elbow0)
export(geom_edge_elbow2)
export(geom_edge_fan)
export(geom_edge_fan0)
export(geom_edge_fan2)
export(geom_edge_hive)
export(geom_edge_hive0)
export(geom_edge_hive2)
export(geom_edge_link)
export(geom_edge_link0)
export(geom_edge_link2)
export(geom_edge_loop)
export(geom_edge_loop0)
export(geom_edge_parallel)
export(geom_edge_parallel0)
export(geom_edge_parallel2)
export(geom_edge_point)
export(geom_edge_span)
export(geom_edge_span0)
export(geom_edge_span2)
export(geom_edge_tile)
export(geom_node_arc_bar)
export(geom_node_circle)
export(geom_node_label)
export(geom_node_point)
export(geom_node_range)
export(geom_node_text)
export(geom_node_tile)
export(geom_node_voronoi)
export(geometry)
export(get_con)
export(get_edges)
export(get_nodes)
export(ggraph)
export(guide_edge_colorbar)
export(guide_edge_colourbar)
export(guide_edge_direction)
export(is.geometry)
export(label_rect)
export(layout_to_table)
export(node_angle)
export(node_rank_fabric)
export(pack_circles)
export(qgraph)
export(rectangle)
export(scale_color_viridis)
export(scale_edge_alpha)
export(scale_edge_alpha_continuous)
export(scale_edge_alpha_discrete)
export(scale_edge_alpha_identity)
export(scale_edge_alpha_manual)
export(scale_edge_color_brewer)
export(scale_edge_color_continuous)
export(scale_edge_color_discrete)
export(scale_edge_color_distiller)
export(scale_edge_color_gradient)
export(scale_edge_color_gradient2)
export(scale_edge_color_gradientn)
export(scale_edge_color_grey)
export(scale_edge_color_hue)
export(scale_edge_color_identity)
export(scale_edge_color_manual)
export(scale_edge_color_viridis)
export(scale_edge_colour_brewer)
export(scale_edge_colour_continuous)
export(scale_edge_colour_discrete)
export(scale_edge_colour_distiller)
export(scale_edge_colour_gradient)
export(scale_edge_colour_gradient2)
export(scale_edge_colour_gradientn)
export(scale_edge_colour_grey)
export(scale_edge_colour_hue)
export(scale_edge_colour_identity)
export(scale_edge_colour_manual)
export(scale_edge_colour_viridis)
export(scale_edge_fill_brewer)
export(scale_edge_fill_continuous)
export(scale_edge_fill_discrete)
export(scale_edge_fill_distiller)
export(scale_edge_fill_gradient)
export(scale_edge_fill_gradient2)
export(scale_edge_fill_gradientn)
export(scale_edge_fill_grey)
export(scale_edge_fill_hue)
export(scale_edge_fill_identity)
export(scale_edge_fill_manual)
export(scale_edge_fill_viridis)
export(scale_edge_linetype)
export(scale_edge_linetype_continuous)
export(scale_edge_linetype_discrete)
export(scale_edge_linetype_identity)
export(scale_edge_linetype_manual)
export(scale_edge_radius)
export(scale_edge_shape)
export(scale_edge_shape_continuous)
export(scale_edge_shape_discrete)
export(scale_edge_shape_identity)
export(scale_edge_shape_manual)
export(scale_edge_size)
export(scale_edge_size_area)
export(scale_edge_size_continuous)
export(scale_edge_size_discrete)
export(scale_edge_size_identity)
export(scale_edge_size_manual)
export(scale_edge_width)
export(scale_edge_width_continuous)
export(scale_edge_width_discrete)
export(scale_edge_width_identity)
export(scale_edge_width_manual)
export(scale_fill_viridis)
export(scale_label_size)
export(scale_label_size_continuous)
export(scale_label_size_discrete)
export(scale_label_size_identity)
export(scale_label_size_manual)
export(set_graph_style)
export(square)
export(th_foreground)
export(th_no_axes)
export(theme_graph)
export(unset_graph_style)
import(ggplot2)
import(tidygraph)
importFrom(MASS,bandwidth.nrd)
importFrom(MASS,kde2d)
importFrom(Rcpp,sourceCpp)
importFrom(digest,digest)
importFrom(dplyr,"%>%")
importFrom(dplyr,arrange)
importFrom(dplyr,do)
importFrom(dplyr,group_by)
importFrom(dplyr,group_by_)
importFrom(dplyr,mutate)
importFrom(dplyr,n)
importFrom(dplyr,pull)
importFrom(dplyr,slice)
importFrom(dplyr,summarise)
importFrom(dplyr,top_n)
importFrom(dplyr,transmute)
importFrom(dplyr,ungroup)
importFrom(ggforce,GeomArcBar)
importFrom(ggforce,GeomBezier0)
importFrom(ggforce,GeomBspline0)
importFrom(ggforce,GeomCircle)
importFrom(ggforce,GeomShape)
importFrom(ggforce,StatArcBar)
importFrom(ggforce,StatBezier)
importFrom(ggforce,StatBezier0)
importFrom(ggforce,StatBezier2)
importFrom(ggforce,StatBspline)
importFrom(ggforce,StatBspline2)
importFrom(ggforce,StatCircle)
importFrom(ggforce,StatLink)
importFrom(ggforce,StatLink2)
importFrom(ggforce,StatVoronoiTile)
importFrom(ggforce,interpolateDataFrame)
importFrom(ggforce,radial_trans)
importFrom(ggrepel,GeomLabelRepel)
importFrom(ggrepel,GeomTextRepel)
importFrom(graphlayouts,layout_as_backbone)
importFrom(graphlayouts,layout_with_centrality)
importFrom(graphlayouts,layout_with_eigen)
importFrom(graphlayouts,layout_with_focus)
importFrom(graphlayouts,layout_with_pmds)
importFrom(graphlayouts,layout_with_sparse_stress)
importFrom(graphlayouts,layout_with_stress)
importFrom(grid,arrow)
importFrom(grid,convertHeight)
importFrom(grid,convertWidth)
importFrom(grid,convertX)
importFrom(grid,convertY)
importFrom(grid,gList)
importFrom(grid,gTree)
importFrom(grid,gpar)
importFrom(grid,grob)
importFrom(grid,grobHeight)
importFrom(grid,grobName)
importFrom(grid,grobTree)
importFrom(grid,grobWidth)
importFrom(grid,is.unit)
importFrom(grid,makeContent)
importFrom(grid,nullGrob)
importFrom(grid,pointsGrob)
importFrom(grid,polylineGrob)
importFrom(grid,rasterGrob)
importFrom(grid,rectGrob)
importFrom(grid,segmentsGrob)
importFrom(grid,setChildren)
importFrom(grid,textGrob)
importFrom(grid,unit)
importFrom(gtable,gtable)
importFrom(gtable,gtable_add_grob)
importFrom(igraph,"%--%")
importFrom(igraph,"vertex_attr<-")
importFrom(igraph,E)
importFrom(igraph,V)
importFrom(igraph,add_edges)
importFrom(igraph,add_vertices)
importFrom(igraph,as.undirected)
importFrom(igraph,as_edgelist)
importFrom(igraph,bfs)
importFrom(igraph,components)
importFrom(igraph,degree)
importFrom(igraph,delete_edges)
importFrom(igraph,delete_vertex_attr)
importFrom(igraph,distances)
importFrom(igraph,edge_attr)
importFrom(igraph,ends)
importFrom(igraph,gorder)
importFrom(igraph,graph_attr)
importFrom(igraph,gsize)
importFrom(igraph,incident_edges)
importFrom(igraph,induced_subgraph)
importFrom(igraph,is.directed)
importFrom(igraph,is.named)
importFrom(igraph,layout_as_bipartite)
importFrom(igraph,layout_as_star)
importFrom(igraph,layout_as_tree)
importFrom(igraph,layout_in_circle)
importFrom(igraph,layout_nicely)
importFrom(igraph,layout_on_grid)
importFrom(igraph,layout_on_sphere)
importFrom(igraph,layout_randomly)
importFrom(igraph,layout_with_dh)
importFrom(igraph,layout_with_drl)
importFrom(igraph,layout_with_fr)
importFrom(igraph,layout_with_gem)
importFrom(igraph,layout_with_graphopt)
importFrom(igraph,layout_with_kk)
importFrom(igraph,layout_with_lgl)
importFrom(igraph,layout_with_mds)
importFrom(igraph,layout_with_sugiyama)
importFrom(igraph,neighbors)
importFrom(igraph,permute)
importFrom(igraph,shortest_paths)
importFrom(igraph,simplify)
importFrom(igraph,unfold_tree)
importFrom(igraph,vertex_attr)
importFrom(rlang,.data)
importFrom(rlang,as_quosure)
importFrom(rlang,enquo)
importFrom(rlang,eval_tidy)
importFrom(rlang,quo_is_null)
importFrom(rlang,quo_text)
importFrom(rlang,quos)
importFrom(rlang,sym)
importFrom(scales,abs_area)
importFrom(scales,area_pal)
importFrom(scales,brewer_pal)
importFrom(scales,discard)
importFrom(scales,div_gradient_pal)
importFrom(scales,gradient_n_pal)
importFrom(scales,grey_pal)
importFrom(scales,hue_pal)
importFrom(scales,identity_pal)
importFrom(scales,linetype_pal)
importFrom(scales,muted)
importFrom(scales,rescale_max)
importFrom(scales,rescale_mid)
importFrom(scales,rescale_pal)
importFrom(scales,seq_gradient_pal)
importFrom(scales,shape_pal)
importFrom(scales,zero_range)
importFrom(stats,setNames)
importFrom(tidygraph,.G)
importFrom(tidygraph,.register_graph_context)
importFrom(tidygraph,activate)
importFrom(tidygraph,arrange)
importFrom(tidygraph,as_tbl_graph)
importFrom(tidygraph,graph_is_forest)
importFrom(tidygraph,graph_is_tree)
importFrom(tidygraph,node_is_root)
importFrom(utils,head)
importFrom(utils,tail)
importFrom(viridis,scale_color_viridis)
importFrom(viridis,scale_fill_viridis)
importFrom(viridis,viridis)
importFrom(viridis,viridis_pal)
useDynLib(ggraph)
ggraph/LICENSE.note 0000644 0001762 0000144 00000003513 13523247752 013507 0 ustar ligges users The circle packing and minimal enclosing circle algorithms used in the functions
layout_igraph_circlepack() and pack_circles() have been implemented with great
help and inspiration from the source code of D3.js. The use of any of these
function are therefore furthermore under the D3.js license copied below:
D3.js license ------------------------------------------------------------------
Copyright 2010-2016 Mike Bostock
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the author nor the names of contributors may be used to
endorse or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ggraph/LICENSE 0000644 0001762 0000144 00000000061 13523247752 012536 0 ustar ligges users YEAR: 2017
COPYRIGHT HOLDER: Thomas Lin Pedersen
ggraph/README.md 0000644 0001762 0000144 00000012523 13617226142 013010 0 ustar ligges users
# ggraph
[](https://travis-ci.org/thomasp85/ggraph)
[](https://ci.appveyor.com/project/thomasp85/ggraph)
[](https://CRAN.R-project.org/package=ggraph)
[](https://CRAN.R-project.org/package=ggraph)
*/dʒiː.dʒɪˈrɑːf/* (or g-giraffe)
## A grammar of graphics for relational data
ggraph is an extension of [`ggplot2`](http://ggplot2.tidyverse.org)
aimed at supporting relational data structures such as networks, graphs,
and trees. While it builds upon the foundation of `ggplot2` and its API
it comes with its own self-contained set of geoms, facets, etc., as well
as adding the concept of *layouts* to the grammar.
### An example
``` r
library(ggraph)
#> Loading required package: ggplot2
library(tidygraph)
#>
#> Attaching package: 'tidygraph'
#> The following object is masked from 'package:stats':
#>
#> filter
# Create graph of highschool friendships
graph <- as_tbl_graph(highschool) %>%
mutate(Popularity = centrality_degree(mode = 'in'))
# plot using ggraph
ggraph(graph, layout = 'kk') +
geom_edge_fan(aes(alpha = stat(index)), show.legend = FALSE) +
geom_node_point(aes(size = Popularity)) +
facet_edges(~year) +
theme_graph(foreground = 'steelblue', fg_text_colour = 'white')
```

### The core concepts
`ggraph` builds upon three core concepts that are quite easy to
understand:
1. [**The
Layout**](http://www.data-imaginist.com/2017/ggraph-introduction-layouts/)
defines how nodes are placed on the plot, that is, it is a
conversion of the relational structure into an x and y value for
each node in the graph. `ggraph` has access to all layout functions
available in `igraph` and furthermore provides a large selection of
its own, such as hive plots, treemaps, and circle packing.
2. [**The
Nodes**](http://www.data-imaginist.com/2017/ggraph-introduction-nodes/)
are the connected entities in the relational structure. These can be
plotted using the `geom_node_*()` family of geoms. Some node geoms
make more sense for certain layouts, e.g. `geom_node_tile()` for
treemaps and icicle plots, while others are more general purpose,
e.g. `geom_node_point()`.
3. [**The
Edges**](http://www.data-imaginist.com/2017/ggraph-introduction-edges/)
are the connections between the entities in the relational
structure. These can be visualized using the `geom_edge_*()` family
of geoms that contain a lot of different edge types for different
scenarios. Sometimes the edges are implied by the layout (e.g. with
treemaps) and need not be plotted, but often some sort of line is
warranted.
All of the tree concepts have been discussed in detail in dedicated blog
posts that are also available as vignettes in the package. Please refer
to these for more information.
> **Note:** The linked blog posts are based on ggraph v1. After ggraph
> v1.1 the underlying implementation was moved to tidygraph and cleaned
> up, but this resulted in some breaking changes in the process.
> Therefore the vignette versions are generally recommended as they have
> been updated.
### Supported data types
There are many different ways to store and work with relational data in
R. `ggraph` is built upon `tidygraph` and the large swath of data
structures it supports are thus natively supported in `ggraph`. In order
to get a data type supported by `ggraph`, simply provide an
`as_tbl_graph` method for it.
## Installation
`ggraph` is available through CRAN and can be installed with
`install.packages('ggraph')`. The package is under active development
though and the latest set of features can be obtained by installing from
this repository using `devtools`
``` r
devtools::install_github('thomasp85/ggraph')
```
## Related work
`ggraph` is not the only package to provide some sort of support for
relational data in `ggplot2`, though I’m fairly certain that it is the
most ambitious.
[`ggdendro`](https://CRAN.R-project.org/package=ggdendro) provides
support for `dendrogram` and `hclust` objects through conversion of the
structures into line segments that can then be plotted with
`geom_segment()`. [`ggtree`](http://bioconductor.org/packages/ggtree/)
provides more extensive support for all things tree-related, though it
lacks some of the layouts and edge types that `ggraph` offers (it has
other features that `ggraph` lacks though). For more standard *hairball*
network plots
[`ggnetwork`](https://CRAN.R-project.org/package=ggnetwork),
[`geomnet`](https://CRAN.R-project.org/package=geomnet), and
[`GGally`](https://CRAN.R-project.org/package=GGally) all provide some
functionality though none of them are as extensive in scope as `ggraph`.
## Code of Conduct
Please note that the ‘ggraph’ project is released with a [Contributor
Code of
Conduct](https://ggraph.data-imaginist.com/CODE_OF_CONDUCT.html). By
contributing to this project, you agree to abide by its terms.
ggraph/data/ 0000755 0001762 0000144 00000000000 13523247752 012445 5 ustar ligges users ggraph/data/flare.rda 0000644 0001762 0000144 00000013722 12653642310 014223 0 ustar ligges users BZh91AY&SYq ;GpQ~dM"=zRPSF]6mkm+aY2jwwhP}q3SWg*d6z4