> For the complete documentation index, see [llms.txt](https://resources.unizin.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://resources.unizin.org/products/data-and-analytics/unizin-data-platform/data-stores/data-marts/student-activity-score/final.md).

# Final

The *mart\_student\_activity\_score.final* mart presents the final student activity score for a student in an academic term for a given week in the term. The *mart\_student\_activity\_score\_rolling.final* mart presents the final student activity score for a student in an academic term for a rolling 7-day window.

* [BQ Prod Dataset Locations](#user-content-bq-prod-dataset-locations-1)
* [Student Activity Score vs. Student Activity Score Rolling](#student-activity-score-vs.-student-activity-score-rolling)
* [Interactive Mart Dependency Diagram](#interactive-mart-dependency-diagram)
* [Schema](#user-content-schema-1-1)
* [Student Activity Score](#user-content-student-activity-score-1)
* [Average Student Activity Score](#user-content-average-student-activity-score)
* [Student Activity Score Octile](#user-content-student-activity-score-octile)

### BQ Prod Dataset Locations <a href="#user-content-bq-prod-dataset-locations-1" id="user-content-bq-prod-dataset-locations-1"></a>

* mart\_student\_activity\_score
* mart\_student\_activity\_score\_rolling

### **Student Activity Score vs. Student Activity Score Rolling**

Both the *student\_activity\_score* and *student\_activity\_score\_rolling* marts aggregate a student's performance and activities in a course in a 7-day time window. The primary difference is whether the 7-day time window is static or moving.

The *student\_activity\_score* mart defines static weeks in a term, every week starting on Sunday and ending on Saturday. The weeks are calculated based on the start date of the academic session, term, or course. We rely on BigQuery's `DATE_DIFF` function to determine a week number, and this BigQuery function has the start of the weeks on Sundays. We perform the date diff anchored against the start date of the academic session, the academic term, or the course in scope. Our logic prefers the academic session or academic term start dates when possible; this creates a more even baseline for week numbers across courses at scale. Each week in the term will have a fixed start and end date based on the session/term/course start date.

The *student\_activity\_score\_rolling* mart, on the other hand, defines rolling weeks by defining a 7-day time window for each day in a term. The day in a term is calculated using the same logic described above for calculating the week in a term. The time window includes the current day and the previous 6 days. There are some instances where the time window is shorter: if the day in the term is still within 6 days of the first day in the term, since the earliest possible start date is the first day in the term. The rolling 7-day window can be defined on and after the 7th day in the term, until the final day in the term.

In this documentation, any reference to week in the *student\_activity\_score* mart is a static week, while week in the *student\_activity\_score\_rolling* mart is a rolling 7-day window.

### Interactive Mart Dependency Diagram

The following visualization shows the construction of this data mart defined in the [UDP marts](https://gitlab.com/unizin-community/unizin-data-platform/marts) repository. More information on the repository and diagram can be found on [this marts page](/products/data-and-analytics/unizin-data-platform/data-stores/data-marts.md).

{% hint style="info" %}
[Click here to open the interactive chart.](https://assets.public.unizin.org/udp-marts/mart/mart__student_activity_score__final.svg)
{% endhint %}

<figure><img src="https://3709019308-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKYwtHNGgdPXS3PWAlZUr%2Fuploads%2Fgit-blob-cb1131eb4e0f469665873a923586906009c823b5%2Fmart__student_activity_score__final.svg?alt=media&amp;token=11e29705-5007-4851-8728-dfdab2d6182f" alt="The construction of the mart_student_activity_score.final data mart defined in the UDP marts repository"><figcaption><p>mart_student_activity_score.final</p></figcaption></figure>

### Schema <a href="#user-content-schema-1" id="user-content-schema-1"></a>

#### **mart/student\_activity\_score/final**

| Field name                                   | Type    | Description                                                                                                                                                                                                                      |
| -------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| university\_id                               | STRING  | The SIS ID of the student.                                                                                                                                                                                                       |
| global\_user\_id                             | INTEGER | The UDP ID of the student.                                                                                                                                                                                                       |
| canvas\_user\_id                             | STRING  | The Canvas ID of the student.                                                                                                                                                                                                    |
| term\_name                                   | STRING  | The academic term the student is enrolled in, i.e. *Fall 2020*.                                                                                                                                                                  |
| campus\_name                                 | STRING  | The campus of the student for the given academic term.                                                                                                                                                                           |
| academic\_program                            | STRING  | The academic program the student is enrolled in for the given academic term.                                                                                                                                                     |
| week\_number                                 | INTEGER | The week of the academic term.                                                                                                                                                                                                   |
| week\_start\_date                            | DATE    | The start date of the week of the academic term.                                                                                                                                                                                 |
| week\_end\_date                              | DATE    | The end date of the week of the academic term.                                                                                                                                                                                   |
| avg\_student\_activity\_score                | FLOAT   | The average student activity z-score for the given week in the academic term.                                                                                                                                                    |
| avg\_student\_activity\_score\_cumulative    | FLOAT   | The average student activity z-score for the given week in the academic term using cumulative assignment and submission metrics.                                                                                                 |
| student\_activity\_score\_octile             | FLOAT   | The octile of the student's average student activity z-score in comparison to the average student activity score for a cohort of students based on their academic program.                                                       |
| student\_activity\_score\_octile\_cumulative | FLOAT   | The octile of the student's average student activity z-score in comparison to the average student activity score for a cohort of students based on their academic program. Based on cumulative assignment and submission metrics |

### mart/student\_activity\_score\_rolling/final <a href="#user-content-assignments-due" id="user-content-assignments-due"></a>

The *mart\_student\_activity\_score\_rolling.final* schema is the same as *mart\_student\_activity\_score.final*, except that the static week definitions are replaced with rolling week definitions.

| Field             | Data Type | Description                                            |
| ----------------- | --------- | ------------------------------------------------------ |
| week\_number      | INTEGER   | The week of the academic term.                         |
| week\_start\_date | DATE      | The start date of the rolling 7-day window, inclusive. |
| week\_end\_date   | DATE      | The end date of the rolling 7-day window, inclusive.   |

### Student Activity Score <a href="#user-content-student-activity-score-1" id="user-content-student-activity-score-1"></a>

The student activity score defines a "score" for a student's activity in a course's learning environment. The score is calculated using the formula:

`5*[submissions/assignments_due]+2*[navigation_time]+[num_sessions]`

The metrics in brackets are z-scores. The z-score for a student is computed for a week in the course, whether the week is static or rolling. In *student\_activity\_score\_rolling*, the navigation time and number of sessions are based on a one-week period instead of two.

### Average Student Activity Score <a href="#user-content-average-student-activity-score" id="user-content-average-student-activity-score"></a>

The *average\_student\_activity\_score* field is the average student activity z-score across all courses a student is enrolled in for a given week (static or rolling) in an academic term.

### Student Activity Score Octile <a href="#user-content-student-activity-score-octile" id="user-content-student-activity-score-octile"></a>

The *student\_activity\_score\_octile* is the percentile of a student's activity z-score compared to other students. Students are cohorted based on their academic program for the given academic term. The octile of the student's activity score is computed using the `PERCENTILE_CONT` function in BigQuery.

### 10 or More Students Criteria <a href="#user-content-student-activity-score-octile" id="user-content-student-activity-score-octile"></a>

Originally, the Student Activity Score from IU was only computed on courses with 10 or more students enrolled. This filter is no longer enforced. Instead, the `course_final` and `course_section_final` tables have a boolean field called `course_has 10_or_more_students` as a flag that allows users to include or exclude course(s) to align with IU's original definitions. Please see the documentation pages for `course_final` and `course_section_final` for more information on this flag.
