Skip to content

Commit

Permalink
Merge pull request #5 from NUDelta/ipm-scraper
Browse files Browse the repository at this point in the history
Added IPM scrapper and DTR canvas mapping App
  • Loading branch information
shankar97 authored Mar 18, 2020
2 parents bf020ab + 196f756 commit 572b9de
Show file tree
Hide file tree
Showing 18 changed files with 1,490 additions and 28 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,14 @@ This repo contains the code used during Spring 2018 when we were trying to test
## douglas-sidebar
The code for the Google Sheets add-on *Douglas Recommender*. This code is still used as the base behind the Sheets plugin.


## douglas-api
The *outdated* code that used to power the Douglas backend, and return helper recommendations based on the task a user inputs to the system.


## ipm-scraper
This is a python script to collect completed learning modules by members of DTR. The script dumps the information into a csv.


## dtr-canvas-mapping
This is a python flask app hosted on heroku to provide an interface to get canvas sections completed.
1 change: 1 addition & 0 deletions dtr-canvas-mapping/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pyc
1 change: 1 addition & 0 deletions dtr-canvas-mapping/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn app:app
1 change: 1 addition & 0 deletions dtr-canvas-mapping/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# dtr-canvas-mapping
50 changes: 50 additions & 0 deletions dtr-canvas-mapping/app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import json
import sys
from flask import Flask
from flask import request, redirect
from flask import render_template

def recommend(section_query):
with open("app/canvasSections.json") as canvas_json:
canvas_map = json.load(canvas_json)
search_dict = {}
for user in canvas_map:
name = unicode(user["name"])
sections = user["sections"][0]
for section in sections:
for prompt_list in sections[section]:
# pdb.set_trace()
cur_key = unicode(section) + " --> " + unicode(prompt_list["prompt"])
if cur_key in search_dict:
search_dict[cur_key].append((name, unicode(prompt_list["status"])))
else:
search_dict[cur_key] = [(name, unicode(prompt_list["status"]))]
if section_query in search_dict:
# result = search_dict[section_query]
# for helper in result:
# print("Helper: " + helper[0] + " (" + helper[1] + ')')
return search_dict[section_query]
else:
return [section_query + " not found in the canvas"]
return

app = Flask(__name__)
@app.route('/', methods=["GET", "POST"])
def index():
with open("app/canvasKeys.json") as f:
canvasKeys = json.load(f)
canvasKeys = sorted(canvasKeys.keys())
helpers = []
not_found = False
sectionCell = ""
if request.form:
sectionCell = request.form["section"] + " -- " + request.form["cell"]
query = request.form["section"] + " --> " + request.form["cell"]
helpers = recommend(query)
if len(helpers) == 1:
not_found = True
return render_template('index.html', canvasKeys=canvasKeys, helpers=helpers, not_found=not_found, sectionCell=sectionCell)

if __name__ == '__main__':
# pdb.set_trace()
app.run(debug=True, host='0.0.0.0')
1 change: 1 addition & 0 deletions dtr-canvas-mapping/app/canvasKeys.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Section 4-7: Design Arguments": ["What should users do? (And what should happen when they do it?)", "Where can designs go wrong? What may prevent a user from reaching their goal?", "What are the core characteristics of your design?", "Why would the design work?"], "Section 10: Interface Arguments": ["Problem Statement", "Why Important?", "Desired Outcome", "Core Obstacles", "Interface Feature", "Interface Argument"], "Section 8-9: Check you Design Argument": ["What is your conceptual approach to solving the problem?", "What is your design argument?", "Will your design work? Is it novel?"], "Section 14a: Study Aims and Expected Outcomes": ["What is the goal of conducting your study?"], "Section 16: Data Collection": ["How will you collect data?", "What specific data will you collect?", "What measures and claims does the collected data inform?"], "Section 13: System Models": ["How does the system actually work?", "Does the system solve the technical challenges?"], "Section 3: Describe Broader Impact": ["Who is the practical audience?", "Why do they care (is this problem important?)", "What\u2019s your problem statement? (Does it capture a core tension? Agent wants X but Y)"], "Section 12: System Arguments": ["Problem Statement", "Why Important?", "Desired Outcome", "Core Obstacles", "Method or Technique", "Technical Argument"], "Section 11: Interface Models": ["From the user perspective, how does the system work? (Journey Map, Storyboard, Lofi Prototype)", "Does the interface solve the user\u2019s problem?"], "Section 15b: Study Setup (Scenario)": ["What are the testing conditions?", "When and where will they use the app?", "How often will they use the app, and how long at a time?", "What are the dates of testing, and the total duration?", "What high-level tasks will the users be asked to perform?"], "Section 15a: Study Setup (Participants)": ["Demographics", "Recruitment Method", "Additional User Requirements", "How will they communicate with you during study?", "How will they be compensated?"], "Section 1: Identify a Design Situation": ["Who are the users?", "What are their high level tasks and goals?"], "Section 18: Design Implications": ["Based on your findings, what are your revised design arguments?", "Based on your findings, how will your interface model change?", "Based on your findings, how will your system model change?", "Based on your findings, how will your study design change?"], "Section 2: Test if a Design Problem": ["Are users struggling to accomplish their goals (what are their struggles?)", "Are these struggles the result of a design challenge?", "Can the problem already be solved with current technology?"], "Section 17: Core Findings": ["What is your core finding?", "Statement of research question", "Re-state core finding", "Provide evidence for core finding", "What parts of your design argument were correct?", "What parts of your design argument were incorrect?", "What parts of your design argument or claims couldn't be tested?", "What new obstacles were encountered for reaching the desired outcomes?"], "Section 14b: Study Aims and Expected Outcomes": ["What research question will your study answer?", "What are your design arguments and claims going into the study?", "What are your measures for your design argument/claims?"]}
1 change: 1 addition & 0 deletions dtr-canvas-mapping/app/canvasSections.json

Large diffs are not rendered by default.

Loading

0 comments on commit 572b9de

Please sign in to comment.