Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time

Simple Heroku Flask Earthquakes app

This is a more complicated version of the Basic Heroku Flask App lesson:

It contains a skeleton of a Flask app that talks to the Google Maps API and USGS earthquake data.

A more polished project can be found at:


Try to add the features found in the lesssimple version of this app and deploy it to Heroku.

The features include:

  1. Each place name of an earthquake should link to the earthquake's official USGS eventpage URL, i.e.
  2. Each row should show the correct Google static map, not an image of Stanford.
  3. There should be a Google static map that shows every earthquake.

About the data

Earthquake data comes from the USGS:

How to create a URL for a Google static map

Example Google Static Map URL:,CA

What it looks like:

static map

Google documentation for the static maps API:

Some examples of how to use the urllib.parse.urlencode method to create complicated query strings.

Try this out:

from urllib.parse import urlencode
locations = ['Stanford, CA', 'Berkeley, CA', 'Napa, CA']
myparams = {'size': '800x400', 'maptype': 'satellite', 'markers': locations}

url = GMAPS_URL + urlencode(myparams, doseq=True)

Which renders this map:

california map


A practice Python flask app with earthquake data



No releases published
You can’t perform that action at this time.