{"cells":[{"metadata":{"_uuid":"8c2f7327b3d0cf47a644d4b3f2a5c0b52999e228"},"cell_type":"markdown","source":""},{"metadata":{"_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","collapsed":true,"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","trusted":false},"cell_type":"markdown","source":"**Introduction**\n\nAn earthquake (also known as a quake, tremor or temblor) is the shaking of the surface of the Earth, resulting from the sudden release of energy in the Earth's lithosphere that creates seismic waves. Earthquakes can range in size from those that are so weak that they cannot be felt to those violent enough to toss people around and destroy whole cities.\n\nThe seismicity, or seismic activity, of an area is the frequency, type and size of earthquakes experienced over a period of time. The word tremor is also used for non-earthquake seismic rumbling.\n\nAt the Earth's surface, earthquakes manifest themselves by shaking and displacing or disrupting the ground. When the epicenter of a large earthquake is located offshore, the seabed may be displaced sufficiently to cause a tsunami. Earthquakes can also trigger landslides, and occasionally volcanic activity.\n\nIn its most general sense, the word earthquake is used to describe any seismic event—whether natural or caused by humans—that generates seismic waves. Earthquakes are caused mostly by rupture of geological faults, but also by other events such as volcanic activity, landslides, mine blasts, and nuclear tests. An earthquake's point of initial rupture is called its focus or hypocenter. The epicenter is the point at ground level directly above the hypocenter.\n\n"},{"metadata":{"_uuid":"1060bf63110aad694491128ff866eec902e20477"},"cell_type":"markdown","source":"**Forecasting Earthquakes**\n\nForecasting earthquakes is one of the most important problems in Earth science because of their devastating consequences. Current scientific studies related to earthquake forecasting focus on three key points: \n* **Time** - when the event will occur, \n* **Place** - where it will occur, and \n* **Magnitude** - how large it will be."},{"metadata":{"_uuid":"24f51bd17e68f3bb2832fce2d3d7e2e7f8220395"},"cell_type":"markdown","source":"**What to expect?**\n\nIn this competition, we need to address when the earthquake will take place. Specifically, we’ll have to predict the time remaining before laboratory earthquakes occur from real-time seismic data.\n\nIf this challenge is solved and the physics are ultimately shown to scale from the laboratory to the field, researchers will have the potential to improve earthquake hazard assessments that could save lives and billions of dollars in infrastructure."},{"metadata":{"_uuid":"aeaa8705e48612d959318adef0467d6aadb4a2cd"},"cell_type":"markdown","source":"**Loading Packages**"},{"metadata":{"trusted":true,"_uuid":"87078ed9ab81ece8d017688fc0d8787e69922001","_kg_hide-input":true},"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load in \n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\nimport matplotlib.pyplot as plt\n%matplotlib inline\n\nimport seaborn as sns\nsns.set()\n\nfrom IPython.display import HTML\n\n# Input data files are available in the \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory\n\nimport os\nprint(os.listdir(\"../input\"))\n\nimport warnings\nwarnings.filterwarnings(\"ignore\", category=DeprecationWarning)\nwarnings.filterwarnings(\"ignore\", category=UserWarning)\nwarnings.filterwarnings(\"ignore\", category=FutureWarning)\n\n# Any results you write to the current directory are saved as output.\n","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"bed9ed8b59dbbcf01be7638d7b3d5aadc3ab8a75"},"cell_type":"markdown","source":"**Getting Familiar with the data - Training Data**"},{"metadata":{"trusted":true,"_uuid":"7f38cbfcc33d8a41943d8d2e56d13334a9aaf434"},"cell_type":"code","source":"train = pd.read_csv(\"../input/train.csv\", nrows=10000000)\ntrain.head(5)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"08396505cf32933842ee1e0f6a879700bf88b6d5"},"cell_type":"code","source":"train.rename({\"acoustic_data\": \"Signal\", \"time_to_failure\": \"Quaketime\"}, axis=\"columns\", inplace=True)\ntrain.head(5)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"db55fdcf52ccbb346706174a2a0ef242eccc07bf"},"cell_type":"code","source":"for n in range(5):\n    print(train.Quaketime.values[n])","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"3599ad6d2f13f3ecb4ac933b24202871e99fc70f"},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.6.6","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":1}