Giter VIP home page Giter VIP logo

weather-observation's Introduction

WEATHER OBSERVATION


Weather Observation is a Python terminal program that runs on the Code Institute mock terminal on Heroku.

Users can view the weather in one city or in several at once. The program will be useful for people who travel and those who want to compare the weather with their city.

Here is the live version of my project.

Responsive site.

FEATURES


  • EXISTING FUNCTIONS

    • To see the weather in a city, you need to enter the name of the city. The name of the city can be entered with both lowercase and uppercase letters. Weather data from one city.
    • The program allows you to see the following weather data:
      • Temperature in degrees Celsius;
      • Weather - the state of the sky: sun, clouds, raine.
      • Clouds, % - the percentage of cloudiness in the sky is from 0 to 100%. Where 0 is it has no clouds and 100% is completely cloudy sky, sun isn't visible.
      • Raine, mm/h - This id how much raine fell in milimeters in one hour. If it shows -- it means that it has not rained in the last hour.
      • HUM, % - This is humidity, measured as a percentage.
      • Wind, km/h - wind speed in kilometers per hour.
    • To see the weather in several cities at the same time: after requesting the application "Would you like to see the weather in another city?", answer the letter y - YES and enter the name of another city. Screenshot of the question.
    • The program allows you to see the weather of up to ten cities at the same time. Screenshot of 10 cities.
    • Input validation
      • The program checks on an empty string.
      • The program checks on numbers and special characters.
      • The program checks on spaces.
      • The program checks for input of the city name with an error.
      • The program checks when requesting "Would you like to see the weather in another city?" a character other than y -YES or n - NO.
  • FUTURE FEATURES

    • Add a five-day weather forecast
    • Add air quality index
    • Add hourly temperature forecast
    • Add atmospheric air pressure
    • Add the chance of rain
    • Add wind direction
    • Add sunrise and sunset times

DATA MODEL


  • Logical structure of WEATHER OBSERVATION:

    Logical structure of WEATHER OBSERVATION.

  • To create the program, I decided to use object-oriented programming and used functions, loops, try statement and if else statement.

  • First, the program greets the user and asks to enter the name of the city.

  • The city value entered by the user will be checked for correctness. If the value is not correct, it will indicate a problem and ask to enter again.

  • The value is then sent to a function that receives weather data from the PyOWM library. Temperature data is rounded to the nearest whole number and wind speed is rounded to the tenth decimal place.

  • The data is written to a list and the PrettyTable library is used to display the weather data in tabular form.

  • After that, another function will ask the user "Would you like to see the weather in another city?". The user must answer YES or NO.

  • The input method receives input values from the user and another function checks them to see if they are correct.

  • If the user selects YES, the program will start from the beginning. If NO, the program will end.

  • The program allows you to view the weather of up to ten cities at the same time, after which the program ends.

TESTING


I have manually tested this project by doing the following:

  • Passed the code through a PEP8 linter and confirmed there are no problems. PEP8.
  • Given invalid inputs: numbers, empty strings, special characters, entering the name of the city with an error.
  • Tested in my local terminal and the Code Institute Heroku terminal.

BUGS


  • SOLVED BUGS
    • When I was writing the project, I got an error that the WHILE loop was constantly looping. This has already been fixed by adding the Break keyword where necessary.
  • REMAINING BUGS
    • No bugs remaining.
  • VALIDATOR TESTING
    • PEP8
      • No errors were returned from PEP8online.com

DEPLOYMENT


This project was deployed using Code Institute's mock terminal for Heroku.

  • Steps for deployment:
    • Fork or clone this repository
    • Create a new Heroku app
    • Set the buildbacks to Python and NodeJs in that order
    • Link the Heroku app to the repository
    • Click on Deploy

Credits


  • Code Institute for the deployment terminal.
  • I used the PyOWM library manual to get the weather data
  • To display the data in the form of a table, I used the PrettyTable library manual.
  • I used Lucid APP to plan the logical sequence of the application

weather-observation's People

Contributors

satogako 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.