minor-project-report
minor-project-report
PROJECT REPORT
ON
"Weather Web App"
Submitted in partial fulfilment of the
Requirement for the award of the degree of
Bachelor of Computer Application
Submitted To Submitted
By
Dr Vani Aditya
Ray(006)
VSIT Adarsh
Kr. Singh(005)
BCA-5 EA
(Batch: 2020-2023)
Vivekananda Institute of Professional Studies
(Affiliated to Guru Gobind Singh Indraprastha University) CERTIFICATE
This is to certify that we Aditya Ray and Adarsh Kr. Singh of BCA 5th Semester from
Vivekananda Institute of Professional Studies, Delhi has presented this project
work entitled "Weather WebApp", an online auction website in partial fulfilment of
the requirements for the award of the degree of Bachelor of Computer Applications
under our supervision and guidance.
ACKNOWLEDGEMENT
It is our proud privilege to express our profound gratitude to the entire
management of Vivekananda Institute of Professional Studies and the teachers of the
institute for providing us with the opportunity to avail ourselves of the excellent
facilities and infrastructure. The knowledge and values inculcated have proved to
be of immense help at the very start of my career. Special thanks to the Hon'ble
Founder, Vivekananda Institute of Professional Studies, Delhi for having provided
us with an excellent infrastructure at VSIT.
I am grateful to Prof. (Dr.) Supriya Madan (Dean, VSIT), and Dr Vani for their
astute guidance, constant encouragement and sincere support for this project work.
Sincere thanks to all my family members, seniors and friends for their support and
assistance throughout the project.
Aditya Ray and Adarsh Kr Singh
1. INTRODUCTION 5
1.1.Objec*ve of the System 5
1.2.Jus*fica*on and need for the system 5
1. 3.Advantage of the system
6
1.4 Previous work or related
systems, how they
are used. 6
2 REQUIREMENT ANALYSIS 7
3.4 DFDs 13
4 IMPLEMENTATION & CODING 14-15
16
4.1 Opera*ng System 16
4.2. Languages
17-43
4.3 Coding
44
5 TESTING & TEST RESULTS 44-47 1. SoJware Tes*ng and Objec*ve of Tes*ng
5.2 Sample test data/ Output screen printouts 48-49
etc.
6 CONCLUSION 50
1. Conclusion 50
50
2. Future Scope
51
Biblography
Chapter 1
INTRODUCTION
Weather forecasting is the application of science and technology to predict the
state of the atmosphere for a given location. Ancient weather forecasting methods
usually relied on observed patterns of events, also termed pattern recognition.
For example, it might be observed that if the sunset was particularly red, the
following day often brought fair weather. However, not all of these
predictions prove reliable
1.1 OBJECTIVE OF THE SYSTEM
This project will serve the following objectives:-
1. Provides the user with an easy and friendly interface
2. Provides the user with the temperature of a particular region
3. It will also show humidity, wind speed and cloud
1.2 JUSTIFICATION AND NEED FOR THE SYSTEM
Weather is something everybody deals with, and accurate data about it like what is
coming can help users to make informed decisions. With weather apps for iOS and
Android, people can exactly know when to expect a change in the weather conditions.
Weather apps can give urgent alerts too.
Undoubtedly, weather forecasting has come a long way, helping people to know about
weather conditions. So, if you are in an area where weather frequently changes from
sunny to torrential rain in a matter of minutes, then what is the easiest way to
make sure to be prepared? A suitable answer is a weather application.
1.3 Advantages of the system
1. Real-Time Data
One of the biggest advantages of weather monitoring systems and also the reason why
people have been going in for weather stations is because of the ability to get
their information in real-time.
2. Accurate Local Forecast
In reality, the meteorological department may be located far from your home and
weather forecasts are made for regions, not a specific area. That's a reason why in
these instances, the weather predictions that they give are not always the most
accurate.
3. Ease Of Use
Ease to use is definitely a big advantage of the weather monitoring system. Weather
stations like all other weather devices are designed to be efficient and
straightforward, therefore, everyone can use them. It is so convenient and
comfortable for users to get the most accurate information in the simplest way
possible.
1.4 Previous work or related systems; how they are used.
Before we begin a new system it is important to study the system that will be
improved or replaced (if there is one). We need to analyze how this system uses
hardware, software, network and people resources to convert data resources, such as
transaction data, into information products.
Following are the problems associated with the previous project which led to the
creation of the proposed project:-
1. Not user-friendly: The existing system is not user-friendly because the
information like humidity cloud and wind etc are not in one place.
2. Not a good UI: The user interface of the previous systems are not that good.
Chapter 2
REQUIREMENT ANALYSIS
Functional Requirements
Functional requirements are the requirements that describe the functionalities of
the system elements. It may involve functional user requirements or functional
system requirements.
For example:
The operator shall be able to input the region to the system to view the desired
weather parameters.
The system shall provide the following weather parameters: temperature, pressure,
wind speed ,date / time and humidity.
2.1 ANALYSIS STUDY
1. Lower Installation Charges:
We neither require any high-configuration systems for the smooth running of the
server program nor do we require any high-configuration systems for the smooth
running of a client program. This application is designed with ease to support any
ordinary system having an internet connection.
2. Secured and Reliable:
The reliability of the system is to make sure the website does not go offline
3. Availability
The availability of the system is that the website will be active on the Internet
and people will be able to browse it.
2.2 Feasibility Study
All projects are feasible if they have unlimited resources and infinite time. But
the development of software is plagued by the scarcity of resources and difficult
delivery rates. It is necessary and prudent to evaluate the feasibility of a
project at the earliest possible time. The three considerations are involved in the
feasibility analysis.
2.3 Technical Feasibility
Technical feasibility centres on the existing mobile system (hardware,
software...etc) and to what extent it can support the proposed addition if the
budget is a serious constraint, then the project is judged not feasible. The
technical feasibilities are an important role in our project because here we're
using HTML,CSS and JavaScript . It requires Visual Studio Code(software) to develop
this application. A easily available software and easy to use.
2.4 Economical Feasibility
This procedure is to determine the benefits and savings that are expected from a
candidate system and compare them with cost. If the benefits outweigh the cost then
the decision is made to design and implement the system. Otherwise, further
justification or alterations in proposed systems have to be made if it is having a
chance of being approved. This is an ongoing effort that improves any feasibility
costs spent on this project because here we're using open-source environments.
2.5 Operational Feasibility
People are inherently resistant to change and mobiles have been known to facilitate
change. There is no need of technical background is required to work on the
application. All the information needed can be seen with just one click
2.2 USER REQUIREMENTS
The system specifications that a user may want are as follows:
1. It should be easy to understand
2. Must be interactive
3. Should provide a good user interface
4. Security should be maintained
2.3 Final Requirements
User Oriented: A system should be more user friendly not from the technical point
of view
Better GUI: All the elements used in the system should be interactive in nature so
that its look and feel are not so boring that the user could get bored while using
it.
Reliability: The system should be reliable and fast in processing
Data security: Access to the organizational data is not to be granted to any
unknown person who is not a part of the transaction
Confidentiality: Whatever the user is providing to the organization, the user has
the full rights to modify it and it could be not be accessed/modified without the
user's permission
Better Management of information: All the information should be managed so that is
the flow of the information is to be in the right track
Presentation: The content that is to be presented to the user is to be presented in
such a way that is selfexplanatory to the user and he/she is satisfied with the
data.
Chapter 3
DESIGN OF THE SYSTEM
3.1 Software requirements
Platform Platform Independent The Operating System Windows 7 Framework Bootstrap
Front-End Tool Google Chrome APIOpenWeatherMap3.1 Hardware Requirements
ProcessorIntel Pentium IV 2.9 GHz Other RAMMinimum 4 GBGraphicsIntegrated
graphics cardHard DiskMinimum 500 GB3.2 System Requirements
To know the detailed system requirements an SRS has to be prepared. Software
requirement specification abbreviated as SRS is a means of translating the idea of
files into a formal document. The main features of SRS include:
� Establishing the basis for an agreement between the client and the developer.
� Producing a reference for validation of the final product. SRS assist clients in
determining if the software meets their requirements.
Mainly there are six requirements which an SRS must satisfy.
(a) It should specify the external behaviour.
(b) It should specify the constraints.
(c) It should be easy to change.
(d) It should be a reference tool.
(e) It should record throughout the lifecycle.
(f) It should have the capacity to expect an undesired event.
Func*onal Requirements
Func)onal requirements are the requirements that describe the func)onali)es of the
system elements. It may involve func)onal user requirements or func)onal system
requirements.
For example:
The operator shall be able to input the region to the system to view the desired
weather parameters.
The system shall provide the following weather parameters: temperature, pressure,
wind speed & direc)on, rainfall, and humidity.
3.3 Design Requirements
The main objectives of input design are:
(a) Controlling the amount of input
(b) Keeping the process simple.
(c) The best thing in the input design is to achieve all the objectives mentioned
in the simplest manner possible.
The main objectives of output design are:
(a) Identifying the specific outputs.
The primary goal of the system analysis is to improve the efficiency of the
existing system. For that the study of specification of the requirements is very
essential. For the development of the new system, a preliminary survey of the
existing system will be conducted. Investigation done whether the upgradation of
the system into an application program could solve the problems and eradicate the
inefficiency of the existing system
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"
integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/
+/ 3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-
MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</body>
</html>
CSS
@import url('https://fonts.googleapis.com/css2?
family=Montserrat&family=Quicksand:wght@300;400;500;600;700&family=Roboto:wght@400;
700;9 00&display=swap');
*{ margin: 0; padding: 0; box-sizing: border-box;
} body{
font-family: 'Rubik',sans-serif; background: #111;
/* background-image: url("../images/bg1.jpg"); background-size: cover;
background-position: center; */
}
.imageCycle1{ background-image: url("../images/bg1.jpg"); background-size:
cover; background-position: center;
}
.imageCycle2{ background-image: url("../images/bg2.jpg"); background-size:
cover; background-position: center;
}
.imageCycle3{ background-image: url("../images/bg3.jpg"); background-size:
cover; background-position: center;
}
.imageCycle4{ background-image: url("../images/bg4.jpg"); background-size:
cover; background-position: center;
}
.imageCycle7{ background-image: url("../images/bg7.jpg"); background-size:
cover; background-position: center;
}
.imageCycle8{ background-image: url("../images/bg8.jpg"); background-size:
cover; background-position: center;
} .main-content{ height: 100%;
} .bg{ width: 100%; height: 100vh; display: flex; justify-content:
space-between; transition: 500ms; opacity: 1;
}
.logo{
}
#form1Large{ background: none; border: none;
}
.search-bar{ height: 12%;
}
li{ list-style: none;
}
.cities p{ /* margin-top: 2rem; */ font-size: 18px; font-weight: 100;
color: white;
}
.details p{ /* margin-top: 2rem; */ font-size: 18px; font-weight: 100;
color: white;
}
#city_ul_small{ font-size: 18px; font-weight: 100; color: white;
cursor: pointer;
}
#city_ul_large{ font-size: 18px; font-weight: 100; color: white;
cursor: pointer;
}
.weather-icon{ background: rgba(255, 255, 255, 0.25); box-shadow: rgba(255,
255, 255, 0.3); backdrop-filter: blur(10px); -webkit-backdrop-filter:
blur(10px); border: 1px solid rgba(255,255,255,0.18); }
.temperature-small .degree p{ font-weight: 400; font-size: 50px;
}
.temperature-small .place-time .place p{ font-weight: 900; font-size: 30px;
display: inline;
/* text-size-adjust: auto; */
} .time p{ width: 100%; font-weight: 100; font-size: 15px; display:
inline; }
.weather-name p{ font-weight: 900; font-size: 20px;
}
.temperature-small{ top: 5rem;
}
#button_color_large{ background-color: black;
}
#button_color_small{ background-color: black;
}
input { caret-color: white;
}
.animate-character
{
$('body').addClass(classToAdd);
});
readTextFile("./js/cities.json",function(text){ cities =
JSON.parse(text); console.log(cities); showInitialCities();
}) }
function setData(data){ const temp = convertToCelcius(data.main.temp);
const humidity = data.main.humidity; const cloud = data.clouds.all; const
wind = data.wind.speed; temp_small.innerHTML = temp+'°';
temp_large.innerHTML = temp+'°'; humidity_small.innerHTML = humidity+"%";
humidity_large.innerHTML = humidity+"%"; cloud_small.innerHTML = cloud+"%";
cloud_large.innerHTML = cloud+"%"; wind_small.innerHTML = wind+"km/h";
wind_large.innerHTML = wind+"km/h"; place_name_small.innerHTML = data.name;
place_name_large.innerHTML = data.name; weather_name_large.innerHTML =
data.weather[0].main; weather_name_small.innerHTML = data.weather[0].main;
// const icon = data.weather[0].icon.replaceAt(data.weather[0].icon.length-
1,"n");
// const src = "http://openweathermap.org/img/w/"+icon+".png";
// console.log(src);
// icon_small.src = src;
// icon_large.src =src;
}
function convertToCelcius(temp){ return (temp - 273.15).toFixed(0);
}
async function getWeather(city,country){
if(city.length > 0){
const weatherResponse = await fetch(config.base_url+'data/2.5/weather?
q='+city+','+country+'&APPID='+config.apiKey); const data = await
weatherResponse.json(); console.log(data); setData(data);
}
}
String.prototype.replaceAt = function(index, replacement) { return
this.substring(0, index) + replacement + this.substring(index +
replacement.length);
}
const date = new Date();
// ? Get a String representing the given Date using UTC (= GMT) time zone.
// ?? "Fri, 14 Jan 2022 17:30:20 GMT" var timeZone =
Intl.DateTimeFormat().resolvedOptions().timeZone console.log(timeZone)
date.toLocaleString("en-US", {timeZone: timeZone})
// const result = date.toUTCString();
// console.log(result) const day = (date.getMonth()+1); console.log(date); var d =
date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate(); const t =
date.toString().split(" "); console.log(t); const hour = t[4].split(":")[0]; const
min = t[4].split(":")[1]; time_large.innerHTML = hour+":"+min; time_small.innerHTML
= hour+":"+min; day_large.innerHTML = "-"+t[0]+","; day_small.innerHTML = "-"+t[0];
date_large.innerHTML = t[2]; date_small.innerHTML = t[2]+","; month_large.innerHTML
= t[1]; month_small.innerHTML = day; year_large.innerHTML = t[3];
year_small.innerHTML = t[3];
form1.addEventListener('input', updateValue); formLarge.addEventListener('input',
updateValue); function showInitialCities() { const i = ""; const result =
cities.filter(city => city.name.toLowerCase().includes(i.toLowerCase()));
console.log(result); removeItems();
let length; if(result.length>4){ length =
4; }else{ length = result.length;
} for(let i = 0; i<length; i++){ addCity(result[i]);
}
}
function updateValue(e) { console.log(e); const i = e.target.value;
//input=i; console.log(i); const result = cities.filter(city =>
city.name.toLowerCase().includes(i.toLowerCase())); console.log(result);
removeItems(); let length; if(result.length>4){ length =
4; }else{ length = result.length;
} for(let i = 0; i<length; i++){ addCity(result[i]);
}
if(length<4){ const tempCities = cities.filter(city => !
city.name.toLowerCase().includes(i.toLowerCase())); for(let i = 0; i<4-
length; i++){ addCity(tempCities[i]);
}
}
} function readTextFile(file, callback) { var rawFile = new XMLHttpRequest();
rawFile.overrideMimeType("application/json"); rawFile.open("GET", file, true);
rawFile.onreadystatechange = function() { if (rawFile.readyState === 4 &&
rawFile.status == "200") { callback(rawFile.responseText);
}
}
rawFile.send(null);
}
function addCity(city) { const br = document.createElement("br");
const liSmall = document.createElement("li"); liSmall.classList.add("mt-
4"); liSmall.classList.add("fs-5"); liSmall.classList.add("fw-bolder");
liSmall.appendChild(document.createTextNode(city.name));
liSmall.setAttribute('id','li_1'); ulSmall.appendChild(liSmall); const
liLarge = document.createElement("li"); liLarge.classList.add("mt-4");
liLarge.classList.add("fs-5"); liLarge.classList.add("fw-bolder");
liLarge.appendChild(document.createTextNode(city.name));
liLarge.setAttribute('id','li_2'); ulLarge.appendChild(liLarge);
console.log(ulLarge); liLarge.addEventListener("click", function(){
input = city.name formLarge.value =input
getWeather(city.name,'in');
});
liSmall.addEventListener("click", function(){ input = city.name
form1.value =input getWeather(city.name,'in');
}); }
function removeItems() {
Fig 1
By default, it will show the weather in Delhi, if we haven't added any specified
location
Fig 2
Fig 3
It will not show any other loca)on different to Delhi if our input is wrong.
Chapter 6
CONCLUSION
6.1CONCLUSION
Now a day's there is a big demand of different types of applications, which is
because IT has become the main part of our New World. There is a big need of
different applications. People want application for every specific task from work
to entertainment. We have developed the application "Weather WebApp" which works
easy on any given web browser.
The application has been tested and found to be working as per the given criteria.
It can be safely concluded that the application possesses a highly efficient UI
system and is working properly and meeting to all the requirements of the user. The
application gives the user maximum flexibility in the types of touch and other
device movements.
6.2 FUTURE SCOPE
Every project whether large or small has some limitations no matter how diligently
developed. In some cases, limitations are small while in other cases they may be
broad also. The new system has got some limitations. Major areas where
modifications can be done are as follows:
� Our system does not have weather information for foreign countries or cities.
� There is no provision for complaint handling so further it can be added.
BIBLOGRAPHY
� http://www.w3schools.com
� http:// www .stackoverflow.com
� http://wikipedia.com
lOMoARcPSD|35402258
lOMoARcPSD|35402258
2
Downloaded by Moses Karisa ([email protected])
lOMoARcPSD|35402258