Giter Club home page Giter Club logo

cfrome77 / liquid-stats Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 8.62 MB

This project uses the Untappd api, and allows you to keep track of whats beers you have had, your top rated beers, badges you earned, and statics about your untappd checkins.

Home Page: https://liquid-stats.chrisfrome.com

License: MIT License

JavaScript 0.26% Python 95.12% CSS 0.96% HTML 1.47% TypeScript 2.19%
untappd-api node-js webapp mobile-friendly angular angular-material

liquid-stats's Introduction

Liquid Stats

This project uses the Untappd api, and allows you to keep track of whats beers you have had, your top rated beers, badges you earned, and statics about your untappd checkins.

Node CI

Usage

1 - The Untappd API requires that you register your application. Register your app here.

2 - run the following command to create a .env file: cp .env.example .env. Fill in the variables in the .env file with your client_secret, client_id, and untappd username. These variable will be read and used by the fetch_api_data.py file.

3 - The fetch_api_data.py script is used to fetch the data from the api and store it into local copies for faster retreval and to work around Untapp's 100 request per hour limit. fetch_api_data.py requires the requests, and dotenv packages to be installed using pip before any data can be pulled or an error will occur. To fetch the data run python fetch_api_data.py.

4 - In your terminal, run the command npm install to install the dependencies of the project.

5 - In your terminal, run the command grunt to create minified version of the javascript and css files.

Authors

Chris Frome - linkedin.com/in/cfrome77

liquid-stats's People

Contributors

cfrome77 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

liquid-stats's Issues

Popup for stats map marker does not appear when using app (mobile device only)

Describe the bug
No popup appears on the stats page map when a marker is clicked. (mobile only)

To Reproduce
Go to liquid-stats.herrokuapp.com/stats and click on a marker on the map

Expected behavior
When the marker is clicked the popup would appear

Screenshots
N/A

Desktop (please complete the following information):
Mobile only issue

Smartphone (please complete the following information):

  • Device: Galaxy S5
  • OS: Android 6.0.1
  • Browser [e.g. stock browser, safari]
  • Version N/A Heroku app

Filter Data by Brewery

Find a way to filter the data on the stats page by brewery, whether it be a new chart of by clicking the map marker.

Update to allow json to be auto updated

Problem

  • The JSON must be manually updated and pushed to GitHub and Heroku. Find a solution to allow the JSON to updated on a schedule (AWS or other option). This should solution should be set to update the JSON once a week and push to Heroku.

Solution

  1. if AWS is used the python can be updated to be used with Lambdaon a schedule and put the generated code in S3. The HTML code can then be updated to read the file from S3.

example:

import json
import boto3    
s3 = boto3.resource('s3')
s3object = s3.Object('your-bucket-name', 'your_file.json')

s3object.put(
    Body=(bytes(json.dumps(json_data).encode('UTF-8')))
)
  1. The app is deployed on Heroku, which has a built in scheduler
    https://devcenter.heroku.com/articles/scheduler

Add package-lock.json for npm ci

the GitHub actions workflow set up for node.js uses the npm ci command. This command requires that the package-lock.json be present in the repository.

Update package versions to fix vulnerabilities

Some package versions being used contain known vulnerabilities found by the security scanner. Update them to remove these vulnerabilities.
Try: npm update package-lock.json
Alternative: delete pacakge-lock.json and run npm install to reinstall pacakges

Fix overlapping map markers

Breweries on the same street appear to be using the same coordinates. Find a way to make both markers appear on the map.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.