Nearby Cities

« Back to Products Documentation

Types

nearby-cities
This product contains data about cities near to the event. Cities are ordered by their relative distance.

When this product is not contributed, nearby places are loaded from the Geoserve Places web service. For example: https://earthquake.usgs.gov/ws/geoserve/places.json?latitude=45.1&longitude=-70.1&type=event

Properties

Not applicable

Contents

nearby-cities.inc.html
[text/html] List markup for the cities.
nearby-cities.json
[applicaiton/json] Structured JSON string containing nearby city data.

JSON Format

The JSON file should contain an array of city objects, typically 5 nearby places.

City object properties

distance
distance from epicenter in kilometers
direction
compass direction from city/place to epicenter
name
name of city/place
longitude
longitude in decimal degrees
latitude
latitude in decimal degrees
population
population of city, or null
(NOTE: this must be the JSON null value, not a quoted string)

Example

[
  {
    "distance": 2,
    "direction":"SE",
    "name":"Berkeley, California",
    "longitude":-122.2746,
    "latitude":37.8718,
    "population":null
  },
  {
    "distance":4,
    "direction":"NE",
    "name":"Emeryville, California",
    "longitude":-122.2853,
    "latitude":37.8313,
    "population":null
  }
]