Git Product home page Git Product logo

google-girls-2020's Introduction

Introduction

In this project, we create a website that only loads the user's nearby cases or special places decided by the user. They can also mark their focus places~(like home, working places, markets, or restaurants), and our system can only load those cases in specific places. We will also send new cases though email so the user doesn't need to check the website all the time. Thirdly, users can mark when and where they have been and if new cases show in the same place, the system will automatically send messages to users.

Installation

The project is running on the Google App Engine platform, and the database is stored on MongoDB, make sure you have sign up these accounts. Besides, our project also requires Node.js environment on your laptop for local testing.

Step 0: Download or clone this project, and use npm install to install needed packages.

Step 1: Create key.js, where

  • url stores the url link to MongoDB server.
  • placekey stores the Places API generated from Credientials Panel in Google Cloud Platform.

Step 2: Change script.src in the publie/js/google-map.js to your own Maps JS API keys. (Also generated from Credientials Panel in Google Cloud Platform.)

Step 3: Use data.js to add cases in data.csv into your own database.

Step 4: Deploy this project on your Google APP Enging Platform using gcloud app deploy --project==your_project_name

Step 5: Create a cron job /api/update_data from google app engine to automatically send emails.

Database Settings

  • users
{
   "_id":"user_id, the private key and a unique indentifier for a user",
   "email":"user login google email account",
   "home":"place_id, a foreign key to the place table",
   "work":"place_id, a foreign key to the place table",
   "fav_places":
   [
        {"fav_place":"place_id, a foreign key to the place table"}
   ],
    "vis_places":
    [
        {
            "vis_place":"place_id, a foreign key to the place table",
            "vis_date":"date, stores user’s visit date, the default value is today"
        }    
    ],
  "contact_email": "user contact email, the default value is the login gmail account"
}
  • places
{
    "_id":"place_id, the private key and a unique indentifier for a place",
    "mapID":"received from the Google MAP API, a unique indentifier for a place", 
    "mapName": "received from the Google MAP API, the name of the place (may be different from the search text)",
    "geometry": {
      "lat": "latitude of the place",
      "lng": "longitude of the place"
    },
    "flag": "bool, true means this place has Covid-19 cases recently, false means this place doesn't have Covid-19 cases recently (e.g. in last 28 days)",
    "cases": [
      {
          "case_id": "case_id, a foreign key to the table cases"
      }
    ],
    "status": "received from Google MAP API, OK means no errors occurred, ZERO_RESULTS means no places be returned",
    "types": ["Place Types received from Google MAP API"]
}    
  • cases
{
     "_id": " the private key and a unique indentifier for a case",
     "case_id": "case id from the original dataset (download from hk gov), a unique and contentious indentifier for a case",
     "place_and_date": [{
          "place": "place_id, a foreign key to the table place",
          "start_date": "Start date from the original dataset (download from hk gov)",
          "end_date": "End date from the original dataset (download from hk gov)"
      }]
}

Dataset

The dataset is from 'covid19.vote4.hk - COVID-19 in HK'.

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.