/AirNow

A search engine that shows the Air Quality Index of the any searched city.

Primary LanguageJavaScript

Airnow - Air Quality Index Search Engine

Airnow is a search engine that allows you to find the air quality index (AQI) of cities around the world. It uses the API provided by aqicn.org to fetch the latest air quality data and displays it on the screen using React.

Features

  • Search for the air quality index of cities
  • Display the AQI, air quality category, and additional information
  • Change the background color based on the air quality level
  • Show messages describing the air quality level
  • Display a timestamp indicating the time of the air quality data retrieval

Technologies Used

  • React: A JavaScript library for building user interfaces.
  • HTML: The standard markup language for creating web pages.
  • CSS: The style sheet language used for describing the presentation of a document written in HTML.
  • JavaScript: A programming language that enables dynamic behavior on web pages.

How to Use

  1. Enter the name of a city in the search input field.
  2. Press the "Search" button or hit Enter.
  3. The app will fetch the air quality data for the entered city.
  4. The AQI, air quality category, and additional information will be displayed.
  5. The background color of the page will change based on the air quality level.
  6. Messages describing the air quality level will be shown.
  7. The timestamp of the air quality data retrieval will be displayed.

Installation

  1. Clone the repository:
  2. Install the required dependencies: npm install
  3. Run on Localhost : npm start
  4. Open your web browser and navigate to http://localhost:3000 to access Airnow.

Live demo

https://air-now-six.vercel.app/

Screenshots

a1 a2 a3 a4 a5

Acknowledgements

  • This project utilizes the API provided by aqicn.org to fetch air quality data.
  • The UI design and implementation are based on the provided requirements by Lastbyte.

License

This project is licensed under the MIT License.

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can't go back!

If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.