Giter Site home page Giter Site logo

zarifmahmud / aqi-bot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5 KB

My Reddit bot that responds to comments in the form: /u/aqi-bot "<city>" , and responds with the Air Quality Index for the city, along with sources. There can also be text before or after the key phrase. Data sourced from WAQI.

Python 100.00%

aqi-bot's Introduction

AQI Bot

This is a Reddit bot that returns the Air Quality Index of any city given to it.

How to Use

To use the bot on Reddit, all you have to do is mention its name in your comment, and then put the name of the city whose AQI you want afterwards, in quotes. So to get the AQI for Beijing, you could write something like: Calling on /u/aqi-bot "New Delhi" The bot will then return the Air Quality Index, along with the date its accurate to, and its source.

Disclaimer

This bot is runs on PRAW, and gets its data from the World Air Quality Index project. It's only as good as its data, so the bot may return out of date information if the data isn't there yet, and so be sure to check out what date and time the info is accurate to, which will be included in aqi-bot's reply.

To use the World Air Quality Index project's API, you'll need to get a free API key from their website. To get a Reddit bot running using PRAW, you'll need your own Reddit account, and feed in its username, password, client-id and client-secret to PRAW, which I store in a praw.ini file not included in the public repository.

aqi-bot's People

Contributors

zarifmahmud avatar

Watchers

 avatar

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.