Example #1
0
        public static RankedModel Create(DashboardMetrics initialMetrics)
        {
            var model = new RankedModel();

            model.ProjectId    = initialMetrics.Project.Id;
            model.ProjectTitle = initialMetrics.Project.Title;

            model.AverageCommentsPerPost = new RankedValue <double>(initialMetrics.AverageCommentsPerPost);
            model.AverageLikesPerPost    = new RankedValue <double>(initialMetrics.AverageLikesPerPost);
            model.InteractionRate        = new RankedValue <double>(initialMetrics.InteractionRate);
            model.ResponseRate           = new RankedValue <double>(initialMetrics.ResponseRate);
            model.ResponseTime           = new RankedValue <string>(initialMetrics.ResponseTime);
            model.InvolmentRate          = new RankedValue <double>(initialMetrics.InvolmentRate);
            model.UgcRate = new RankedValue <double>(initialMetrics.UgcRate);

            model.PhotosCount        = new RankedValue <int>(initialMetrics.PhotosCount);
            model.VideosCount        = new RankedValue <int>(initialMetrics.VideosCount);
            model.PostsCount         = new RankedValue <int>(initialMetrics.PostsCount);
            model.TopicsCount        = new RankedValue <int>(initialMetrics.TopicsCount);
            model.TopicCommentsCount = new RankedValue <int>(initialMetrics.TopicCommentsCount);
            model.SharePerPost       = new RankedValue <double>(initialMetrics.SharePerPost);

            model.UsersPostCount = new RankedValue <int>(initialMetrics.UsersPostCount);
            model.AdminPostCount = new RankedValue <int>(initialMetrics.AdminPostCount);

            model.UsersPostsPerUser  = new RankedValue <double>(initialMetrics.UsersPostsPerUser);
            model.AdminPostsPerAdmin = new RankedValue <double>(initialMetrics.AdminPostsPerAdmin);

            model.PostBiggestActivities = initialMetrics.PostBiggestActivities;

            model.UsersCount         = new RankedValue <int>(initialMetrics.UsersCount);
            model.BadFans            = new RankedValue <int>(initialMetrics.BadFans);
            model.BotsCount          = new RankedValue <int>(initialMetrics.BotsCount);
            model.InactiveUsersCount = new RankedValue <int>(initialMetrics.InactiveUsersCount);
            model.ActiveUsersCount   = new RankedValue <int>(initialMetrics.ActiveUsersCount);

            return(model);
        }
 public ConcurrentAnalysisModel(RankedModel baseMetrics, IList <RankedModel> concurrentsRankedMetrics)
 {
     this.baseMetrics = baseMetrics;
     this.Comparisons = concurrentsRankedMetrics;
 }