Skip to content

ppaternostro/usa-weather

Repository files navigation

usa-weather

An Angular based USA weather application. This application uses two free APIs to retrieve USA based address geocode information and to retrieve weather information for the acquired USA address geocode. The free APIs are USA government provided APIs that don't require a user account or an API key to use. The geocode information is retrieved using the USA Census Geocoder API while the weather information is retrieved using the National Weather Service API.

Background

This application was created with Angular Material components and uses the Tailwind CSS library for application layout and CSS styling. After cloning the project, ensure both Node.js® and NPM are installed. To pull in the project's dependencies, from a terminal window in the project's root folder, run

npm install

This project was generated using Angular CLI version 21.1.0.

Running the application

To start a local development server, from a terminal window in the project's root folder, run:

ng serve

or

npm start

Once the server is running, open your browser and navigate to http://localhost:4200/.

Main Window

All three fields are required to generate a weather forecast. Enter the USA based address information which will enable the Submit button. Click on the Submit button to generate a weather forecast.

Weather Forecast

A scrollable forecast list will display for the next seven days. To clear the results click on the Clear button.

Building

To build the project run:

ng build

This will compile your project and store the build artifacts in the dist/ directory. By default, the production build optimizes your application for performance and speed.

Running unit tests

To execute unit tests with the Vitest test runner, use the following command:

ng test

Running end-to-end tests

For end-to-end (e2e) testing, run:

ng e2e

Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.

Additional Resources