Skip to content
forked from kbathina/Untappd

code for downloading and analyzing Untappd data

Notifications You must be signed in to change notification settings

mk19807/Untappd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to access your data

Note: You'll need python3 and the following packages for this to work

  • pandas
  • json
  • requests
  • urllib.request
  • sys
  • collections
  • datetime
  • os
  • itertools
  • matplotlib
  • numpy
  • random
  • folium
  • seaborn
  • plotly
  • orca

Apply for access

  1. Go here to request access from Untappd
  2. I chose Personal App but you should choose whatever you need it for
  3. You need the
    • Application name
    • Support URL (I put my personal website but it doesn't really matter unless you are trying to access the API for a website)
    • Callback URL (I just used a random word)
    • Description
  4. Once accepted, you should have a Client ID and a Client Secret.

Find Access Token

  1. Fill in the following link with your information replaced (CLIENTID, CALLBACKURL) https://untappd.com/oauth/authenticate/?client_id=CLIENTID&response_type=code&redirect_url=CALLBACKURL and go to the website.

  2. The url in the browser should have changed to https://untappd.com/oauth/authenticate/personal?code=###################. The ################### is your code. Make sure to save this also.

  3. Fill in the following link with your information replaced https://untappd.com/oauth/authorize/?client_id=CLIENTID&client_secret=CLIENTSECRET&response_type=code&redirect_url=redirect_url&code=CODE

    1. CLIENTID = your client_id
    2. CLIENTSECRET = your client_secret
    3. redirect_url = your callback URL
    4. CODE (not code, it is the one in all caps) = the code received from Step 2. You don't need the code anymore after this
  4. You should be sent to a page with your access_token

Collecting Data

  1. Create a txt file called user_information.txt. The file should look like this where ############ is replaced by your information
username      = ############
client_id     = ############
client_secret = ############
access_token  = ############
  1. Run the python file Untappd_Data.py. If you are going to run it in the terminal, type
 python Untappd_Data.py 
  1. The data should now all be downloaded into the data/ directory that was created

Analyzing Data

  1. Run the python file Untappd_Analytics.py. In the terminal, type in
 python Untappd_Analytics.py 
  1. The graphs/ directory should contain all of images.

If you have any new ideas for graphs/analysis, leave a request in the Issues tab and I'll get to it.

About

code for downloading and analyzing Untappd data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%