Skip to content

Commit

Permalink
Minor style improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
NullHypothesis committed Sep 27, 2017
1 parent 204c345 commit 6f13d8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/analyse_survey_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import collections
import termcolor

METADATA_LINES = 3

# A Response tuple enables intuitive access to specific questions, e.g., by
# writing resp.q5_4 to access question 4 in Section 5.

Expand Down Expand Up @@ -51,9 +53,11 @@ class Demographic(object):
"""

def __init__(self, responses):

self.responses = responses

def __iter__(self):

for x in self.responses:
yield x

Expand Down Expand Up @@ -119,7 +123,7 @@ def parse_data(file_name=sys.argv[1]):
# Discard the first three "responses" because they are meta data and not
# actual responses.

return responses[3:]
return responses[METADATA_LINES:]


def prune_data(demographic):
Expand Down

0 comments on commit 6f13d8b

Please sign in to comment.