Giter VIP home page Giter VIP logo

myweatherpy's Introduction

MyweatherPy (Freestyle Project)

(This readme file have been adopted from readme file in (https://github.com/prof-rossetti/robo-advisor-demo-2019/blob/master/README.md) and modified specifically for this app)

Introduction

Welcome to MyweatherPy Application ! (https://github.com/ktg269/myweatherpy)

This application ("app") will display the current weather information based on user input (Zip code or City name,country code) including 1) current time at the user's location, 2) local time at the searched location 3) weather condition, 4) temperature in Celsius and Fahrenheit, 5) humidity, and 6) friendly advice/recommendation based upon the weather condition. This app will also display the weather forecast for the next 5 days every 3 hours including all the above plus the high and low for the foreacst period. After that, the user is asked the reason for their search. Depending upon the user input, customized result will display. User has an option to receipt the weather search result in the email including the forecast information attached as a CSV file.

This app uses openweather API (https://openweathermap.org/api) to provide the automated weather information for the current and the weather forecast. (See below set up section for more information)

Prerequisites

  • Anaconda 3.7
  • Python 3.7
  • Pip
  • ChromeDriver (see installation section for instruction)

Installation

Fork this repository under your own control, then clone or download the resulting repository onto your computer. Then navigate there from the command line:

cd myweaterpy

NOTE: subsequent usage and testing commands assume you are running them from the repository's root directory.

Use Anaconda to create and activate a new virtual environment, perhaps called "myweatherpy-env":

conda create -n myweatherpy-env python=3.7 # (first time only)
conda activate myweatherpy-env

From inside the virtual environment, install package dependencies:

pip install -r requirements.txt

NOTE: The requirements.txt include all packages that you need for running the application. If you still see error messages for part of or all packages, please install them individually using the following instructions:

To install requests package:   pip install requests

To install python-dotenv package:   pip install python-dotenv # note: NOT just "dotenv"

To install tzlocal package:   pip install pytz tzlocal

To install sendgrid package:   pip install sendgrid==6.0.5

To install pillow package:   pip install Pillow

To install selenium package:   pip install selenium

To install timezonefinder package:   pip install timezonefinder

This app also uses automated google search function depending upon your input using ChromeDriver. Please follow the below instructions if you do not have ChromeDriver installed already:

  1. Go to the website (https://sites.google.com/a/chromium.org/chromedriver/)
  2. Download the version that is appropriate for your operating system.
  3. Unzip the file.
  4. Place the file into data directory of your repository. This application detects the directory/location of ChromeDriver using (os.path.join(os.path.dirname(file)) on your operating system.

Setup

Before using this application, take a moment to obtain an openweather API Key (e.g. "abc123").

After obtaining an API Key, create a new file in this repository called ".env", and update the contents of the ".env" file to specify your real API Key:

API_KEY="your key"

Please ensure that you save your real API key in .env file only and DO NOT update the myweatherpy.py script for your real API key in order to ensure your real API key is protected privately.

Usage

Run the recommendation script:

python app/myweatherpy.py

Testing

Install pytest (first time only):

pip install pytest

Run tests:

pytest mytest.py

myweatherpy's People

Contributors

ktg269 avatar

Stargazers

Michael Rossetti avatar

Watchers

James Cloos avatar

Forkers

youjam95

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.