Skip to content

Instantly share code, notes, and snippets.

View rafiamafia's full-sized avatar

Rafia Qutab rafiamafia

  • NASA Jet Propulsion Laboratory
  • Los Angeles, CA
View GitHub Profile
@rafiamafia
rafiamafia / media_engineering_take_home.md
Last active April 25, 2019 19:35
Take home assignment for Fullscreen software engineering candidates.

Welcome to California

California is famous not only for its booming tech economy, controversial film industry, and yearlong summers, but due to its position on both the Pacific and North America plates, it experiences approximately 10,000 earthquakes each year. U.S. Geological Survey (USGS) provides near real time data and information and earth observations so that policy makers and the public have the understanding they need to enhance precedence, response and resilience.

You can find data of all earthquakes for the past 30 days here

Using the CSV above, write a Ruby program to find the first 10 cities and states with an earthquake that was felt in Los Angeles in a given date range. For the sake of over simplicity, let's assume a linear relationship between the magnitude of an earthquake and the distance it travels before it can be felt. Let's assume a magnitude-5 earthquake can be felt at up to a distance of 500 miles, ma