# Density Plot, scatter plot or Regression if not both best way to visualize

I am working with a data set that has information of users and their contributions. Each user has expert level and contribute to multiple section of the project. Here is a sample data set:

   user_id contrib_count total_min_length  group_space     expert_level
1   1641254        30           591213              0             l-4
2   1641254         3             9028              1             l-4
3   1641254        23            19347              2             l-4
4   1641254         1               32              3             l-4
5   1641254         1              401              4             l-4
6  21784963       136          1651150              0             l-6
9    105176         6            23816              3             l-5
11   105176         4             6646              4             l-5
12   105176         2           130838              5             l-5
13 18729750        13           636623              0             l-3
14 18729750         5            20304              2             l-3
15 18729750         2             3135             10             l-3


What I really want to find out is how expert levels differ respect to group_space that they are contributing based on the contrib_count.

ggplot(df, aes(x=group_namespace, y=log(contrib_count))) + xlab("group") + ylab("contrib_count") + geom_point()


To start with I ran a simple scatter plot using log of contrib_count, but I don't think it tells a good story of the data. expert level is a factor and I am not sure if a regression would be more meaningful to explain expert_level and group_space they contribute respect to contrib_count?

• Since "group" is discrete you might want to jitter the points a little in the x-direction so you can more easily see differences in center; you might also want to mark centers. What is the 'group' variable? Is it nominal? ordered-categories? a count variable? – Glen_b -Reinstate Monica Jan 7 '15 at 0:12

Visualizing is a start. If I understand correctly, what you can do perhaps is create a plot like above, but for each expert level. You can utilize the facet_wrap option in ggplot2:

ggplot(df, aes(x=group_namespace, y=log(contrib_count))) + xlab("group") + ylab("contrib_count") + geom_point()
ggplot(df, aes(x=group_namespace, y=log(contrib_count))) + xlab("group") + ylab("contrib_count") + geom_point() + facet_wrap(~ expert_level)