Giter Club home page Giter Club logo

publicdata's Introduction

publicdata

npm (scoped)

Centralized location for the public data used by CougarGrades.

Bundles

Bundles of all the UH public data in a streamlined format is available in the Releases tab. These files are preprocessed by bundle.py to compile data from multiple sources into one predictable format.

publicdata's People

Contributors

au5ton avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

publicdata's Issues

Develop "patch" system in bundle format

Idea

Develop common format so that most future data additions won't require updating @cougargrades/importer.

"Patch" system would theoretically have individual objects which:

  • contain a field like "target" that denotes which Firestore objects should be affected by their absolute document path (ex: catalog/CHEM 1331)
    • archetype: 'document' | 'collection'
    • path: path to what is being referred to
  • contain a field like "actions" that denotes which actions should be taken such as
    • write: write the provided object to the Firestore document at the location (will overwrite existing objects) (only for document)
    • merge: merge the provided object with the object at the existing location (will fail if object doesn't exist) (only for document)
    • append: appending to an array-type with a provided amount (any) (only for document)
    • increment: incrementing to a field by a provided amount (number) (only for document)
    • create: write the provided object to a new document in the provided collection (only for collection)

Distinction

Patches are NOT intended to be flexible or programmatic. They should be discrete ways to modify a specific Firestore document in an explicit or "hard-coded" way. Patch files should be used as a medium of interchange and NOT as a method of describing data updates. Ideally, an intelligent tool will have generated a "patch" file that it is certain will be correct.

"Patch" files should be mostly idempotent.

Usage

This "Patch" system would allow the inclusion of supplementary data such as extra fields from various data in this repository. This is especially applicable to the use of:

  • edu.uh.core_by_component
    • usage of core component across Firestore
  • com.collegescheduler.uh.subjects
    • usage of subjectName across Firestore
  • edu.uh.publications.courses
    • linking to the official UH catalog
  • possible RateMyProfessor integration in the future ๐Ÿ‘€

Possible models

write Example

{
  "format": "io.cougargrades.publicdata.patch",
  "target": {
    "archetype": "document",
    "path": "catalog/CHEM 1331"
  },
  "actions": [
    {
      "operation": "write",
      "payload": {
        "department": "CHEM",
        "catalogNumber": "1331",
        "description": "Fundamentals of Chemistry"
      }
    }
  ]
}

merge Example

{
  "format": "io.cougargrades.publicdata.patch",
  "target": {
    "archetype": "document",
    "path": "catalog/CHEM 1331"
  },
  "actions": [
    {
      "operation": "merge",
      "payload": {
        "publicationUrl": "http://publications.uh.edu/preview_course_nopop.php?catoid=34&coid=165599"
      }
    }
  ]
}

append Example

{
  "format": "io.cougargrades.publicdata.patch",
  "target": {
    "archetype": "document",
    "path": "catalog/CHEM 1331"
  },
  "actions": [
    {
      "operation": "append",
      "arrayfield": "instructors",
      "datatype": "firebase.firestore.DocumentReference",
      "payload": "/instructors/Zaitsev, Vladimir G"
    }
  ]
}

increment Example

{
  "format": "io.cougargrades.publicdata.patch",
  "target": {
    "archetype": "document",
    "path": "catalog/CHEM 1331"
  },
  "actions": [
    {
      "operation": "increment",
      "field": "sectionCount",
      "payload": 1
    }
  ]
}

create Example

{
  "format": "io.cougargrades.publicdata.patch",
  "target": {
    "archetype": "collection",
    "path": "users"
  },
  "actions": [
    {
      "operation": "create",
      "payload": {
        "name": "John Doe",
        "score": 9001
      }
    }
  ]
}

Extend io.cougargrades.searchable

Suggested changes:

  • courses.json and instructors.json
    • add totalEnrolled and totalSections properties
  • Transpose edu.uh.publications.subjects/subjects.json to ./subjects.json:
    {
      "MATH": {
        "description": "Mathematics",
        "totalCourses": 123,
        "totalEnrolled": 123,
        "totalSections": 123
      }
    }

tweak Courses.publication patchfile code for multiple

Described in greater detail here: cougargrades/types#12

Some excerpts:

for course in KNOWN_COURSES:
if course.lower().strip() in row["course_title"].lower().strip():
writer.writerow({
"catoid": row["catoid"],
"coid": row["coid"],
"classification": row["classification"],
"department": course.split(' ')[0],
"catalogNumber": course.split(' ')[1],
"title": row["catalog_title"]
})

for row in reader:
with open(destination / f'patch-2-{time_ns()}.json', 'w') as out:
out.write(str(
Patchfile(f'/catalog/{row["department"]} {row["catalogNumber"]}').merge({
"publication": {
"title": row["title"],
"catoid": row["catoid"],
"coid": row["coid"],
"classification": row["classification"],
"url": f'http://publications.uh.edu/preview_course_nopop.php?catoid={row["catoid"]}&coid={row["coid"]}' if row["catoid"] != None and row["coid"] != None else ""
}
})
))

Address Fall 2021 TCCNS Updates

Referenced here: https://uh.edu/academics/courses-enrollment/course-number-updates/index.php

In an effort to make transferring credit for students easier, several University of Houston course names and numbers are changing to align with the TCCNS. These changes go into effect starting in Fall 2021.
Below is a chart outlining all course number changes, organized alphabetically by current UH course number. For more information related to these course changes please see the FAQ page.
The Texas Common Course Numbering System (TCCNS) is a cooperative effort among Texas community colleges and universities to facilitate transfer of freshman- and sophomore-level general academic courses.

I'm curious how this can be addressed in the cougargrades dataset.

Some initial thoughts:

  • Is this even a problem? Can't we just leave them be and start a new "course"?
  • If we were to implement some kind of new "reference" system, what would be the best way to do this?
  • Is it possible for a new course number to conflict with an old course number for a different course?
    • Example:
    • "calc 1 (math 1500)" and "geometry (math 1300)" are courses.
    • "geometry" was discontinued under the course number "math 1300" many years ago, but still exists in old sections
    • "calc 1" has its course number changed to "math 1300"
    • the course number "math 1300" now means 2 completely different courses across a large time period

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.