The Weather Report project is a cloud-based application designed to provide users with real-time weather updates and historical weather data. Deployed on Microsoft Azure, this project leverages several cloud services to offer a seamless and efficient weather reporting tool. Users can access current weather information for their chosen locations via a user-friendly web interface and store historical weather data for future reference.
- Real-Time Weather Updates: Retrieve and display current weather information for any location.
- Historical Weather Data: Store and access previously retrieved weather data.
- Cloud-Based Infrastructure: Utilizes Azure services for scalable and reliable performance.
The project is organized into the following components:
- Frontend: A web-based interface developed with HTML, CSS, and JavaScript.
- Backend: Serverless functions created using Azure Functions to handle API requests and process data.
- Database: Azure Cosmos DB for storing and retrieving historical weather data.
- API Integration: Connection with the OpenWeatherMap API to fetch real-time weather data.
Frontend Development:
The web interface allows users to input a location and view the current weather and forecasts. It is developed using:
- HTML/CSS/JavaScript via Visual Studio
Backend Implementation:
Serverless functions handle API requests and data processing. Steps include:
- Register at Azure and OpenWeather.
- Create a function on Azure to retrieve data from OpenWeather using its API key.
- Create another function to retrieve historical weather data from Azure Cosmos DB and send it to the frontend.
- Testing of functions to ensure correct data retrieval and display.
Database Integration:
Utilizing Azure Cosmos DB for storing and retrieving historical weather data involves:
- Creating a database and containers for storing data.
- Designing a schema that supports quick access and search based on timestamps and locations.
- Testing the database functions to ensure efficient data handling.
API Integration:
Connecting the web interface with Azure functions and the database to fetch weather data involves:
- Connecting the JS file (web interface) with Azure (functions and database).
- Testing the integration to ensure seamless data flow.
- Microsoft Azure: Cloud platform for hosting the application, utilizing services such as Azure Functions, Azure API Management, and Azure Cosmos DB.
- OpenWeatherMap API: Source for real-time weather data.
- HTML/CSS/JavaScript: For creating the web interface.
- Node.js: For backend functions facilitating asynchronous API communication.
- Data Structures: JSON for data handling and responses between the API server functions and the frontend.
Prerequisites:
- Azure account
- OpenWeatherMap API key
- Basic knowledge of web development (HTML, CSS, JavaScript)
Installation:
- Clone the repository:
git clone https://github.com/vicmir/WeatherReportApp.git
- Navigate to the project directory:
cd WeatherReportApp
- Set up the frontend:
- Open the HTML file in a web browser to view the interface.
- Set up the backend functions on Azure:
- Follow the steps outlined in the report to create and deploy Azure Functions.
- Access the Web Interface: Open the HTML file in a web browser.
- Input a Location: Enter the desired location to retrieve current weather information.
- View Historical Data: Access previously retrieved weather data stored in Azure Cosmos DB.