Exercise

# Unweighted Clustering Randomizations

We've seen that the bike graph has a very low connectivity relative to a random graph. This is unsurprising because we expect that a graph that represents geographic space should have some parts that are connected by small corridors, and therefore, it wouldn't take much to disconnect the graph. It follows that it's likely that there are geographic clusters that are highly connected to each other and less connected to other clusters. We can test this hypothesis by looking at the transitivity of the network, or the clustering coefficient, a concept introduced in our introductory lesson. Several types of clustering coefficients exist, but we'll be looking at the global definition (essentially the portion of fully closed triangles), which is the same one covered earlier. First, we will look at an unweighted version of the graph and compare it to a random graph.

To calculate the global transitivity of a network, you'll need to set `type`

to `"global"`

in your call to `transitivity()`

.

The bike trip network, `trip_g_simp`

is available.

Instructions 1/3

**undefined XP**

- Calculate the global transitivity of the trip network,
`trip_g_simp`

. - Calculate the number of vertices (the order of the graph) in
`trip_g_simp`

using`gorder()`

. - Calculate the edge density of
`trip_g_simp`

using`edge_density()`

.