Giter VIP home page Giter VIP logo

gradecalculatorr's Introduction

gradecalculatorr

R-CMD-check

Summary

This R package calculates grades for a course. The package allows users to customize their own course information with self-defined course component names, to update grades for different course components, and even understand how well the final exam needs to be to pass the course or achieve a target final grade.

Functions

This package contains the following functions:

  • construct_course: Allow users to input the information for one course component (for example, assignment name and corresponding weight) one by one. Saves the course information as a .csv file to the specified file path. (Note: any user self-defined course component name(s) can be accepted)

  • update_grades: Allow users to update course component grade(s) by loading a certain saved course .csv file. The function can then save the updated course information as a new .csv file to the specified file path.

  • predict_final: Calculate how well the final exam has to be in order to pass the course or achieve a certain grade just before the final exam (for the scenario only when the final grade is missing), based on the provided other course component information.

  • calculate_grade: When all course components are presented, calculate the course overall grade based on information provided.

Suitability within R Ecosystem

This course grade calculator is unique as it provides an interactive way for users to input the course component information and update information as needed. With the predict_final function available, users can understand how well the final exam has to be in order to pass the course or achieve a certain level of grade in this course, then adjust their final review plans based on our calculation, to meet the course expectation.

The package predict_final function does not take any users' previous study or course information into account to calculation of the desired final performance, only based on the current course component information inputted/updated.

There are other course grade calculators in the R ecosystem. An similar example can be found here but it serves a group of students. While other packages focus on auto-grading or group of students without user interaction and they do not provide similar functions like predict_final function in this package.

Installation

You can install the development version of gradecalculatorr from GitHub with:

# install.packages("devtools")
devtools::install_github("UBC-MDS/gradecalculatorr")

Usage

To get started, we load the library:

library(gradecalculatorr)

Next, let's explore the the function construct_course():

construct_course('dsci524','/') 
#> construct_course('dsci524','/') 
# What is name of dsci524 component #1? lab1
# What is weight percentage of dsci524 component #1? 15
# What is name of dsci524 component #2? lab2
# What is weight percentage of dsci524 component #2? 15
# What is name of dsci524 component #3? lab3
# What is weight percentage of dsci524 component #3? 15
# What is name of dsci524 component #4? lab4
# What is weight percentage of dsci524 component #4? 15
# What is name of dsci524 component #5? quiz1
# What is weight percentage of dsci524 component #5? 20
# What is name of dsci524 component #6? quiz2
# What is weight percentage of dsci524 component #6? 20
#  Components         Weights (%)         Grades (%)
# 1       lab1                 15              <NA>
# 2       lab2                 15              <NA>
# 3       lab3                 15              <NA>
# 4       lab4                 15              <NA>
# 5      quiz1                 20              <NA>
# 6      quiz2                 20              <NA>

Then, let's update the grades:

update_component_grade('dsci524.csv', 'lab1', 90.15)
update_component_grade('dsci524.csv', 'lab2', 88.22)
update_component_grade('dsci524.csv', 'lab3', 86.65)
update_component_grade('dsci524.csv', 'lab4', 88.75)
update_component_grade('dsci524.csv', 'quiz1', 90.15)

Then, let's calculate how well the quiz2 has to be in order to get 85% total for course 524:

predict_final('dsci524.csv', 85)
# > [1] 69.5

After quiz2, we know we get 90 for quiz2 and let's calculate the overall grade for course 524:

update_component_grade('dsci524.csv', 'quiz2', 90.25)
calculate_grade('dsci524.csv')
# > [1] "Course grade is 89.15%"

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

Contributors

Members of Group 20 of DSCI524 at UBC:
Chen Lin, Edward Yukun Zhang, Shirley Zhang

License

gradecalculatorpy was created by Chen Lin, Edward Yukun Zhang, Shirley Zhang. It is licensed under the terms of the MIT license.

gradecalculatorr's People

Contributors

yukunzgit avatar shlrley avatar cchchechen avatar

Watchers

 avatar

Forkers

yukunzgit

gradecalculatorr's Issues

[MS2] Function 1 documentation (construct_course.R)

Write the documentation for function 1: construct_course.R.

** Create a designated branch and add useful commit messages!

  • Create R file in the desired location in package
  • Write docstring for milestone2
  • Push to Github.com
  • Have pull request approved for milestone2

(will keep adding tasks along the way till the documentation is fully completed by milestone3)

  • Documentation done.
  • Close issue

[MS2] Function 2 Documentation (update_grades)

Write the documentation for function 2: update_grades.R.

** Create a designated branch and add useful commit messages!

  • Create R file in the desired location in package
  • Write docstrings for methods
  • Create PR
  • Have PR approved and merge branch

[MS2] Update README

Update README file for milestone 1:

  • Edit the package description section
  • Add Functions section
  • Add Suitability within Python Ecosystem section
  • Push to Github.com
  • Pull Request approved and merge to main branch

[MS2] Function 4 documentation (calculate_grade.R)

Write the documentation for function 1: calculate_grade.R

** Create a designated branch and add useful commit messages!

  • Create R file in the desired location in package
  • Write docstring for milestone2
  • Push to Github.com
  • Have pull request approved for milestone2

(will keep adding tasks along the way till the documentation is fully completed by milestone3)

  • Documentation done.
  • Close issue

[MS3] General notes for Friday meeting

To mention

  • For construct_course.R, make the last column filled with 'NA'
  • Should we use write.csv() and read.csv() or write_csv() and read_csv()?
  • Paths should be relative to the test script, + make sure to import libraries in the test script (?)

[MS3] update_grades.R

  • Write code for load_course()
  • Write code for save_course_csv()
  • Write code for update_assignment_grade()
  • Write 3 unittests for update_assignment_grade()
  • Create PR
  • Have PR approved
  • Merge into main branch

License Discussion

  • Examine license for our project and consider whether it's what we want
  • Discuss reasons in R issue
  • Discuss reasons in Python issue

[MS3] Writing unittests workflow

  • Finish writing your function
  • Go to root directory
  • $ R
  • > library(devtools)
  • > library(testthat)
  • > use_testthat()
  • > use_test("update_grades")
    • (replace with name of script)
  • Open the newly created script under tests/testthat/
  • Write your 3 tests in the following format:
test_that("message", {
    expect_equal(..., ...)
})
  • Paths should be relative to the test script, + make sure to import libraries in the test script (?)
  • Save the unit test script
  • > test()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.