uWaterloo / OpenData

Help and Support for University of Waterloo Open Data Initiative
https://api.uwaterloo.ca
90 stars 12 forks source link

Getting course link for the courses in v3 #206

Closed stevesmith121996 closed 3 years ago

stevesmith121996 commented 3 years ago

For specific information regarding courses, v2 offered, among other things - a link to the course. V3 does not offer a link to the course, as well as detailed information regarding the course such as pre-requisites, anti-requisites, units etc is also missing.

Am I missing something here or are those details planned to be added later on?

https://openapi.data.uwaterloo.ca/api-docs/index.html

sbobkin commented 3 years ago

Hi,

For the requisites, we'll add the information in the near future. I cannot tell you yet if it will be a single description covering both requisites, pre-requisites, and anti-requisites or if it will be split out into 3 values. For context, v2 parses the description and does pattern matching to split out the pre/anti/co-requisite text -- this leads to incorrect data in some cases.

We will not be replicating the course URL link. I believe this data represents the page the data was scraped from, and we're not replicating scraping functionality. Quest does not maintain a listing of links to courses internally, which means presently we have no way to get that data and call it authoritative.

Let me know if that answers your question, you have more, or want anything clarified.

stevesmith121996 commented 3 years ago

Thanks for the response. So for the v3, it would not be possible to get the links to the courses at all? Would there be any alternate way to do so?

sbobkin commented 3 years ago

@stevesmith121996 the link is a combination of the values in the data returned with the course calendar URL. We will not create it in the API logic, but clients/applications are welcome to generate it if they think it's valid content. The format is http(s)://www.ucalendar.uwaterloo.ca/{academic_year}/COURSE/course-{SUBJECT}.html#{SUBJECT}{CATALOG_NUMBER}

I know it may seem like a small distinction, but unless Quest/RO decides to tie this URL to a course in the course calendar data they supply us, we will not infer it. This allows us to provide a more strict data quality disclaimer.

sbobkin commented 3 years ago

I've added the requisite description as RO/Quest provides. I believe this resolves the issue outside of the link that we will not replicate. We will continue to add data to the models as it becomes relevant, and available.

Please re-open if there's something else.

stevesmith121996 commented 3 years ago

Thanks for the requisites. The links for the courses however are not valid for all the Courses returned with how you suggested : http://www.ucalendar.uwaterloo.ca/{academic_year}/COURSE/course-{SUBJECT}.html#{SUBJECT}{CATALOG_NUMBER} using this endpoint https://openapi.data.uwaterloo.ca/v3/Courses/1209

There are some courses like 1XX for which creating link in the above way does not work. eg: {'courseId': '009861', 'termCode': '1209', 'termName': 'Fall 2020', 'associatedAcademicCareer': 'UG', 'associatedAcademicGroupCode': 'ART', 'associatedAcademicOrgCode': 'DRAMA', 'subjectCode': 'DRAMA', 'catalogNumber': '2XX', 'title': 'DRAMA Transfer Credit', 'descriptionAbbreviated': 'DRAMA Transfer Credit', 'description': 'Year 2 DRAMA transfer credit course.', 'gradingBasis': 'TRN', 'courseComponentCode': 'LEC', 'enrollConsentCode': 'N', 'enrollConsentDescription': 'No Consent Required', 'dropConsentCode': 'N', 'dropConsentDescription': 'No Consent Required', 'requirementsDescription': None}

http://www.ucalendar.uwaterloo.ca/2021/COURSE/course-DRAMA.html#DRAMA2XX

There are some other courses as well for which they don't exist on the catalog page:, eg: {'courseId': '011209', 'termCode': '1209', 'termName': 'Fall 2020', 'associatedAcademicCareer': 'UG', 'associatedAcademicGroupCode': 'ART', 'associatedAcademicOrgCode': 'VPA', 'subjectCode': 'ARCHL', 'catalogNumber': '313W', 'title': 'Technology 1: Tools, Techniques and Material Culture (WLU)', 'descriptionAbbreviated': 'Tech 1:Tools,Tech&MatCult(WLU)', 'description': '', 'gradingBasis': 'ABC', 'courseComponentCode': 'LEC', 'enrollConsentCode': 'N', 'enrollConsentDescription': 'No Consent Required', 'dropConsentCode': 'N', 'dropConsentDescription': 'No Consent Required', 'requirementsDescription': None} http://www.ucalendar.uwaterloo.ca/2021/COURSE/course-ARCHL.html#ARCHL313W

Am I missing something here?

sbobkin commented 3 years ago

There are courses in Quest that don't map to the Waterloo course catalog. This can be for a variety of reasons, such as internal descriptions, courses that are offered through WLU or other universities, course to map transfer credits, and more.

In practice, I think we should only make course data available for courses that are meant to appear in the course catalog, and have updated the API to return only those.

It's possible there will be records that won't map to that URL schema, and this is not inherently wrong, but we should be much closer.

stevesmith121996 commented 3 years ago

Thanks for that. The logic to generate the URL : http(s)://www.ucalendar.uwaterloo.ca/{academic_year}/COURSE/course-{SUBJECT}.html#{SUBJECT}{CATALOG_NUMBER} seems to be valid for undergraduate courses only. Do you have similar logic to generate urls for graduate courses as well?

sbobkin commented 3 years ago

The graduate courses, as far as I know, are here: https://uwaterloo.ca/graduate-studies-academic-calendar/

From quickly looking around you can get a URL for a subject area, but not to a course that comes from actual course data. They're all content management system node ID that won't exist in Quest/RO data, and hence will not be able to be generated off the API data. I encourage you to look around, maybe you'll find a page on the calendar webpage that has a URL format that's more helpful.

stevesmith121996 commented 3 years ago

Yes, I stumbled upon the link you mentioned and saw that the ids are node ids and not course ids so no direct way of reaching to the course page. Anyhow, if in future you support this functionality, comment on this issue if possible. Thanks.