Code Monkey home page Code Monkey logo

airaware's Introduction

An AirPollution Tracker built with React + Node.JS/Express

This API was supported by Material-UI. Learn more: https://material-ui.com/

What is this and who is it for ๐Ÿคทโ€

AirAware is a consulting company that provides businesses and individuals with everyday air pollution information in the United States and solutions. You are able to compare statisistics about air pollution between cities. The measurements for comparison are Air Quality Index (AQI) & Particulate matter(PM). We also added a comparison of how much would each Air Quality Index information correspond to smoking a cigarette per day. This way people could relate or understand better the matter of air pollution. You are able to go into Details of each City to view further information such as weather and sollutions. We have addeed two more sections, one called About page with information about us and one with solutions.

Features

  • Our application was built with React, including functional components with hooks.
  • We have added a card component with Material-UI in the main page, spread operator, destructuring assignment, formulas.
  • API written in JavaScript using Express.

Setting up development environment

  • git clone [email protected]:wyncode/C36_midterm_elvis_iman_julio_krissy.git
  • To install the dependencies on the backend you must yarn in the root directory of the project then to install the dependencies of the front end you must cd into the client directory and yarn there as well
  • import React from 'react';
  • import { BrowserRouter, Switch, Route } from 'react-router-dom';
  • create an account on AirVisuals website to get API key (https://www.airvisual.com/)
  • Create an empty .env file in root directory and paste your API key in there

Starting up the app

Authors:

  • Julio Acceus, Iman Bashir, Elvis Hernandez, Krisi Keranova. We are students of Wyncode Academy and this is our midterm project. For more information you can follow our individual LinkedIn accounts linked to our photos in the About page.

Further info on the App process

We have extracted info from four API endpoints using express. The first three APIs provide information about the States and cities, and the city pollution stats while the fourth is giving us an image of the corresponding city. We created a dropdown menu, serch bar and added a material UI component - card in the main page.

What's missing?

We want to make it so that a user's list of cities saves on the backend so that if they decide to view a speicific city page for example, then when they return to the home page their list would still be there.

We would like to add the Google API so users can have a better view and understanding of areas with pollution.

For more information on air quality visit https://www.airvisual.com/

airaware's People

Contributors

elvishernandez avatar krisike avatar imanbashir avatar julioa8 avatar limlight86 avatar

Watchers

James Cloos avatar  avatar

Forkers

krisike

airaware's Issues

Add Hazard level to city cards

The goal here is to divide up the whole range of AQIs (0-500) into smaller bands which we'll use to display the hazard level of pollution to users.

Setup State API (retrieves list of supported Cities by State)

This issue requires setting up the backend endpoint that will call the AirVisual state API and store all of the Cities for a specified State in a locally stored array. Note: The AirVisual state API is the one that returns a json with all the supported cities in a specified state.

Refactor CSS into individual css pages

Currently, the majority of the css for this project is in the App.css file. The goal of this issue is to refactor the css so that it is spread across multiple files which are more modular and specific to the existing pages of the app. Also, there's a fair bit of inline css that should be removed and put into a .css file explicitly.

Refactor Home component to use context

The goal of this issue is to refactor the code so that the dropdown and search bar components are siblings in the home component. To do this we'll use a city list context that will provide the search bar with the information that it needs to make its API call.

Edit City cards to format date, include city and state, and include cigarrete info

This issue is meant to address the current rough formatting of the date on the city card e.g. (2020-02-19). We want to change this to February 19, 2020. The card also does not display the city name or state. We'll display that as Miami, Florida, for example. Lastly, the AQI to cigarettes smoked per day conversion will be added.

Remove compare button from city cards

The goal here is to remove the compare button from the city cards and to give that functionality to the compare cities button next to the check city button on the home page.

Comps

To check what fonts, colour codes, etc that are used -check the raw file or ask me. I provided a ZIP of all the fonts used, they are found on google fonts which we learned how to key in.

So need your thoughts on the three options...
option1-index - Middle Nav, Lighter footer
option2-index - Middle Nav, Darker Middle footer
option2-index-other-nav - Left Logo Nav, Darker Middle footer

Also if anyone wants to see different variants of colours, or play around with the PSD feel free to

option1-index

option1-about

option1-solutions

option2-index-other-nav

option2-index

option2-about

option2-solutions

.

Fix compare city bug

Currently, when you press compare city to add a city, and then you press compare city again, it crashes the app.

Setup City stats API on Express

Setup the API endpoint on the express server that retrieves the specific city stats i.e. (AQI ect...) when a user inputs a city into the home page search bar.

Reorganize file structure and remove unused lines of code

At the time of completion for the Wyncode midterm, our project had not been properly structured or organized in terms of directory structure and code formatting. The goal of this issue is to at least improve the current state of organization but it probably still wont be optimal due to lack of experience.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.