AC |OWLEDGEME!
It is with great reverence that we express our gratitude to our guides “Ms. Pragati
Rajput, Mrs. Shalu Jain”, Department of Information Technology Engincering,
Indira Gandhi Engineering College for their precious guidance and help in this
project work. The eredit for the successful completion of this project goes to their
keen interest, timing guidance and valuable suggestion otherwise our endeavour
‘would have been futile,
We owe to “Prof. Amy Alice Kujur”, Head of Department of Information
Technology Engineering for his persistent encouragement and blessing which were
bestowed upon us.
We owe our sincere thanks to honourable Principal “Dr Anurag Trivedi”, for his
kind support which he rendered us in the envisage for great success of our project.
Vikalp Dubey: 06011191066
Ankit Mishra: 06011T191007|DIRA GANDHI ENGINEERING COLLEGE
SAGAR (M.P.)
DECLARATION
We hereby declare that the following Minor Project on “Weather App” is an
authentic work done by us. We undertake the project as a part of the course
curriculum of Bachelor of Technology in Information Technology of Indira Gandhi
Engineering College, Sagar (M.P.) affiliated to Rajiv Gandhi Proudyogiki
Vishwavidyalaya, Bhopal (M.P.).
Vikalp Dubey: 060111191066
Ankit Mishra: 06011T191007Table of Contents
Sr.No Title Page No
1__ | Introduction 6
1.1 Background 7
1.2 Objectives 8
1.3 Purpose and Scope 9
2__| Survey of Technology 10
3_| Requirement and Analysis, 12
3.1 Feasibility study
12
3.2 Hardware and Software Requirements
13
L 4 _| system Design M4
4.1 ER Diagram 14
42 Activity Diagram 15
4.3 Use Case Diagram 16
4.4. Sequence Diagram 17
4.5 Snapshot 18
4.6 Data Flow Diagram 20
4.7 Source Code 21
Reference and Bibliography 23Weather App
1. INTRODUCTION
Weather forecasting is the application of science and technology to predict the conditions of the
atmosphere for a given location and time.
Human beings have attempted to predict the weather informally for millennia and formally since
the 19th century. Weather forecasts are made by collecting quantitative data about the current
state of the atmosphere at a given place and using meteorology to project how the atmosphere
will change.
Once a human-only endeavor based mainly upon changes in barometric pressure, current
weather conditions, and sky condition or cloud cover, weather forecasting now relies on
computer-based models that take many atmospheric factors into account, Human input is still
required to pick the best possible forecast model to base the forecast upon, which involves
pattern recognition skills, tele-connections, knowledge of model performance, and knowledge of
model biases. The inaccuracy of forecasting is due to the chaotic nature of the atmosphere, the
massive computational power required to solve the equations that describe the atmosphere, the
error involved in measuring the initial conditions, and an incomplete understanding of
atmospheric processes. Hence, forecasts become less accurate as the difference between current
time and the time for which the forecast is being made (the range of the forecast) increases, The
use of ensembles and model consensus help narrow the error and pick the most likely outcome.
There are a variety of end uses to weather forecasts. Weather warnings are important forecasts
because they are used to protect life and property. Forecasts based on temperature and
precipitation are important to agriculture, and therefore to traders within commodity markets.
Temperature forecasts are used by utility companies to estimate demand over coming days. On
an everyday basis, people use weather forecasts to determine what to wear on a given day. Since
outdoor activities are severely curtailed by heavy rain, snow and wind chill, forecasts can be
used to plan activities around these events, and to plan ahead and survive them. In 2009, the US
spent $5.1 billion on weather forecasting,
1.1 BACKGROUND
There are numerous apps and websites available on the Intemet to get accurate weather
radar data. However, many require a fee, either to purchase the app or to subscribe to the radar
data itself. While most of these paid options will give you real-time live radar data, a few free
radar websites and apps offer user-friendly radar imagery with minimal delay. A few examples
of both free to download and use sites available in market are discussed in this section along with
the tasks they can provide and their drawbacks,National Weather Service
Websit
‘hutps://radar weather gov
The National Weather Service offers radar data free from its website and is relatively easy to use,
and the site was recently updated, making it easier to use than before. A new user interface
allows users to 200m in and out easily, and it’s usable on both desktops and mobile phones. You
can view animations and view other radar products that show wind velocity and rainfall as well,
The site also layers warning boxes over the imagery so you can see which storms have severe
‘warnings.
Despite the drastically improved interface, many of the old negatives remain. The radar
resolution is still a bit grainy, and it isn’t as quick to update as some other apps. There’s still no
app either, but that’s due to a non-compete clause with the private industry in Federal law. So
‘you won't get notifications of severe weather for your area.
Pros
© Offers a full suite of radar products for free
* Much improved user interface which is easy to navigate on a mobile device
+ Resolution is grainy
AccuWeather
Website: htins:/waw accuweather com/en/us/national/weather-radar
AccuWeather is another app that does a whole lot more than just radar. Along with radar, you
also have access to AccuWeather's 15-day forecasts and a host of other weather data. The radar
also has a future radar option, but unlike the Weather Channel’s, it only goes out three hours in
advance. Zooming in and out is easy too.
While it doesn’t smooth the radar images to the degree The Weather Channel’s app does, it is
still enough that it may cause some inaccuracy. The user interface is not as intuitive as others on
our list, but in terms of the amount of data available, it is one of the more feature-rich.Pros
= Access to AccuWeather content
* Lots of data options
* Radar images aren’t the best resolution
* Future radar only goes out 3 hours
1.2 OBJECTIVES
‘Weather forecasting is very necessary for our daily lives. It helps us to prepare and make plans
depending on the expectations. Many weather stations are placed around the world fetching real-
time weather elements’ data.
This data includes three components namely
© Today's weather
© Hourly weather
© Weekly weather
Where we will get to know temperature, sunrise-sunset timing, weather details through icons
and weeklong weather forecast. With these, you can analyze trends and know the prediction of
tomorrow’s data or forecast the weather.
Most of these large chunks of data are processed at base stations using powerful and
sophisticated systems. They then share this data, (either analyzed over a long time or real-time
data) through APIs. Companies that do this includes OpenWeatherMap and Dark Sky.1.3 PURPOSE AND SCOPE
Purpose
‘The purpose of developing weather app is to fetch the weather data from all over the world and
to provide it to people at their fingertips with simple and easy to use interface. Another purpose
for developing this site is to reduce the risk of distorting daily plans and arrangements which can
be ruined if we don’t know the weather around us since nobody really knows for certain what is
likely to happen in the nearest minute.
Scope
In ancient times, forecasting was mostly based on weather pattern observation, Over the years,
the study of weather patterns has resulted in various techniques for rainfall forecasting. Present
rainfall forecasting embodies a combination of computer models, interpretation, and an
acquaintance of weather patterns. Now days we use many advanced technologies for weather
forecasting such as Ensemble Forecasting, Radar, Weather Satellites and Weather Maps and
in future we will evolve more. The scope of the project is the system on which the Node js is
installed, i. the project is developed as a desktop application, and it will work for a particular.
But later on the project can be modified to operate it online.
2. SURVEY OF TECHNOLOGY
Next Js10
Created by Vercel, a cloud company for hosting frontends and serverless functions, Next js is
a React framework capable of creating applications that run both on the client and the server,
otherwise known as Universal JavaScript applications. This framework helps you build
universal apps faster by streamlining basic features like client-side routing and page layout
while simplifying advance features like server-side rendering and code splitting.
Node Js
Node Js is a Java Runtime Environment. A Java Runtime Environment (JRE) is software that is
made to execute other software. A JRE often contains three of the following elements: A Java
Virtual Machine, a Java Classloader, and a Java Class Library. The ClassLoader is used to load
everything needed to execute a program. The Java Class Library contains a set (or library) of
reusable code that can be used to make programs, and the Java Virtual Machine allows a
computer to execute programs and applications written in Java.
Node JS contains all these elements thanks to Chrome’s V8, which was the engine used to build
it. In short, Node Js is a Javaseript Runtime Environment, and it’s used to execute JavaScript
code outside of a browser.
Npm
npm is the package manager for the Node JavaScript platform. It puts modules in place so that
node can find them, and manages dependency conflicts intelligently.
Itis extremely configurable to support a wide variety of use cases. Most commonly, itis used to
publish, discover, install, and develop node programs.
Javascript
JavaScript is a text-based programming language used both on the client-side and server-side
that allows you to make web pages interactive, Where HTML and CSS are languages that give
structure and style to web pages, JavaScript gives web pages interactive elements that engage a
user, Common examples of JavaScript that you might use every day include the search box on
Amazon, a news recap video embedded on The New York Times, or refreshing your Twitter
feed
React
React. js is an open-source JavaScript library that is used for building user interfaces specifically
for single-page applications. ... React allows developers to create large web applications that can
change data, without reloading the page. The main purpose of React is to be fast, sealable, and
simple
OpenWeatherMapOpeaWeatherMap i an online service, owned by OpenWeuther Lid, tht provide
fal wether dan via API ncating erent weiter dat orcs, oscar sor
3. REQUIREMENT AND ANALYSIS.
the proposed system Five type feiity sty ate ake ino censiderton2
‘Technical feasibility: It includes finding out technologies for the project, both hardware and
software, For weather app user must stable internet connection. While using weather app, make
sure you have a steady internet connection. It is also not an issue in this era where almost every
home or office has Wi-Fi
Operational fea : It is the ease and simplicity of operation of proposed system.
System does not require any special skill set for users to operate it. In fact, itis designed to be
used by almost everyone. Kids who still don’t know to write can read out problems for system
and get answers,
Economical feasibility: Here, we find the total cost and benefit of the proposed system
over current system, For this project, the main cost is documentation cost. User just needs to pay
for their internet charge.
This project is technically feasible with no external hardware requirements. Also it is
simple in operation and does not cost training or repairs. Overall feasibility study of the
project reveals that the goals of the proposed system are achievable. Decision is taken to
proceed with the project.
3.2 HARDWARE AND SOFTWARE REQUIREMENTS,
The software is designed to be light-weighted so that it doesn’t be a burden on the
machine running it. This system is being build keeping in mind the generally available hardware
and software compatibility. Here are the minimum hardware and software requirement for
virtual assistant
Hardware:#Pentium-pro processor or later
© RAM 5S12MB or more.
© Web-Browse
Software:
Windows 7(32-bit) or above.
IDE (vs-code)
Chrome
© Node Js
4, SYSTEM DESIGN
4.1 ER DIAGRAM
2B4.2 ACTIVITY DIAGRAM©
4.3 USE CASE DIAGRAM2: Bteraty))
L U 3: Lal Oy)
(r “4 ea message) u
4.5 SNAPSHOT
v71820
4.6 DATA FLOW DIAGRAM
©.—82e
User User interface API weather
4.7 SOURCE CODE2a
cIryss,
import React from "react",
import cities from". lib/city.list json";
import Head from "next/head”,
import moment from "moment-timezone";
import TodaysWeather from "./. /components/TodaysWeather">
import Hourly Weather from ". /. /components/Hourly Weather",
import Weekly Weather from "././components/Weekly Weather";
import SearchBox from ". /. /components/SearchBox";
import Link from "next/ink",
export asyne function getServerSideProps(context) {
const city = getCity(context params city);
if (leity) {
return {
notFound: true,
h
}
const res = await feteh(
“https://api.openweathermap.org/data/2.5/onecall?lat=$ {city coord lat} &tlon=S
{city.coord lon} &appid=S {process. env APL KEY j &units=metricdexclude=minutely”
%
const data = await res json();
it (data) {
return {
notFound: true,
#
)
const hourlyWeather = getHourlyWeather(data hourly, data timezone);
return {
Props: {
city: city,
‘timezone: data timezone,
ccurtentWeather: data current,
weekly Weather: data daily,
hourlyWeather: hourlyWeather,
te
}
const getCity = (param) => {
const cityParam = param.trim();
// get id of city22
const splitCity = cityParam.split("-");
const id = splitCity[splitCity. length - 1];
it (tid) {
return null;
if (city) {
return city;
}else {
return null;
i
const getHourly Weather = (hourlyData, timezone) => {
const endO!Day = moment) t2(timezone) endOM"day") valueOf);
const eodTimeStamp = Math. floor(endOfDay / 1000);
const todaysData = hourlyData filter((data) => data dt < eodTimeStamp);
return todaysData;
%
export default function City({
hourlyWeather,
currentWeather,
weeklyWeather,
city,
timezone,
yt
return (
city.name} Weather App Project<(title>
<
← Home
):
3
INDEX.JS
import Head from "nexthead";
import SearchBox from ". /components/SearchBox":
import FamousPlaces from ". /components/FamousPlaces";
export default function Home() {
return (
<
Weather Appsttitle>
SearchBox placcholder="Search for a city.
a
3
23REFERENCE AND BIBLIOGRAPHY
Websites referred
+ www stackoverflow.com
+ www pythonprogramming.net
+ www.codecademy.com
+ www tutorialspoint.com
+ www google.co in
THANK YOU
* www stackoverflow.comnTHANK YOU
24