User Stories Report

library(dplyr)
library(knitr)
library(kableExtra)
library(ggplot2)


knitr::opts_chunk$set(echo = TRUE)

storiesdf <- params$stories
row.names(storiesdf) <- NULL

keywords <- readKeywords()

The following report analises structural data from the user stories, and determines basic weaknesses.


Objectives Stories

The following stories have been identified as objectives.

# Obtain the data
sub_obj <- subset(storiesdf, type == "objective")

# Calculate values for vague objectives
warning_vagueObj <- sapply(sub_obj$goal, function(x) any(is.na(x) | x == '' )) %>% as.logical()


# Get data to calculate conflicts
directions <- unique(sub_obj$goal)
directions <- directions[!is.na(directions)]
#objDirs <- unique(readRDS("objKeywords.rds")$direction)
objDirs <- objKeywords$direction
objDirs <- objDirs[!is.na(objDirs)]
# Get the conflict
warning_confObj <- all( objDirs %in% directions )

r if(!warning_confObj && !warning_vagueObj) {"<!--"}

Warnings: * Conflicting optimisation directions: `r warning_confObj` * Vague objectives: `r warning_vagueObj`

r if(!warning_confObj && !warning_vagueObj) {"-->"}

# Keep a subset
sub_obj_show <- sub_obj[,c("storyId", "who", "what", "why", "goal")]
rownames(sub_obj_show) <- NULL
color_rows <- which(is.na(sub_obj_show$goal))


# Show it
sub_obj_show %>%
  kable(row.names = NA) %>% kable_styling("striped") %>%
  row_spec(color_rows, bold = T, color = "white", background = "#D7261E")


Input Data Stories

The following stories have been identified as input data.

sub_input <- subset(storiesdf, type == "input")
warning_inputLocation <- sapply(sub_input$location, function(x) any(is.na(x) | x == '' )) %>% any() %>% as.logical()

r if(!warning_inputLocation) {"<!--"}

Warnings:

  • Missing input data locations: r warning_inputLocation
r if(!warning_inputLocation) {"-->"}


# Keep a subset
sub_input_show <- sub_input[,c("storyId", "who", "what", "why", "location")]
rownames(sub_input_show) <- NULL
color_rows <- which(is.na(sub_input_show$location))


# Show it
sub_input_show %>%
  kable(row.names = NA) %>% kable_styling("striped") %>%
  row_spec(color_rows, bold = T, color = "white", background = "#D7261E")


Output Data Stories

The following stories have been identified as output data.

# Get the data
sub_output <- subset(storiesdf, type == "output")

# Calculate warnings
warning_outputLocation <- subset(sub_output, goal == "write")$location %>%
  sapply(function(x) any(is.na(x) | x == '' )) %>% any() %>% as.logical()
warning_outputVisualization <- subset(sub_output, goal == "visualise")$location %>%
  sapply(function(x) any(is.na(x) | x == '' )) %>% any() %>% as.logical()

r if(!warning_outputLocation && !warning_outputVisualization) {"<!--"}

Warnings:

  • Missing location for writtings: r warning_outputLocation
  • Missing visualisation types: r warning_outputVisualization
r if(!warning_outputLocation && !warning_outputVisualization) {"-->"}
sub_output_show <- sub_output[,c("storyId", "who", "what", "why", "goal", "location")]
rownames(sub_output_show) <- NULL
color_rows <- which(is.na(sub_output_show$location))


# Show it
sub_output_show %>%
  kable(row.names = NA) %>% kable_styling("striped") %>%
  row_spec(color_rows, bold = T, color = "white", background = "#D7261E")


Constraints

The following stories have been identified as constraints:

# Get the data
sub_const <- subset(storiesdf, type == "constraint")
row.names(sub_const) <- NULL

# Show it
kable(sub_const[,c("storyId", "who", "what", "why")]) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"))


Scenarios

The following stories have been identified as scenarios:

# Get the data
sub_scenario <- subset(storiesdf, type == "scenario")
row.names(sub_scenario) <- NULL

# Show it
kable(sub_scenario[,c("storyId", "who", "what", "why")]) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"))


Semantic Groups

The stories (excluding objectives) have been grouped semantically, according to the similarity of words used. The following groups have been detected:

grouped_stories <- storiesdf[,c("group", "storyId", "who", "what", "why", "type", "belonging")]
grouped_stories <- grouped_stories[order(grouped_stories$group), ]
row.names(grouped_stories) <- NULL



kable(grouped_stories, booktabs = T) %>%
  column_spec(1, bold = T) %>%
  collapse_rows(columns = 1, latex_hline = "major", valign = "middle") %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"))

Proportion of Stories

The following is the proportion of types of stories by type of user, found in this set:

ggplot(storiesdf, aes(x=type, fill = who)) + geom_bar(stat = "count")


Try the oRus package in your browser

Any scripts or data that you put into this service are public.

oRus documentation built on July 8, 2020, 5:17 p.m.