Zookeeper Documentation
Upcoming SlideShare
Loading in...5
×
 

Zookeeper Documentation

on

  • 1,086 views

 

Statistics

Views

Total Views
1,086
Views on SlideShare
1,085
Embed Views
1

Actions

Likes
1
Downloads
23
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Zookeeper Documentation Zookeeper Documentation Document Transcript

  • 1 Zookeeper (Bronze) Technical Documentation Andrew Lambert Table of Contents  Introduction – pg 2  Related Work – pg 2  What is the App? – pg 3  System Overview – pg 4 o Header – pg 5 o Chase View – pg 6 o Zoo View – pg 7-9 o Statistics View – pg 10  System Implementation o Database Schema – pg 11 o Header  Menu – pg 12  Friends List – pg 13 o Chase View – pg 14-15 o Zoo View – pg 16-18 o Statistics View – pg 19-24 o Java Uploader for Omron HJ-720 Pedometer – pg 25-27  Future Work – pg 28
  • 2 Introduction Research has shown that a sedentary lifestyle contributes to obesity. To fight chronic diseases like obesity, lifestyle changes are required but are difficult to maintain (Lin et al). A game-based health intervention, Zookeeper helps players establish a more active lifestyle. Zookeeper tracks daily step counts via pedometer and offers compelling content. For example, Zookeeper leverages social game mechanics to encourage players to maintain their health intervention. Zookeeper is part of the Swellness portfolio. Work cited: Lin, J. J., Mamykina, L., Lindtner, S., Delajoux, G., Strub, H. B.: Fish'n'Steps: Encouraging Physical Activity with an Interactive Computer Game. Proc. of the International Conference on Ubiquitous Computing, Orange County, 2006. Related Work The projects of the Swellness portfolio investigate how to leverage social networks to improve our health. A Swellness project, Steps is a Facebook-based health intervention designed to encourage users to establish walking habits. Led by Dr. Paul Resnick and Dr. Mark Newman, Steps had just been released into beta at the time of this documentation. Zookeeper is one design proposal for the next version of Steps. Dr. Caroline Richardson of the Department of Family Medicine is the health domain expert for Steps. Her research prompted Steps.
  • 3 What is the App? You are a zookeeper. Unfortunately, all of your animals have escaped. To recapture an animal, you must consistently meet your daily step goals. Outside of the game, each player must wear an Omron HJ-720 pedometer to track their daily step counts. Zookeeper visualizes pedometer data, offers goal-setting & monitoring, comparisons with friends, and statistics. These features track a player’s progress. To summarize, Zookeeper offers progress tracking and compelling content for players wanting to increase their daily physical activity.
  • 4 System Overview The projects of the Swellness portfolio investigate how to leverage social networks to improve our health. So, Facebook was selected to house Zookeeper because of its application structure. Zookeeper obtains step counts from pedometers. To avoid browser compatibility issues, a Java uploader moves step counts from the Omron HJ-720 pedometer and stores them in Zookeeper’s database. The flow chart below summarizes the system:
  • 5 System Overview: Header Each view will include a header. The header is composed of a menu and friends list. The menu allows navigation to the three views—chase, zoo, and statistics The friends list shows which of your friends use Zookeeper. By clicking a thumbnail, you can visit that friend’s zoo. One thumbnail will be a button to invite more friends to play Zookeeper.
  • 6 System Overview: Chase View The chase view shows the player’s progress towards recapturing an animal. The chase is visualized like a carnival water gun game. As the player meets his daily goals, the progress bar will fill more and more with blue. In this mockup, the player must meet his goals for 40 days in a row before this animal is captured.
  • 7 System Overview: Zoo View The zoo view lists all animals, highlights the current animal being chased, and shows how many animals have been captured.
  • 8 When no animal is being chased, players select which animal they want to chase by clicking a portrait. A prompt box (not shown) confirms the choice. The portrait of the animal being chased receives a blue outline.
  • 9 Upon clicking a friend’s portrait, the player will be taken to the friend’s zoo.
  • 10 System Overview: Statistics View The statistics view tracks players’ progress through their health intervention by providing a step graph, goal tracking & monitoring, statistics, and comparisons with other players.
  • 11 System Implementation Database Schema The schema may be affected by data collection constraints set by the University of Michigan Institutional Review Board.
  • 12 System Implementation: Header The header will be included on each page. System Implementation: Header – Menu Hyperlinks allow navigation to other views. When entering Zookeeper, the player always lands in the Chase view.
  • 13 System Implementation: Header – Friends List The friends list shows friends who have installed Zookeeper and allows the player to invite more. On page load, these algorithms will be executed: I. Grab friends’ thumbnails As the player uses Zookeeper, listeners will await clicking. II. Left and right carousel arrow buttons  Buttons allow player to scroll through friends list. III. Friends’ profile thumbnail in carousel  Clicking a thumbnail will take the player to the friend’s zoo.
  • 14 System Implementation: Chase View On page load, these algorithms will be executed: I. Get player’s profile thumbnail II. Get chase progress  We need to determine how consistent a player has been in meeting their goals. 1. To get current stretch of making goals (numerator), query database  From users table:  currentStretch field 2. Calculate how much of progress bar should be filled 3. Render blue on top of progress bar o To get current stretch required to capture animal (denominator), query database  From users table  currentAnimal field is foreign key to animal table  From animal table  stretchRequired field III. Get animal picture o To lookup image location of animal being chased, query database  From user table  currentAnimal field is foreign key to animal table
  • 15  From animal table  imageLocation field has URL
  • 16 System Implementation: Zoo View On page load, these algorithms will be executed: I. get zoo progress bar (shows how many animals have been recaptured)  Because a player may view his zoo or another player’s zoo, this algorithm depends on who owns the zoo being viewed.  We need to look up how many animals have been captured (numerator) and the total number of animals (denominator). 1. To do so, query database for  animals table  count(aid) field. This tells us the total number of animals (denominator).  user table  uid field as foreign key to captures table  captures table
  • 17  count(cid) field associated with user table’s uid field. This represents how many animals have been captured by this user (numerator). 2. Render blue progress bar 3. Render text II. get animals’ pictures 1. Retrieve each animal’s picture by querying the database.  animal table  imageLocation field stores the image URL 2. In each portrait, put the animal’s image. As the player uses Zookeeper, listeners will await clicking. III. Get animal status  Upon clicking on an animal portrait, a word bubble pops up to explain how a player has interacted with an animal.  The interaction logic is below:  If player hasn’t captured animal yet  Render bubble w/ text: ―It will take you $stretchRequired days to capture me.‖  Else  ―It took you $stretchRequired days of consistently meeting your walking goals to capture me!‖  To retrieve the variables to fill the word bubbles, we need to query the database:
  • 18  user table  currentAnimal field is foreign key to animal table  animal table  stretchRequired field  aid field
  • 19 System Implementation: Statistics View On page load, these algorithms will be executed: I. Get graph data  By default, grab the graph data for the week (last seven days). Query the database.  From user table  uid field is foreign key to steps table  From steps table  For last 30 days (check date field), grab count & goal fields  The other option is to grab the graph for the month (last 30 days). Query the database.
  • 20  From user table  uid field is foreign key to steps table  From steps table  For last 30 days (check date field), grab count & goal fields  Grab daily goals  From user table  uid field is foreign key to steps table  From steps table  Grab all entries of goal field  Format step counts, daily graphs for graph  Render graph II. Get player’s profile picture III. Get daily goal  Query the database.  user table  currentGoal field IV. Get today’s steps  Query the database.  From user table  uid field as foreign key to steps table  From steps table  Count field where date field = today V. Get goal last changed
  • 21  Query the database.  user table  goalLastChanged field VI. Render stale goal  Using the goalLastChanged field from the user table, we need to determine how old a goal is. The older the goal, the more we want to call the user’s attention to it. We do so by drawing a box that has an increasingly harsh color.  The logic is below.  If goalLastChanged is between zero and five days  Don’t draw a box around the player’s goal area.  If goalLastChanged is between six and ten days  Draw a yellow box around the player’s goal area.  If goalLastChanged is greater than 11 days  Draw a red box around the player’s goal area. VII. Get total steps  Go through steps table, sum up all count field associated with player’s uid VIII. Approximate distance  Take total step count and convert to miles. IX. Get most consistent  On page load, show the ―Friends‖ tab.  Get profile thumbnails of friends  The tab has a listener to allow toggling between friends and everyone.  Get profile thumbnails of friends
  • 22 X. Get longest stretch  Query the database.  user table  longestStretch field XI. Get average stretch  Query the database.  user table  uid field is foreign key to steps table  steps table  using date field, calculate average with average(count) field XII. Get current stretch  Query the database.  user table  currentStretch field XIII. Get week tab step statistics  Query the database.  user table  uid field is foreign key for steps table  steps table  For all entries associated with uid field, grab count field  Determine best (most steps) day for this week.  Determine best (most steps) day for last week.  Determine best (most steps) today for all time.
  • 23  Format the data.  Render the data. XIV. Get monthly tab step statistics  Query the database.  user table  uid field is foreign key for steps table  steps table  For last 30 days (check date field), grab count field  Determine average day for this week.  Determine average day for last week.  Determine average today for all time.  Format the data.  Render the data. As the player uses Zookeeper, listeners will await clicking. XV. ―Who’s Most Consistent‖ tabs  The player can switch between the ―Friends‖ tab and the ―Everybody‖ tab, however. XVI. Steps graph time scope  The player can switch between the ―Week view‖ and ―Month view‖ tabs. XVII. Steps graph time slider  The player can click and drag the timeline to view graphs for other days. XVIII. Statistics time scope  The player can switch between ―Week‖ and ―Month‖ tabs.
  • 24 Each night, every player’s currentGoal in will be recorded in the database. Each player’s goal is rendered on the step graphs.  user table  uid field is foreign key to steps table  currentGoal is what we want to record in the steps table  steps table  Fill in date field with today’s date  Fill in goal field with currentGoal field from user table
  • 25 System Implementation: Java Uploader for Omron HJ-720 Pedometer  upon run: enter waiting state o listens for pedometer attachment  when waiting state complete, enter uploading state o throughout state, visualize upload progress to user o get pedometer data o connect to server o store data  assumption: we don’t delete pedometer data  if first upload:  for each day, o query steps table  store each date in the date field
  • 26  store each step count in the count field  if not first upload:  for each day since last upload date, o query steps table  store each date in the date field  store each step count in the count field  update currentStretch field in user table  check if longestStretch field in user table should be updated  If currentStretch > longestStretch: o longestStretch = currentStretch  if error occurs during uploading state o if we know what went wrong  notify user what went wrong, tell them solution to fix o if we don’t know what went wrong  prompt user to fill in a text field, describing what happened o log timestamp, bug report store in uploaderErrors table  bug report in bugReport field  error timestamp in timestamp field o close connection to server o prompt retry or close  when uploading state complete, enter finished state o notify user what’s been uploaded
  • 27 o ask if user wants to open Zookeeper Facebook app in default browser, close this window, or both
  • 28 Future Work The mockups presented haven’t undergone any user testing yet. Next, further design should be done before implementation. Over the game’s life, new content such as additional animals or zoos could be added.