Permalink
Browse files

Merge branch 'master' of https://github.com/mitdbg/confo

  • Loading branch information...
2 parents 6eca6d5 + d0e3a45 commit d336fddde53184636bd1b64ef0cca27d4ce0a3fb @srmadden srmadden committed Sep 6, 2011
Showing with 34 additions and 13 deletions.
  1. +14 −1 README.markdown
  2. +7 −4 home/views.py
  3. +5 −3 scripts/loadwords.py
  4. +7 −4 scripts/parser.py
  5. +1 −1 templates/home/firstname.html
View
@@ -42,4 +42,17 @@ Run the server
python manage.py runserver 0.0.0.0:8888
http://localhost:8888
-
+
+
+
+
+Future Features List (TODOs)
+----------------------
+
+* Simple filtering -- e.g., see a subset of years, or a subset of conferences for a given author.
+* Click on a keyword and see all the papers with that word in it for the given year/word
+* "What's hot with XXX" -- sounds kinda weird
+* In the little histograms, display maximum value is -- or show height on mouse over
+* "Hide" a word. Popular words (e.g., "data", "query") make it hard to see the other terms in the little plots.
+* Compare two conferences or people (I'm not sure how that interface would even work)
+* Slow query log like https://github.com/colinhowe/djangosqlsampler
View
@@ -74,18 +74,19 @@ def conference_all(request, cs=None):
def conference(request, name):
# check if name is unique?
try:
- Conference.objects.get(name=name)
+ conf = Conference.objects.get(name=name)
except:
cs = Conference.objects.filter(name__icontains = name)
if len(cs) != 1:
return conference_all(request, cs)
+ conf = cs[0]
cursor = connection.cursor()
- cyears = ConfYear.objects.filter(conf__name = name)
- years = sorted(set([cyear.year for cyear in cyears]))
+ cyears = ConfYear.objects.filter(conf = conf)
+ years = [cyear.year for cyear in cyears]
years = range(min(years), max(years) + 1)
topks = []
@@ -363,7 +364,9 @@ def fname(request):
for fname, d in res.items():
pubcounts = [d.get(x, 0) for x in range(0, 200, bucksize)]
- pubcounts = [sum(pubcounts[i:]) for i in xrange(len(pubcounts))]
+ total = sum(pubcounts)
+ total = 1
+ pubcounts = [sum(pubcounts[i:])/float(total) for i in xrange(len(pubcounts))]
fnamecounts[fname] = pubcounts
print fname, pubcounts
View
@@ -27,21 +27,23 @@ def retf():
for tablename, indexname,_ in createstmts:
q1 = "drop index %s cascade;" % indexname
- q2 = "alter table %s drop contraint %s cascade;" % (tablename, indexname)
+ q2 = "alter table %s drop constraint %s cascade;" % (tablename, indexname)
try:
print q1
cur.execute(q1)
ndropped += 1
transaction.commit()
- except:
+ except Exception, e:
+ print e
transaction.rollback()
try:
print q2
cur.execute(q2)
ndropped += 1
transaction.commit()
- except:
+ except Exception, ee:
+ print ee
transaction.rollback()
print "dropped %d indices." % ndropped
View
@@ -19,10 +19,13 @@ def __init__(self, message):
self.message = message
def process_paper(paperinfo):
- year = int(paperinfo["year"][0])
- title = paperinfo["title"][0]
- confname = paperinfo["booktitle"][0]
- authors = paperinfo.get("author", [])
+ try:
+ year = int(paperinfo["year"][0])
+ title = paperinfo["title"][0]
+ confname = paperinfo["booktitle"][0]
+ authors = paperinfo.get("author", [])
+ except KeyError, e:
+ raise FormatError("unable to get key '" + e.message + "'")
if year < 1910 or year > 2020:
raise FormatError("bad paper year")
@@ -29,7 +29,7 @@
chart.draw(data, {width: 700, height: 500, title: '', interpolateNulls: true,
lineWidth: 1, chartArea: {top: 20, width: "70%", height: "80%"},
hAxis : {slantedText: false, title : '# Publications', maxAlternation: 1},
- vAxis : {logScale: true, title : '# People with more publications (log)', minValue:1}});
+ vAxis : {logScale: true, title : '# People with more publications (log)', }});
}
</script>

0 comments on commit d336fdd

Please sign in to comment.