Code Monkey home page Code Monkey logo

ccsu-opendata's Introduction

ccsu-opendata

Frequency analysis database for CCSU Exams This repo contains frequency analysis data on topics that appeared in CCSU Exams. This data is freely accessible/editable/exploitable under the Open Data initiative.

Directory Structure

Relative to the root of the repo, the data is store at following path:

/{CourseName}/{SubjectCode}.json

Where CourseName is name of the course (for e.g. BCA), and SubjectCode is the three digit code for each subject (for e.g. 503)

Schema

The schema is available in the schema.json file.

Contributions

As of yet, data is only available for the BCA course. Contributions for other courses will appreciated.

Testing

The json files must follow the schema defined in schema.json. To test the compliance of your changes locally, use the go testing tools. Follow the following steps:

  1. Download and install go from https://go.dev/dl/
  2. Run go test in the repo's root

ccsu-opendata's People

Contributors

keogami avatar mrverma2703 avatar iffu03 avatar karoshinara avatar deepanshu0598 avatar aavishrastogi avatar

ccsu-opendata's Issues

Test is flaky because go's json parser is case-insensitive

err = json.NewDecoder(file).Decode(&data)

Turns out Go's json parser allows case-insensitive keys even when a struct tag is provided in the struct's definition. And there is a 7 year old issue which the Go team doesn't seem too keen on resolving.

Since this behavior is incompatible with other language's json parser, we can't use Go to run these tests.

I propose that a better test would be to use a json schema validation library in some other language like python or typescript. Allowing us to use the json schema definition file as the source of truth.

Update schema to encode optionality of the topics

The problem

As pointed out by @Nayonika1, certain questions have a choice between them for the student but there's no way of encoding that in the schema.

This implies that we can not ensure that the sum of weights for each year is indeed 75 (as they must be for accuracy).

To solve this problem the schema must be modified to encode this information. Currently there are two potential solutions.

Solution by me

We add a new key of "or" to each year which is an array of topic name for which the current topic had a choice with.
For example, if we had topic A and B which had a choice in year 2022, we can encode that as

"topics: [
  {
    "name": "A",
    "weights": [{
      "year": 2022,
      "weight": 7.5,
      "or": ["B"]
    }]
  },
  {
    "name": "B",
    "weights": [{
      "year": 2022,
      "weight": 7.5,
      "or": ["A"]
    }]
  },
]

This encodes the information accurately without any ambiguity. However, it will be hard for new members to create these files which is an explicit goal for this project.
Also, without using a format like jsonp it will not be very error prone.

Solution by @deepanshu0598

"topics: [
  {
    "name": "A",
    "weights": [{
      "year": 2022,
      "weight": 7.5,
      "optional": true
    }]
  },
  {
    "name": "B",
    "weights": [{
      "year": 2022,
      "weight": 7.5,
      "optional": true
    }]
  },
]

This solution trades accuracy for feasibility.

Should we even?

Currently, it is not clear if this level accuracy is critical for us or not. And as such, it is decided to not make any changes.

Future

In case a solution is found which is accurate enough without trading feasibility and ease of creation by new members, the schema may be changed.

It would be beneficial to make sure that these changes are backward compatible.

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.