Coder Social home page Coder Social logo

lunch-stats's Introduction

Lunch Stats

Browse on Github Pages

How to contribute

What is this?

A very basic utility to graph lunch arrival times image

Why?

I got sick of guessing when my food delivery will arrive based on gut feeling and decided to utilize a data based approach ๐Ÿค“

How?

My company has a dedicated WhatsApp chat for announcing when a food delivery arrives. I exported this chat to a txt file and wrote a python parser to convert it to JSON and a tiny Plotly based frontend. The entire thing is packed into a single HTML file for easy offline sharing.

Wait but:

  1. Why not use WhatsApp's API? That requires a server, credentials and possibly a WhatsApp business account
  2. Why not generate the chat file by scraping? WhatsApp's web UI implements infinte scroll, which limits scraping (or requires Selenium-like solution, which I didn't feel like implementing)
  3. Why not generate the chat by querying IndexedDB? Skimmed it and looks like it holds encrypted messages. Figuring out how to decode those would take me more time than parsing a txt file
  4. Why plot by search pattern instead of by resturaunt? Identifying, extracting and normalizing resturatunts from free text WhatsApp message requires more NLP/heuristics effort than I was willing to put in

What's next?

  • Autocompletion in search textbox by existing strings Thanks @ofergoli
  • Tags UI for searching multiple resturaunts, instead of separating by commas Thanks @ofergoli
  • Percentiles view Thanks again @ofergoli
  • Mobile support
  • Allow grouping multiple searches as a single resturaunt (or do it automagically)
  • There are more possible improvements, but they will pend for user feedback ๐Ÿ˜‡

That's awesome! How can I help?

  • Are you a developer? You're welcome tackle any of the issues in the What's next section!
  • Are you in this WhatsApp group? Make sure to report as quickly as possible and with consistent spelling!
  • Are you in this WhatsApp group for longer than I am? You can export the chat and send it to me so we'll have more historic data!
  • Do you have an idea for a cool feature? Open an issue!
  • Order me lunch!

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.