An open API service indexing awesome lists of open source software.

https://github.com/empobla/earthquakemapper

A website that plots in Google Maps recent earthquakes of a place the user looks up using GeoNames Recent Earthquakes WebService.
https://github.com/empobla/earthquakemapper

geonames-api google-maps-api

Last synced: 3 months ago
JSON representation

A website that plots in Google Maps recent earthquakes of a place the user looks up using GeoNames Recent Earthquakes WebService.

Awesome Lists containing this project

README

        

[![Portfolio][moreinfo-shield]][moreinfo-url]
[![LinkedIn][linkedin-shield]][linkedin-url]





Logo

earthquakeMapper


A website that plots in Google Maps recent earthquakes of a place the user looks up using GeoNames Recent Earthquakes WebService.





Table of Contents



  1. About The Project


  2. Abilities Mastered

  3. Dependency List


  4. Getting Started


  5. Usage

  6. License

  7. Contact

  8. Acknowledgments

## About The Project

[![Product Name Screen Shot][product-screenshot]](https://emilioppv.com/projects#earthquakemapper)

This project is a website that combines the use of both Google Maps API and GeoNames Recent Earthquakes API to show the user the biggest, most recent earthquakes that have occurred in a place that the user looks up.

The objective of this project was mainly to improve my knowledge and use of REST APIs and to be able to create an interactive website that, through the use of APIs, can provide useful information for users in a real-world scenario.

(back to top)

### Built With

[![Express][Express.js]][Express-url]
[![Pug][Pug.js]][Pug-url]
[![Node][Node.js]][Node-url]
[![Heroku][Heroku]][Heroku-url]

(back to top)

## Abilities Mastered

* Use of GeoNames API
* Use of GoogleMaps JavaScript and Places API

(back to top)

## Dependency List

* **@googlemaps/google-maps-service-js**: For using Google Maps API.
* **Axios**: For making requests to GeoNames.
* **Body-Parser**: For limiting the request body payload the user can submit.
* **Compression**: For compressing express' requests.
* **Dotenv**: For handling in-app environment variables such as API keys.
* **Express.js**: For handling the server logic.
* **Express-Rate-Limit**: For limiting the amount of requests per window of time a user can make.
* **Helmet**: For applying server security policies such as CORS.
* **Node.js**: Framework used to build application.
* **Pug**: Templating language for frontend SSR.

(back to top)

## Getting Started

To get a local copy up and running follow these simple example steps.

### Prerequisites

This project requires two Google API Keys (one for backend queries and one for frontend map rendering) and your GeoName's username.

### Installation

1. Clone the repo
```sh
git clone https://github.com/empobla/earthquakeMapper.git
```
2. Install NPM packages
```sh
npm install
```
3. In the project's directory, create a `.env` file with the following keys:
```text
GEONAMES_USERNAME=

GOOGLE_API_BACK=
GOOGLE_API_FRONT=
```
_Note: Replace everything in between `<>` with your actual keys._

4. Start the server in development mode!
```sh
npm run devstart
```

(back to top)

## Usage

earthquakeMapper will display the top 10 earthquakes in the last 12 months found in the world initially. If any earthquake point is selected, it will display it's date, time, depth, and magnitude as well. In addition, you can search for places, prompting earthquakeMapper to update it's map and show you the top 10 strongest earthquakes on the place you selected in the last 12 months.

![Place Search](README/images/search.png)

(back to top)

## License

This project is property of Emilio Popovits Blake. All rights are reserved. Modification or redistribution of this code must have _explicit_ consent from the owner.

(back to top)

## Contact

Emilio Popovits Blake - [Contact](https://emilioppv.com/contact)

Project Link: [https://github.com/empobla/earthquakeMapper](https://github.com/empobla/earthquakeMapper)

(back to top)

## Acknowledgments

* [GeoNames Earthquakes API](http://www.geonames.org/export/JSON-webservices.html)
* [Google Maps API](https://developers.google.com/maps)

(back to top)

[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/emilio-popovits

[product-screenshot]: README/images/thumbnail.png

[Express.js]: https://img.shields.io/badge/express-000000?style=for-the-badge&logo=express&logoColor=ffffff
[Express-url]: https://expressjs.com/
[Pug.js]: https://img.shields.io/badge/pug.js-a86454?style=for-the-badge&logo=pug&logoColor=000000
[Pug-url]: https://pugjs.org
[Node.js]: https://img.shields.io/badge/node.js-090c15?style=for-the-badge&logo=nodedotjs&logoColor=339933
[Node-url]: https://nodejs.org
[Heroku]: https://img.shields.io/badge/heroku-430098?style=for-the-badge&logo=heroku&logoColor=ffffff
[Heroku-url]: https://www.heroku.com/

[moreinfo-url]: https://emilioppv.com/projects#earthquakemapper
[moreinfo-shield]: https://img.shields.io/badge/more%20info-1b1f24?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAApVBMVEUbHyQbHyQbHyRnam2sra+vsbKys7Wsrq+goqQwNDgaHyQaIilbXWGChIZMT1OYmpwYQFoaICYXRF8WUHQZLjwvMzdwcnaztLZ1d3pcX2IaICUXTG0WUHMXS2sXSGcWT3MaKjcpLTFVWFyFh4lTVllvcnWpqqwYOEwZM0QXTW4XTnAaJS8lKS3IycoYPlYaIyt4e36rra60tba5urutr7BQU1cAAAB8HBV3AAAAAnRSTlOR/KrCyFQAAAABYktHRDZHv4jRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wEZCiUZVutNzgAAAGpJREFUCNdjYGBkggNGBmQeiM+EAjC5zCwsrGzsHJwQLhc3ExMPLxMfP5OAIBODkLCIqBi/uASHpJS0jCyDnLyCopIyh4qqmrqGphYDk5Q2WLGOrh63PsgoA0NDI2NDE1PsFqFw0RyJ6gUAuK4HVipJCoQAAAAuelRYdGRhdGU6Y3JlYXRlAAAImTMyMDLWNTDUNTINMTSwMja3MjLVNjCwMjAAAEFRBQlQZi6pAAAALnpUWHRkYXRlOm1vZGlmeQAACJkzMjAy1jUw1DUyDTE0sDI2tzIy1TYwsDIwAABBUQUJeVmGIQAAAABJRU5ErkJggg==