7 Link and Page Dashboard Functions
7.1 Wrangling Functions
7.1.1 get_module_of_link
Get which module each external link locate based on link tracklog data
and course axis data
Description:
Get which module each external link locate based on link tracklog
data and course axis data
Usage:
get_module_of_link(link_data, course_axis)
Arguments:
link_data: dataframe containing the information of student click any
links in the edx course
course_axis: dataframe containing all elements in the edx course
Value:
link_data
Examples:
get_module_of_link(link_data = set_activity_level, course_axis = read_course_axis)
7.1.2 prepare_page_name
Get non-video and non-problem element name then create a chapter/module
column for all these course elements
Description:
Get non-video and non-problem element name then create a
chapter/module column for all these course elements
Usage:
prepare_page_name(course_axis)
Arguments:
course_axis: dataframe containing all course elements information
Value:
page_name
Examples:
prepare_page_name(course_axis = read_course_axis)
7.1.3 prepare_tidy_page
Prepare tidy page tracklog data for making page summary table
Description:
Prepare tidy page tracklog data for making page summary table
Usage:
prepare_tidy_page(page_data)
Value:
log_data
Examples:
prepare_tidy_page(page_data = read_page_dirt)
7.1.4 read_page_dirt
Import page_dirt.csv files from specified course folder name
Description:
Import page_dirt.csv files from specified course folder name
Usage:
read_page_dirt(input_course)
Value:
page_dirt
Examples:
read_page_dirt(input_couse = "psyc1")
7.1.5 set_activity_level
Set three levels for students total spending time on course based on
tracklog link data
Description:
Set three levels for students total spending time on course based
on tracklog link data
Usage:
set_activity_level(link_data)
Arguments:
link_data: dataframe containing the information of student click any
links in the edx course
Value:
link_data a dataframe with renamed columns and factorized
activity_level
Examples:
set_activity_level(link_data = read_link_dirt)
7.1.6 wrangle_link_page
Read in three csv files getting from rbq.py : course_axis.csv,
external_link_dirt.csv and page_dirt.csv; perform wrangling; export
three csv files for building link_page_dashabord: external_link.csv,
page.csv and page_name.csv
Description:
Read in three csv files getting from rbq.py : course_axis.csv,
external_link_dirt.csv and page_dirt.csv; perform wrangling;
export three csv files for building link_page_dashabord:
external_link.csv, page.csv and page_name.csv
Usage:
wrangle_link_page(input_course)
Examples:
wrangle_link_page(input_cours = "psyc1")
7.1.7 write_link_clean
Export the tidy link dataframe
Description:
Export the tidy link dataframe
Usage:
write_link_clean(input_course, cleaned_data)
Arguments:
cleaned_data: tidy link dataframe
Examples:
write_link_clean(input_course = "psyc1",cleaned_data = get_module_of_link)
7.1.8 write_page_clean
Export the tidy page dataframe
Description:
Export the tidy page dataframe
Usage:
write_page_clean(input_course, cleaned_data)
Arguments:
cleaned_data: A tidy page dataframe.
Examples:
write_page_clean(input_course = "psyc1",cleaned_data = prepare_tidy_page)
7.2 Server Functions
7.2.1 creat_link_table
Create a page summary table to show page(name,clickable hyperlink) and
its page view sorted by pageview in descending order
Description:
Create a page summary table to show page(name,clickable hyperlink)
and its page view sorted by pageview in descending order
Usage:
creat_link_table(link_summary)
Arguments:
page_summary:
Value:
page_df
Examples:
creat_page_table(page_summary = reactive_page())
7.2.2 creat_page_table
create a page summary table to show page(name,clickable hyperlink) and
its page view sorted by pageview in descending order
Description:
create a page summary table to show page(name,clickable hyperlink)
and its page view sorted by pageview in descending order
Usage:
creat_page_table(page_summary)
Arguments:
page_summary:
Value:
page_df
Examples:
creat_page_table(page_summary = reactive_page())
7.2.3 filter_chapter_linkpage
Filter course item dataframe by the selected course module.
Description:
Filter course item dataframe by the selected course module.
Usage:
filter_chapter_linkpage(input_df, module = "All")
Arguments:
input_df: The link dataframe or page dataframe.
module: One of the modules in the course
Value:
A dataframe filtered by the selected course module.
Examples:
filter_chapter(tower_item, "all")
7.2.4 get_click_per_link
Compute how many times each external link have been clicked.
Description:
Compute how many times each external link have been clicked.
Usage:
get_click_per_link(link_df)
Arguments:
link_df: A link dataframe.
Value:
link_num A link dataframe with number of click information.
Examples:
get_click_per_link(link_df = link_dat)
7.2.5 get_page_name
Get the name description of each page.
Description:
Get the name description of each page.
Usage:
get_page_name(page_name_df)
Arguments:
page_name_df: A dataframe we get after joining page dataframe and page
name dataframe.
Value:
each_page
Examples:
get_page_name(page_name_df = page_name_mapping)
7.2.6 get_pageview
Count the pageview of each page.Here, we set a threshold for only
counting pages have been viewed by more than certain amount of
students.
Description:
Count the pageview of each page.Here, we set a threshold for only
counting pages have been viewed by more than certain amount of
students.
Usage:
get_pageview(filtered_log_df)
Arguments:
filtered_log_df: A page related tracklog dataframe after filtering.
Value:
page_student A page summary dataframe containing the pageview of
each pages.
Examples:
get_pageview(filtered_log_df = log_dat)
7.2.7 get_unique_page_name
Remove duplicated name for each page.
Description:
Remove duplicated name for each page.
Usage:
get_unique_page_name(each_page_df)
Arguments:
each_page_df:
Value:
all_pages
Examples:
get_unique_page_name(each_page_df = each_page)