├── .editorconfig ├── .github └── workflows │ └── python-package.yml ├── .gitignore ├── LICENSE ├── README.md ├── Time_Series_Prediction └── advanced_lstm_model.py ├── analysis ├── analysis_script.m └── simulation_script.m ├── data ├── processed_data │ ├── earthquake_data.csv │ └── tr.csv └── raw_data │ └── cleaned_data.csv ├── data_fetch └── earthquake_data_fetch.m ├── helpers ├── data_preprocessing.py └── visualization_utils.py ├── models └── earthquake_models │ ├── complex_model.m │ ├── elastic_wave_model.m │ └── seismic_simulation.m ├── output_img ├── Depth Histogram.png ├── Figure_22.png ├── Figure_23.png ├── Figure_24.png ├── Figure_25.png ├── Figure_26.png ├── Figure_27.png ├── Mag Histogram.png ├── Mag vs Depth Scatter.png ├── Magnitude Data over time.png ├── ObjVSNumEvaluations.fig ├── Regression_Analysis.png ├── figure1.png ├── figure10.png ├── figure11.png ├── figure12.png ├── figure13.png ├── figure15.png ├── figure16.png ├── figure17.png ├── figure18.png ├── figure19.png ├── figure2.png ├── figure20.png ├── figure21.png ├── figure3.png ├── figure4.png ├── figure5.png ├── figure6.png ├── figure7.png ├── figure8.png ├── figure9.png └── ÖzelliklerArasıİlişki.fig ├── requirements.txt ├── types.json └── vecteezy_pulsation-epicenter-location-mark-earthquake-earthquake_20143032.jpg /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | ij_continuation_indent_size = 8 5 | ij_formatter_off_tag = @formatter:off 6 | ij_formatter_on_tag = @formatter:on 7 | ij_formatter_tags_enabled = true 8 | ij_smart_tabs = false 9 | ij_visual_guides = 10 | ij_wrap_on_typing = false 11 | 12 | [*.csv] 13 | ij_csv_keep_indents_on_empty_lines = true 14 | ij_csv_wrap_long_lines = false 15 | 16 | [.editorconfig] 17 | ij_editorconfig_align_group_field_declarations = false 18 | ij_editorconfig_space_after_colon = false 19 | ij_editorconfig_space_after_comma = true 20 | ij_editorconfig_space_before_colon = false 21 | ij_editorconfig_space_before_comma = false 22 | ij_editorconfig_spaces_around_assignment_operators = true 23 | 24 | [{*.bash,*.sh,*.zsh}] 25 | ij_shell_binary_ops_start_line = false 26 | ij_shell_keep_column_alignment_padding = false 27 | ij_shell_minify_program = false 28 | ij_shell_redirect_followed_by_space = false 29 | ij_shell_switch_cases_indented = false 30 | ij_shell_use_unix_line_separator = true 31 | 32 | [{*.markdown,*.md}] 33 | ij_markdown_force_one_space_after_blockquote_symbol = true 34 | ij_markdown_force_one_space_after_header_symbol = true 35 | ij_markdown_force_one_space_after_list_bullet = true 36 | ij_markdown_force_one_space_between_words = true 37 | ij_markdown_format_tables = true 38 | ij_markdown_insert_quote_arrows_on_wrap = true 39 | ij_markdown_keep_indents_on_empty_lines = false 40 | ij_markdown_keep_line_breaks_inside_text_blocks = true 41 | ij_markdown_max_lines_around_block_elements = 1 42 | ij_markdown_max_lines_around_header = 1 43 | ij_markdown_max_lines_between_paragraphs = 1 44 | ij_markdown_min_lines_around_block_elements = 1 45 | ij_markdown_min_lines_around_header = 1 46 | ij_markdown_min_lines_between_paragraphs = 1 47 | ij_markdown_wrap_text_if_long = true 48 | ij_markdown_wrap_text_inside_blockquotes = true 49 | 50 | [{*.py,*.pyw}] 51 | ij_python_align_collections_and_comprehensions = true 52 | ij_python_align_multiline_imports = true 53 | ij_python_align_multiline_parameters = true 54 | ij_python_align_multiline_parameters_in_calls = true 55 | ij_python_blank_line_at_file_end = true 56 | ij_python_blank_lines_after_imports = 1 57 | ij_python_blank_lines_after_local_imports = 0 58 | ij_python_blank_lines_around_class = 1 59 | ij_python_blank_lines_around_method = 1 60 | ij_python_blank_lines_around_top_level_classes_functions = 2 61 | ij_python_blank_lines_before_first_method = 0 62 | ij_python_call_parameters_new_line_after_left_paren = false 63 | ij_python_call_parameters_right_paren_on_new_line = false 64 | ij_python_call_parameters_wrap = normal 65 | ij_python_dict_alignment = 0 66 | ij_python_dict_new_line_after_left_brace = false 67 | ij_python_dict_new_line_before_right_brace = false 68 | ij_python_dict_wrapping = 1 69 | ij_python_from_import_new_line_after_left_parenthesis = false 70 | ij_python_from_import_new_line_before_right_parenthesis = false 71 | ij_python_from_import_parentheses_force_if_multiline = false 72 | ij_python_from_import_trailing_comma_if_multiline = false 73 | ij_python_from_import_wrapping = 1 74 | ij_python_hang_closing_brackets = false 75 | ij_python_keep_blank_lines_in_code = 1 76 | ij_python_keep_blank_lines_in_declarations = 1 77 | ij_python_keep_indents_on_empty_lines = false 78 | ij_python_keep_line_breaks = true 79 | ij_python_method_parameters_new_line_after_left_paren = false 80 | ij_python_method_parameters_right_paren_on_new_line = false 81 | ij_python_method_parameters_wrap = normal 82 | ij_python_new_line_after_colon = false 83 | ij_python_new_line_after_colon_multi_clause = true 84 | ij_python_optimize_imports_always_split_from_imports = false 85 | ij_python_optimize_imports_case_insensitive_order = false 86 | ij_python_optimize_imports_join_from_imports_with_same_source = false 87 | ij_python_optimize_imports_sort_by_type_first = true 88 | ij_python_optimize_imports_sort_imports = true 89 | ij_python_optimize_imports_sort_names_in_from_imports = false 90 | ij_python_space_after_comma = true 91 | ij_python_space_after_number_sign = true 92 | ij_python_space_after_py_colon = true 93 | ij_python_space_before_backslash = true 94 | ij_python_space_before_comma = false 95 | ij_python_space_before_for_semicolon = false 96 | ij_python_space_before_lbracket = false 97 | ij_python_space_before_method_call_parentheses = false 98 | ij_python_space_before_method_parentheses = false 99 | ij_python_space_before_number_sign = true 100 | ij_python_space_before_py_colon = false 101 | ij_python_space_within_empty_method_call_parentheses = false 102 | ij_python_space_within_empty_method_parentheses = false 103 | ij_python_spaces_around_additive_operators = true 104 | ij_python_spaces_around_assignment_operators = true 105 | ij_python_spaces_around_bitwise_operators = true 106 | ij_python_spaces_around_eq_in_keyword_argument = false 107 | ij_python_spaces_around_eq_in_named_parameter = false 108 | ij_python_spaces_around_equality_operators = true 109 | ij_python_spaces_around_multiplicative_operators = true 110 | ij_python_spaces_around_power_operator = true 111 | ij_python_spaces_around_relational_operators = true 112 | ij_python_spaces_around_shift_operators = true 113 | ij_python_spaces_within_braces = false 114 | ij_python_spaces_within_brackets = false 115 | ij_python_spaces_within_method_call_parentheses = false 116 | ij_python_spaces_within_method_parentheses = false 117 | ij_python_use_continuation_indent_for_arguments = false 118 | ij_python_use_continuation_indent_for_collection_and_comprehensions = false 119 | ij_python_use_continuation_indent_for_parameters = true 120 | ij_python_wrap_long_lines = false 121 | -------------------------------------------------------------------------------- /.github/workflows/python-package.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install Python dependencies, run tests and lint with a variety of Python versions 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python 3 | 4 | name: Python package 5 | 6 | on: 7 | push: 8 | branches: [ "main" ] 9 | pull_request: 10 | branches: [ "main" ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | python-version: ["3.9", "3.10", "3.11"] 20 | 21 | steps: 22 | - uses: actions/checkout@v3 23 | - name: Set up Python ${{ matrix.python-version }} 24 | uses: actions/setup-python@v3 25 | with: 26 | python-version: ${{ matrix.python-version }} 27 | - name: Install dependencies 28 | run: | 29 | python -m pip install --upgrade pip 30 | python -m pip install flake8 pytest 31 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 32 | - name: Lint with flake8 33 | run: | 34 | # stop the build if there are Python syntax errors or undefined names 35 | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 36 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide 37 | flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics 38 | - name: Test with pytest 39 | run: | 40 | pytest 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### venv template 2 | # Virtualenv 3 | # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ 4 | .Python 5 | [Bb]in 6 | [Ii]nclude 7 | [Ll]ib 8 | [Ll]ib64 9 | [Ll]ocal 10 | [Ss]cripts 11 | pyvenv.cfg 12 | .venv 13 | pip-selfcheck.json 14 | 15 | ### VirtualEnv template 16 | # Virtualenv 17 | # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ 18 | .Python 19 | [Bb]in 20 | [Ii]nclude 21 | [Ll]ib 22 | [Ll]ib64 23 | [Ll]ocal 24 | [Ss]cripts 25 | pyvenv.cfg 26 | .venv 27 | pip-selfcheck.json 28 | 29 | ### LaTeX template 30 | ## Core latex/pdflatex auxiliary files: 31 | *.aux 32 | *.lof 33 | *.log 34 | *.lot 35 | *.fls 36 | *.out 37 | *.toc 38 | *.fmt 39 | *.fot 40 | *.cb 41 | *.cb2 42 | .*.lb 43 | 44 | ## Intermediate documents: 45 | *.dvi 46 | *.xdv 47 | *-converted-to.* 48 | # these rules might exclude image files for figures etc. 49 | # *.ps 50 | # *.eps 51 | # *.pdf 52 | 53 | ## Generated if empty string is given at "Please type another file name for output:" 54 | .pdf 55 | 56 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 57 | *.bbl 58 | *.bcf 59 | *.blg 60 | *-blx.aux 61 | *-blx.bib 62 | *.run.xml 63 | 64 | ## Build tool auxiliary files: 65 | *.fdb_latexmk 66 | *.synctex 67 | *.synctex(busy) 68 | *.synctex.gz 69 | *.synctex.gz(busy) 70 | *.pdfsync 71 | 72 | ## Build tool directories for auxiliary files 73 | # latexrun 74 | latex.out/ 75 | 76 | ## Auxiliary and intermediate files from other packages: 77 | # algorithms 78 | *.alg 79 | *.loa 80 | 81 | # achemso 82 | acs-*.bib 83 | 84 | # amsthm 85 | *.thm 86 | 87 | # beamer 88 | *.nav 89 | *.pre 90 | *.snm 91 | *.vrb 92 | 93 | # changes 94 | *.soc 95 | 96 | # comment 97 | *.cut 98 | 99 | # cprotect 100 | *.cpt 101 | 102 | # elsarticle (documentclass of Elsevier journals) 103 | *.spl 104 | 105 | # endnotes 106 | *.ent 107 | 108 | # fixme 109 | *.lox 110 | 111 | # feynmf/feynmp 112 | *.mf 113 | *.mp 114 | *.t[1-9] 115 | *.t[1-9][0-9] 116 | *.tfm 117 | 118 | #(r)(e)ledmac/(r)(e)ledpar 119 | *.end 120 | *.?end 121 | *.[1-9] 122 | *.[1-9][0-9] 123 | *.[1-9][0-9][0-9] 124 | *.[1-9]R 125 | *.[1-9][0-9]R 126 | *.[1-9][0-9][0-9]R 127 | *.eledsec[1-9] 128 | *.eledsec[1-9]R 129 | *.eledsec[1-9][0-9] 130 | *.eledsec[1-9][0-9]R 131 | *.eledsec[1-9][0-9][0-9] 132 | *.eledsec[1-9][0-9][0-9]R 133 | 134 | # glossaries 135 | *.acn 136 | *.acr 137 | *.glg 138 | *.glo 139 | *.gls 140 | *.glsdefs 141 | *.lzo 142 | *.lzs 143 | *.slg 144 | *.slo 145 | *.sls 146 | 147 | # uncomment this for glossaries-extra (will ignore makeindex's style files!) 148 | # *.ist 149 | 150 | # gnuplot 151 | *.gnuplot 152 | *.table 153 | 154 | # gnuplottex 155 | *-gnuplottex-* 156 | 157 | # gregoriotex 158 | *.gaux 159 | *.glog 160 | *.gtex 161 | 162 | # htlatex 163 | *.4ct 164 | *.4tc 165 | *.idv 166 | *.lg 167 | *.trc 168 | *.xref 169 | 170 | # hyperref 171 | *.brf 172 | 173 | # knitr 174 | *-concordance.tex 175 | # TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files 176 | # *.tikz 177 | *-tikzDictionary 178 | 179 | # listings 180 | *.lol 181 | 182 | # luatexja-ruby 183 | *.ltjruby 184 | 185 | # makeidx 186 | *.idx 187 | *.ilg 188 | *.ind 189 | 190 | # minitoc 191 | *.maf 192 | *.mlf 193 | *.mlt 194 | *.mtc[0-9]* 195 | *.slf[0-9]* 196 | *.slt[0-9]* 197 | *.stc[0-9]* 198 | 199 | # minted 200 | _minted* 201 | *.pyg 202 | 203 | # morewrites 204 | *.mw 205 | 206 | # newpax 207 | *.newpax 208 | 209 | # nomencl 210 | *.nlg 211 | *.nlo 212 | *.nls 213 | 214 | # pax 215 | *.pax 216 | 217 | # pdfpcnotes 218 | *.pdfpc 219 | 220 | # sagetex 221 | *.sagetex.sage 222 | *.sagetex.py 223 | *.sagetex.scmd 224 | 225 | # scrwfile 226 | *.wrt 227 | 228 | # svg 229 | svg-inkscape/ 230 | 231 | # sympy 232 | *.sout 233 | *.sympy 234 | sympy-plots-for-*.tex/ 235 | 236 | # pdfcomment 237 | *.upa 238 | *.upb 239 | 240 | # pythontex 241 | *.pytxcode 242 | pythontex-files-*/ 243 | 244 | # tcolorbox 245 | *.listing 246 | 247 | # thmtools 248 | *.loe 249 | 250 | # TikZ & PGF 251 | *.dpth 252 | *.md5 253 | *.auxlock 254 | 255 | # titletoc 256 | *.ptc 257 | 258 | # todonotes 259 | *.tdo 260 | 261 | # vhistory 262 | *.hst 263 | *.ver 264 | 265 | # easy-todo 266 | *.lod 267 | 268 | # xcolor 269 | *.xcp 270 | 271 | # xmpincl 272 | *.xmpi 273 | 274 | # xindy 275 | *.xdy 276 | 277 | # xypic precompiled matrices and outlines 278 | *.xyc 279 | *.xyd 280 | 281 | # endfloat 282 | *.ttt 283 | *.fff 284 | 285 | # Latexian 286 | TSWLatexianTemp* 287 | 288 | ## Editors: 289 | # WinEdt 290 | *.bak 291 | *.sav 292 | 293 | # Texpad 294 | .texpadtmp 295 | 296 | # LyX 297 | *.lyx~ 298 | 299 | # Kile 300 | *.backup 301 | 302 | # gummi 303 | .*.swp 304 | 305 | # KBibTeX 306 | *~[0-9]* 307 | 308 | # TeXnicCenter 309 | *.tps 310 | 311 | # auto folder when using emacs and auctex 312 | ./auto/* 313 | *.el 314 | 315 | # expex forward references with \gathertags 316 | *-tags.tex 317 | 318 | # standalone packages 319 | *.sta 320 | 321 | # Makeindex log files 322 | *.lpz 323 | 324 | # xwatermark package 325 | *.xwm 326 | 327 | # REVTeX puts footnotes in the bibliography by default, unless the nofootinbib 328 | # option is specified. Footnotes are the stored in a file with suffix Notes.bib. 329 | # Uncomment the next line to have this generated file ignored. 330 | #*Notes.bib 331 | 332 | ### Python template 333 | # Byte-compiled / optimized / DLL files 334 | __pycache__/ 335 | *.py[cod] 336 | *$py.class 337 | 338 | # C extensions 339 | *.so 340 | 341 | # Distribution / packaging 342 | .Python 343 | build/ 344 | develop-eggs/ 345 | dist/ 346 | downloads/ 347 | eggs/ 348 | .eggs/ 349 | lib/ 350 | lib64/ 351 | parts/ 352 | sdist/ 353 | var/ 354 | wheels/ 355 | share/python-wheels/ 356 | *.egg-info/ 357 | .installed.cfg 358 | *.egg 359 | MANIFEST 360 | 361 | # PyInstaller 362 | # Usually these files are written by a python script from a template 363 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 364 | *.manifest 365 | *.spec 366 | 367 | # Installer logs 368 | pip-log.txt 369 | pip-delete-this-directory.txt 370 | 371 | # Unit test / coverage reports 372 | htmlcov/ 373 | .tox/ 374 | .nox/ 375 | .coverage 376 | .coverage.* 377 | .cache 378 | nosetests.xml 379 | coverage.xml 380 | *.cover 381 | *.py,cover 382 | .hypothesis/ 383 | .pytest_cache/ 384 | cover/ 385 | 386 | # Translations 387 | *.mo 388 | *.pot 389 | 390 | # Django stuff: 391 | *.log 392 | local_settings.py 393 | db.sqlite3 394 | db.sqlite3-journal 395 | 396 | # Flask stuff: 397 | instance/ 398 | .webassets-cache 399 | 400 | # Scrapy stuff: 401 | .scrapy 402 | 403 | # Sphinx documentation 404 | docs/_build/ 405 | 406 | # PyBuilder 407 | .pybuilder/ 408 | target/ 409 | 410 | # Jupyter Notebook 411 | .ipynb_checkpoints 412 | 413 | # IPython 414 | profile_default/ 415 | ipython_config.py 416 | 417 | # pyenv 418 | # For a library or package, you might want to ignore these files since the code is 419 | # intended to run in multiple environments; otherwise, check them in: 420 | # .python-version 421 | 422 | # pipenv 423 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 424 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 425 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 426 | # install all needed dependencies. 427 | #Pipfile.lock 428 | 429 | # poetry 430 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 431 | # This is especially recommended for binary packages to ensure reproducibility, and is more 432 | # commonly ignored for libraries. 433 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 434 | #poetry.lock 435 | 436 | # pdm 437 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 438 | #pdm.lock 439 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 440 | # in version control. 441 | # https://pdm.fming.dev/#use-with-ide 442 | .pdm.toml 443 | 444 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 445 | __pypackages__/ 446 | 447 | # Celery stuff 448 | celerybeat-schedule 449 | celerybeat.pid 450 | 451 | # SageMath parsed files 452 | *.sage.py 453 | 454 | # Environments 455 | .env 456 | .venv 457 | env/ 458 | venv/ 459 | ENV/ 460 | env.bak/ 461 | venv.bak/ 462 | 463 | # Spyder project settings 464 | .spyderproject 465 | .spyproject 466 | 467 | # Rope project settings 468 | .ropeproject 469 | 470 | # mkdocs documentation 471 | /site 472 | 473 | # mypy 474 | .mypy_cache/ 475 | .dmypy.json 476 | dmypy.json 477 | 478 | # Pyre type checker 479 | .pyre/ 480 | 481 | # pytype static type analyzer 482 | .pytype/ 483 | 484 | # Cython debug symbols 485 | cython_debug/ 486 | 487 | # PyCharm 488 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 489 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 490 | # and can be added to the global gitignore or merged into this file. For a more nuclear 491 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 492 | #.idea/ 493 | 494 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Pınar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Earthquake Prediction Analysis Project 2 | 3 | ![Earthquake](vecteezy_pulsation-epicenter-location-mark-earthquake-earthquake_20143032.jpg) 4 | 5 | Welcome to the **Earthquake Prediction Analysis Project**! This project aims to predict the magnitude of earthquakes using time series data and LSTM (Long Short-Term Memory) neural networks. 6 | 7 | ## 📋 Table of Contents 8 | 1. [Introduction](#introduction) 9 | 2. [Installation](#installation) 10 | 3. [Usage](#usage) 11 | 4. [Dataset](#dataset) 12 | 5. [Model Architecture](#model-architecture) 13 | 6. [Results](#results) 14 | 7. [Future Work](#future-work) 15 | 8. [Contributing](#contributing) 16 | 9. [License](#license) 17 | 10. [Open Source Code](#open-source-code) 18 | 19 | ## 🌍 Introduction 20 | Earthquake prediction is a critical area of research aiming to mitigate the impact of seismic activities on society and infrastructure. This project utilizes machine learning techniques, particularly LSTM neural networks, to forecast the magnitude of earthquakes based on historical seismic data. 21 | 22 | ## 💻 Installation 23 | To install and run this project locally, follow these steps: 24 | 1. Clone this repository to your local machine. 25 | 2. Install the required dependencies listed in the `requirements.txt` file using pip: 26 | ```bash 27 | pip install -r requirements.txt 28 | ``` 29 | 3. Run the main script `earthquake_prediction.py` to train the LSTM model and make predictions. 30 | 31 | ## 🚀 Usage 32 | After installing the necessary dependencies and running the main script, you can use the trained LSTM model to make earthquake magnitude predictions. Additionally, you can customize the model architecture and hyperparameters to improve prediction accuracy. 33 | 34 | ## 📊 Dataset 35 | The dataset utilized in this project comprises historical earthquake records, encompassing attributes such as timestamp, geographic coordinates, depth, and magnitude. Prior to employment, the data undergoes preprocessing and partitioning into training and testing subsets for model training and assessment. 36 | 37 | ### Kandilli Observatory Live Earthquake Data 38 | Live earthquake data from the Kandilli Observatory and Earthquake Research Institute can be accessed through the following API endpoint: 39 | ```bash 40 | curl -X 'GET' \ 41 | 'https://api.orhanaydogdu.com.tr/deprem/kandilli/live' \ 42 | -H 'accept: application/json' 43 | ``` 44 | 45 | ### Sample Response: 46 | 47 | | Date & Time (UTC) | Location_tz | Depth (km) | Magnitude | 48 | |---------------------|--------------------|------------|-----------| 49 | | 2024-03-19 21:36:40 | Europe/Istanbul | 7 | 2.8 | 50 | | 2024-03-19 21:14:44 | Europe/Istanbul | 6.8 | 1.9 | 51 | | 2024-03-19 19:48:26 | Europe/Istanbul | 12.5 | 1.7 | 52 | | 2024-03-19 19:43:28 | Europe/Istanbul | 10.2 | 2.9 | 53 | | 2024-03-19 19:40:16 | Europe/Istanbul | 5 | 2.4 | 54 | 55 | 56 | + This API endpoint provides access to live earthquake data for real-time monitoring and analysis purposes. 57 | 58 | 59 | ## 🧠 Model Architecture 60 | The LSTM neural network architecture used in this project consists of multiple LSTM layers followed by dense layers for regression. The model takes sequential earthquake data as input and learns to predict the magnitude of future earthquakes. 61 | ## 📉 Results 62 | 63 | The performance of the LSTM model is evaluated using the following metrics: 64 | 65 | - **Mean Squared Error (MSE)** 66 | - **Root Mean Squared Error (RMSE)** 67 | - **Mean Absolute Error (MAE)** 68 | 69 | Additionally, the correlation coefficient between predicted and actual earthquake magnitudes is calculated to assess the model's performance. 70 | 71 |
72 | View Results 73 | 74 | | `Metric` | `Value` | 75 | |------------------------------|-----------| 76 | | Mean Squared Error (MSE) | 1.9480 | 77 | | Root Mean Squared Error (RMSE)| 1.3957 | 78 | | Mean Absolute Error (MAE) | 1.3818 | 79 | 80 |
81 | 82 | ## 🔮 Future Work 83 | 84 | There are several opportunities for future improvement and expansion of this project: 85 | 86 | - Incorporating additional features such as seismic waveforms and geological data. 87 | - Experimenting with different neural network architectures and hyperparameters. 88 | - Developing a web-based application for real-time earthquake prediction and monitoring. 89 | 90 |
91 | Contribute to Future Work 92 | 93 | If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request. 94 | 95 |
96 | 97 | ## 📜 License 98 | 99 | This project is licensed under the MIT License - see the LICENSE file for details. 100 | 101 | ## 🌟 Open Source Code 102 | 103 | Feel free to use, modify, and distribute this code for educational and research purposes. If you find this project helpful, consider giving it a star on GitHub! 104 | -------------------------------------------------------------------------------- /Time_Series_Prediction/advanced_lstm_model.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | import matplotlib.pyplot as plt 4 | from sklearn.preprocessing import MinMaxScaler 5 | from keras.models import Model 6 | from keras.layers import Input, LSTM, Dense, concatenate 7 | from sklearn.metrics import mean_squared_error, mean_absolute_error 8 | from sklearn.model_selection import train_test_split 9 | 10 | # Veriyi yükleme 11 | data = pd.read_csv('../data/processed_data/earthquake_data.csv') 12 | 13 | # Gerekli sütunları seçme 14 | data = data[['date_time', 'mag', 'depth']] 15 | 16 | # Tarih-saat sütununu datetime formatına dönüştürme 17 | data['date_time'] = pd.to_datetime(data['date_time']) 18 | 19 | # Eksik değerleri doldurma veya çıkarma 20 | data.dropna(inplace=True) 21 | 22 | # Veriyi normalize etme 23 | scaler = MinMaxScaler() 24 | data[['mag']] = scaler.fit_transform(data[['mag']]) 25 | 26 | # Derinlik sütununu ekleyin 27 | data['depth'] = np.random.uniform(0, 50, size=len(data)) # Örnek derinlik değerleri 28 | 29 | # LSTM için girdi ve çıktı verilerini oluşturma 30 | def create_dataset(X, y, depth, time_steps=1): 31 | Xs, ys, depths = [], [], [] 32 | for i in range(len(X) - time_steps): 33 | v = X.iloc[i:(i + time_steps)].values 34 | Xs.append(v) 35 | ys.append(y.iloc[i + time_steps]) 36 | depths.append(depth.iloc[i + time_steps]) # Derinlik değerlerini ekleyin 37 | return np.array(Xs), np.array(ys), np.array(depths) 38 | 39 | TIME_STEPS = 10 40 | X, y, depth = create_dataset(data[['mag']], data['mag'], data['depth'], TIME_STEPS) 41 | 42 | # Veriyi eğitim ve test setlerine bölme 43 | X_train, X_test, y_train, y_test, depth_train, depth_test = train_test_split(X, y, depth, test_size=0.2, random_state=42) 44 | 45 | # Giriş katmanları 46 | input_mag = Input(shape=(X_train.shape[1], X_train.shape[2]), name='input_mag') 47 | input_depth = Input(shape=(1,), name='input_depth') 48 | 49 | # LSTM katmanları 50 | lstm_mag = LSTM(units=128, return_sequences=True)(input_mag) 51 | lstm_mag = LSTM(units=128, return_sequences=False)(lstm_mag) 52 | 53 | # Derinlik bilgisini içeren katman 54 | dense_depth = Dense(units=64)(input_depth) 55 | 56 | # LSTM ve derinlik bilgisi katmanlarını birleştirme 57 | concatenated = concatenate([lstm_mag, dense_depth]) 58 | 59 | # Çıkış katmanı 60 | output = Dense(units=1)(concatenated) 61 | 62 | # Model oluşturma 63 | model = Model(inputs=[input_mag, input_depth], outputs=output) 64 | 65 | # Modeli derleme 66 | model.compile(optimizer='adam', loss='mean_squared_error') 67 | 68 | # Modeli eğitme 69 | model.fit({'input_mag': X_train, 'input_depth': depth_train}, y_train, epochs=200, batch_size=64, validation_split=0.1, verbose=1) 70 | 71 | # Gelecekteki tahminlerin yapılması 72 | def predict_future(model, X, depth, time_steps, future_steps): 73 | future_predictions = [] 74 | current_batch = X[-1].reshape(1, time_steps, X.shape[2]) 75 | current_depth = depth[-1] # Son derinlik değerini alın 76 | for i in range(future_steps): 77 | future_pred = model.predict({'input_mag': current_batch, 'input_depth': np.array([[current_depth]])})[0][0] # Derinlik bilgisini ekleyin 78 | future_predictions.append(future_pred) 79 | # Son tahmini yeni girdi olarak kullanma 80 | current_batch = np.roll(current_batch, -1, axis=1) 81 | current_batch[0, -1, 0] = future_pred # Son tahmini ekleme 82 | return future_predictions 83 | 84 | # Gelecekteki 60 adımlık tahmin 85 | future_predictions = predict_future(model, X_test, depth_test, TIME_STEPS, 60) 86 | 87 | # Normalleştirmeyi tersine çevirme 88 | future_predictions = scaler.inverse_transform(np.array(future_predictions).reshape(-1, 1)) 89 | 90 | print("Gelecekteki tahminler:") 91 | print(future_predictions) 92 | 93 | # Gerçek değerler 94 | actual_values = data[['mag']].iloc[-len(future_predictions):] 95 | 96 | # Tahmin edilen değerler 97 | predicted_values = future_predictions 98 | 99 | # Tahminlerle gerçek değerler arasındaki fark 100 | prediction_errors = actual_values.values - predicted_values 101 | 102 | # Gerçek değerlerle tahmin edilen değerler arasındaki benzerliği değerlendirme 103 | def evaluate_predictions(y_true, y_pred): 104 | mse = mean_squared_error(y_true, y_pred) 105 | rmse = np.sqrt(mse) 106 | mae = mean_absolute_error(y_true, y_pred) 107 | return mse, rmse, mae 108 | 109 | # Tahminlerin doğruluğunu değerlendirme 110 | mse, rmse, mae = evaluate_predictions(actual_values, predicted_values) 111 | 112 | print("MSE (Mean Squared Error):", mse) 113 | print("RMSE (Root Mean Squared Error):", rmse) 114 | print("MAE (Mean Absolute Error):", mae) 115 | 116 | # Görselleştirme 117 | plt.figure(figsize=(10, 6)) 118 | plt.plot(actual_values.index, actual_values, label='Gerçek Değerler', color='blue', marker='o') 119 | plt.plot(actual_values.index, predicted_values, label='Tahmin Edilen Değerler', color='red', marker='o') 120 | plt.xlabel('Index') 121 | plt.ylabel('Magnitude') 122 | plt.title('Gerçek ve Tahmin Edilen Değerler') 123 | plt.legend() 124 | plt.grid(True) 125 | plt.show() 126 | 127 | plt.figure(figsize=(10, 6)) 128 | plt.plot(actual_values.index, prediction_errors, label='Hata', color='green', marker='o') 129 | plt.axhline(y=0, color='black', linestyle='--') 130 | plt.xlabel('Index') 131 | plt.ylabel('Hata (Gerçek - Tahmin)') 132 | plt.title('Tahmin Hataları') 133 | plt.legend() 134 | plt.grid(True) 135 | plt.show() 136 | -------------------------------------------------------------------------------- /analysis/analysis_script.m: -------------------------------------------------------------------------------- 1 | % Adım 1: Veriyi yükleme ve hazırlama 2 | data = readtable('Earthquake_Prediction_Analysis_Project/earthquake_data.csv'); 3 | 4 | % Giriş ve çıkış özelliklerini ayarlama 5 | X = [data.mag, data.depth]; % Deprem büyüklüğü ve derinlik özellikleri 6 | Y = data.mag; % Tahmin edilecek değerler: Deprem büyüklükleri 7 | 8 | % Veri setinin özet bilgilerini görüntüleme 9 | disp('Veri Seti Özeti:'); 10 | summary(data); 11 | 12 | % Veri setindeki eksik değerleri kontrol etme 13 | missing_values = any(ismissing(data)); 14 | if any(missing_values) 15 | disp('Veri Setinde Eksik Değerler Var!'); 16 | disp('Eksik Değerlerin Sayısı:'); 17 | disp(sum(missing_values)); 18 | else 19 | disp('Veri Setinde Eksik Değer Yok'); 20 | end 21 | 22 | % Giriş ve çıkış özelliklerinin boyutlarını kontrol etme 23 | disp('Giriş Özelliklerinin Boyutu:'); 24 | disp(size(X)); 25 | disp('Çıkış Özelliklerinin Boyutu:'); 26 | disp(size(Y)); 27 | 28 | % Veri görselleştirme (isteğe bağlı olarak) 29 | figure; 30 | subplot(2, 1, 1); 31 | histogram(Y); 32 | xlabel('Deprem Büyüklüğü'); 33 | ylabel('Frekans'); 34 | title('Deprem Büyüklüğü Dağılımı'); 35 | 36 | subplot(2, 1, 2); 37 | scatter3(X(:, 1), X(:, 2), Y); 38 | xlabel('Deprem Büyüklüğü'); 39 | ylabel('Derinlik'); 40 | zlabel('Deprem Büyüklüğü'); 41 | title('Deprem Büyüklüğü ve Derinlik İlişkisi'); 42 | 43 | % İleri analiz ve modelleme adımlarına devam etme 44 | 45 | % Adım 2: Veri ön işleme ve model oluşturma 46 | % Veriyi eğitim ve test setlerine ayırma 47 | rng(1); % Rastgele sayı üreteciyi başlatma 48 | cv = cvpartition(size(X, 1), 'HoldOut', 0.2); 49 | idxTrain = training(cv); % Eğitim seti için indeksler 50 | idxTest = test(cv); % Test seti için indeksler 51 | 52 | X_train = X(idxTrain, :); % Eğitim seti giriş özellikleri 53 | Y_train = Y(idxTrain, :); % Eğitim seti çıkış özellikleri 54 | X_test = X(idxTest, :); % Test seti giriş özellikleri 55 | Y_test = Y(idxTest, :); % Test seti çıkış özellikleri 56 | 57 | % Model oluşturma 58 | model = fitrsvm(X_train, Y_train, 'KernelFunction', 'gaussian'); 59 | 60 | % Adım 3: Modelin Değerlendirilmesi 61 | % Eğitim seti üzerinde tahminler yapma 62 | Y_pred_train = predict(model, X_train); 63 | 64 | % Eğitim seti performans metriklerini hesaplama 65 | mse_train = mean((Y_train - Y_pred_train).^2); % Ortalama Kare Hata (MSE) 66 | 67 | % Test seti üzerinde tahminler yapma 68 | Y_pred_test = predict(model, X_test); 69 | 70 | % Test seti performans metriklerini hesaplama 71 | mse_test = mean((Y_test - Y_pred_test).^2); % Ortalama Kare Hata (MSE) 72 | 73 | % Sonuçların görselleştirilmesi (isteğe bağlı olarak) 74 | figure; 75 | subplot(1, 2, 1); 76 | plot(Y_train, Y_pred_train, 'bo'); 77 | hold on; 78 | plot(Y_train, Y_train, 'r-', 'LineWidth', 2); 79 | hold off; 80 | xlabel('Gerçek Değerler'); 81 | ylabel('Tahmin Edilen Değerler'); 82 | title('Eğitim Seti Tahminleri'); 83 | legend('Tahminler', 'Doğru Eğim'); 84 | 85 | subplot(1, 2, 2); 86 | plot(Y_test, Y_pred_test, 'bo'); 87 | hold on; 88 | plot(Y_test, Y_test, 'r-', 'LineWidth', 2); 89 | hold off; 90 | xlabel('Gerçek Değerler'); 91 | ylabel('Tahmin Edilen Değerler'); 92 | title('Test Seti Tahminleri'); 93 | legend('Tahminler', 'Doğru Eğim'); 94 | 95 | % Performans metriklerinin görüntülenmesi 96 | disp('Eğitim Seti Ortalama Kare Hata (MSE):'); 97 | disp(mse_train); 98 | disp('Test Seti Ortalama Kare Hata (MSE):'); 99 | disp(mse_test); 100 | 101 | % Modelin optimize edilmesi 102 | rng(1); % Rastgele sayı üreteciyi başlatma 103 | Mdl = fitrsvm(X, Y, 'OptimizeHyperparameters', {'BoxConstraint', 'KernelScale', 'Epsilon'}, ... 104 | 'HyperparameterOptimizationOptions', struct('AcquisitionFunctionName', 'expected-improvement-plus', 'MaxObjectiveEvaluations', 50, 'ShowPlots', true)); 105 | 106 | % En iyi hiperparametreleri al 107 | bestParams = Mdl.ModelParameters; 108 | 109 | % En iyi modeli oluşturma 110 | bestModel = fitrsvm(X, Y, 'BoxConstraint', bestParams.BoxConstraint, 'KernelScale', bestParams.KernelScale, 'Epsilon', bestParams.Epsilon); 111 | 112 | % Özellik ölçeklendirme 113 | X_scaled = zscore(X); 114 | 115 | % Eksik verilerin doldurulması 116 | X_filled = fillmissing(X, 'linear'); 117 | 118 | % Aykırı değerlerin ele alınması 119 | X_cleaned = rmoutliers(X); 120 | 121 | % Yeni özellikler türetme 122 | X_new = [X, X.^2, log(X+1)]; 123 | 124 | % Veri setine yeni özellikler ekleme 125 | new_feature = sin(X(:, 1)) + cos(X(:, 2)); 126 | X_with_new_feature = [X, new_feature]; -------------------------------------------------------------------------------- /analysis/simulation_script.m: -------------------------------------------------------------------------------- 1 | % Veriyi okuma 2 | data = readtable('Earthquake_Prediction_Analysis_Project/earthquake_data.csv'); 3 | 4 | % Giriş ve çıkış özelliklerini ayarlama 5 | X = [data.mag, data.depth]; % Deprem büyüklüğü ve derinlik özellikleri 6 | Y = data.mag; % Tahmin edilecek değerler: Deprem büyüklükleri 7 | 8 | % Gelişmiş veri görselleştirme ve analiz 9 | figure; 10 | 11 | % Deprem büyüklüğü dağılımının histogramı 12 | subplot(2, 2, 1); 13 | histogram(Y, 'FaceColor', '#7E2F8E', 'EdgeColor', '#4A245D'); 14 | xlabel('Deprem Büyüklüğü'); 15 | ylabel('Frekans'); 16 | title('Deprem Büyüklüğü Dağılımı'); 17 | saveas(gcf, 'figure1.png'); 18 | 19 | % Deprem derinliği ve büyüklük ilişkisinin 3D gösterimi 20 | subplot(2, 2, 2); 21 | scatter3(X(:, 1), X(:, 2), Y, 50, Y, 'filled'); 22 | colormap(jet); 23 | colorbar; 24 | xlabel('Deprem Büyüklüğü'); 25 | ylabel('Derinlik (km)'); 26 | zlabel('Deprem Büyüklüğü'); 27 | title('Deprem Büyüklüğü ve Derinlik İlişkisi'); 28 | saveas(gcf, 'figure2.png'); 29 | 30 | % Özellikler arasındaki ilişkinin heatmap gösterimi 31 | subplot(2, 2, [3, 4]); 32 | corr_matrix = corrcoef([X, Y]); 33 | heatmap({'Deprem Büyüklüğü', 'Derinlik (km)'}, {'Deprem Büyüklüğü', 'Derinlik (km)'}, corr_matrix(1:2, 1:2),... 34 | 'Colormap', jet, 'ColorbarVisible', 'off', 'FontSize', 10, 'CellLabelColor','none'); 35 | title('Özellikler Arasındaki Korelasyon'); 36 | saveas(gcf, 'figure3.png'); 37 | 38 | % Model oluşturma 39 | rng(1); % Rastgele sayı üreteciyi başlatma 40 | model = fitrsvm(X, Y, 'KernelFunction', 'gaussian'); 41 | 42 | % Tahminlerin görselleştirilmesi 43 | Y_pred = predict(model, X); 44 | figure; 45 | plot(Y, Y_pred, 'o', 'MarkerSize', 8, 'MarkerEdgeColor', '#D95319', 'MarkerFaceColor', '#EDB120'); 46 | hold on; 47 | plot([min(Y), max(Y)], [min(Y), max(Y)], '-', 'Color', '#77AC30', 'LineWidth', 2); 48 | hold off; 49 | xlabel('Gerçek Değerler'); 50 | ylabel('Tahmin Edilen Değerler'); 51 | title('Model Tahminleri'); 52 | legend('Tahminler', 'Doğru Eğim', 'Location', 'southeast'); 53 | saveas(gcf, 'figure4.png'); 54 | 55 | % Model performansının görselleştirilmesi 56 | residuals = Y - Y_pred; 57 | figure; 58 | subplot(2, 1, 1); 59 | histogram(residuals, 'FaceColor', '#7E2F8E', 'EdgeColor', '#4A245D'); 60 | xlabel('Artık (Residual)'); 61 | ylabel('Frekans'); 62 | title('Model Artıklarının Dağılımı'); 63 | 64 | subplot(2, 1, 2); 65 | plot(Y, residuals, 'o', 'MarkerSize', 8, 'MarkerEdgeColor', '#D95319', 'MarkerFaceColor', '#EDB120'); 66 | xlabel('Gerçek Değerler'); 67 | ylabel('Artık (Residual)'); 68 | title('Gerçek Değerler ve Artıklar Arasındaki İlişki'); 69 | saveas(gcf, 'figure5.png'); 70 | 71 | % Veri setine yeni özellikler ekleme 72 | new_feature = sin(X(:, 1)) + cos(X(:, 2)); 73 | X_with_new_feature = [X, new_feature]; 74 | 75 | % Scatter plot ile yeni özelliklerin dağılımını gösterme 76 | figure; 77 | scatter3(X_with_new_feature(:, 1), X_with_new_feature(:, 2), new_feature, 50, Y, 'filled'); 78 | colormap(jet); 79 | colorbar; 80 | xlabel('Deprem Büyüklüğü'); 81 | ylabel('Derinlik (km)'); 82 | zlabel('Yeni Özellik'); 83 | title('Yeni Özelliklerin Deprem Büyüklüğü ve Derinlik ile İlişkisi'); 84 | saveas(gcf, 'figure6.png'); 85 | 86 | % Pair plot ile özellikler arasındaki ilişkiyi gösterme 87 | figure; 88 | gplotmatrix(X_with_new_feature, [], Y, 'rb', 'o', [], 'on', [], {'Deprem Büyüklüğü', 'Derinlik (km)', 'Yeni Özellik'}); 89 | sgtitle('Özellikler Arasındaki İlişki'); 90 | 91 | % Korelasyon matrisi görselleştirme 92 | corr_matrix = corrcoef([X, Y]); 93 | figure; 94 | heatmap({'Deprem Büyüklüğü', 'Derinlik (km)', 'Yeni Özellik'}, ... 95 | {'Deprem Büyüklüğü', 'Derinlik (km)', 'Yeni Özellik'}, ... 96 | corr_matrix(1:3, 1:3), 'Colormap', jet, 'ColorbarVisible', 'off', ... 97 | 'FontSize', 10, 'CellLabelColor', 'none'); 98 | title('Özellikler Arasındaki Korelasyon'); 99 | saveas(gcf, 'figure7.png'); 100 | 101 | % PCA (Principal Component Analysis) ile boyut indirgeme ve görselleştirme 102 | coeff = pca(X); 103 | X_pca = X * coeff(:,1:2); % İlk iki bileşeni al 104 | figure; 105 | scatter(X_pca(:,1), X_pca(:,2), 50, Y, 'filled'); 106 | colormap(jet); 107 | colorbar; 108 | xlabel('Birinci Bileşen'); 109 | ylabel('İkinci Bileşen'); 110 | title('PCA ile Boyut İndirgeme'); 111 | saveas(gcf, 'figure8.png'); 112 | 113 | % Gaussian kernel ile yoğunluk tahmini 114 | [f, xi] = ksdensity(X(:,1)); 115 | [g, yi] = ksdensity(X(:,2)); 116 | 117 | % Yoğunluk tahminlerini görselleştirme 118 | figure; 119 | plot(xi, f, 'LineWidth', 2, 'Color', '#0072BD'); 120 | hold on; 121 | plot(yi, g, 'LineWidth', 2, 'Color', '#D95319'); 122 | xlabel('Değer'); 123 | ylabel('Yoğunluk'); 124 | title('Gaussian Kernel Density Estimation (KDE)'); 125 | legend('Deprem Büyüklüğü', 'Derinlik (km)'); 126 | hold off; 127 | saveas(gcf, 'figure9.png'); 128 | 129 | % Çoklu özelliklerin paralel koordinatlarla görselleştirilmesi 130 | figure; 131 | parallelcoords([X Y], 'Group', [], 'Standardize', 'on', ... 132 | 'Quantile', 0.25, 'LineWidth', 2); 133 | xlabel('Özellikler'); 134 | ylabel('Standartlaştırılmış Değerler'); 135 | title('Paralel Koordinatlarla Özelliklerin Karşılaştırılması'); 136 | saveas(gcf, 'figure10.png'); 137 | 138 | % Yeni bir tema seçimi 139 | set(groot,'defaultAxesColorOrder',[0 0.447 0.741;0.85 0.325 0.098;0.929 0.694 0.125]); 140 | 141 | % Eğitim verisinin özelliklerinin karşılıklı dağılım gösterimi 142 | figure; 143 | gplotmatrix(X, [], Y, 'rb', 'o', [], 'on', 'hist', {'Deprem Büyüklüğü', 'Derinlik (km)'}, {'Deprem Büyüklüğü', 'Derinlik (km)'}); 144 | sgtitle('Eğitim Verisi Özelliklerinin Karşılıklı Dağılımı'); 145 | saveas(gcf, 'figure11.png'); 146 | 147 | % Eğitim verisindeki artıkların dağılımı 148 | figure; 149 | histogram(residuals, 'FaceColor', '#77AC30', 'EdgeColor', '#4A245D'); 150 | xlabel('Artık (Residual)'); 151 | ylabel('Frekans'); 152 | title('Model Artıklarının Dağılımı'); 153 | saveas(gcf, 'figure12.png'); 154 | 155 | % Eğitim verisindeki artıkların zaman serisi gösterimi 156 | figure; 157 | plot(residuals, 'LineWidth', 2, 'Color', '#D95319'); 158 | xlabel('Örnekler'); 159 | ylabel('Artık (Residual)'); 160 | title('Model Artıklarının Zaman Serisi'); 161 | saveas(gcf, 'figure13.png'); 162 | 163 | % Model tahminlerinin ve gerçek değerlerin zaman serisi gösterimi 164 | figure; 165 | plot(Y, '-o', 'MarkerSize', 6, 'MarkerEdgeColor', '#EDB120', 'MarkerFaceColor', '#EDB120'); 166 | hold on; 167 | plot(Y_pred, '-o', 'MarkerSize', 6, 'MarkerEdgeColor', '#77AC30', 'MarkerFaceColor', '#77AC30'); 168 | xlabel('Örnekler'); 169 | ylabel('Değer'); 170 | title('Model Tahminleri ve Gerçek Değerlerin Zaman Serisi'); 171 | legend('Gerçek Değerler', 'Tahminler'); 172 | saveas(gcf, 'figure15.png'); 173 | 174 | % Eğitim verisinin özelliklerinin kutu grafiği 175 | figure; 176 | boxplot(X, 'Labels', {'Deprem Büyüklüğü', 'Derinlik (km)'}); 177 | title('Eğitim Verisi Özelliklerinin Kutu Grafiği'); 178 | saveas(gcf, 'figure16.png'); 179 | 180 | % Artıkların yoğunluk tahmini grafiği 181 | figure; 182 | [f, xi] = ksdensity(residuals); 183 | plot(xi, f, 'LineWidth', 2, 'Color', '#0072BD'); 184 | xlabel('Artık (Residual)'); 185 | ylabel('Yoğunluk'); 186 | title('Artık Değerlerinin Yoğunluk Tahmini'); 187 | saveas(gcf, 'figure17.png'); 188 | 189 | % Modelin özellik önem derecelerinin gösterimi 190 | figure; 191 | bar(model.Beta, 'FaceColor', '#77AC30', 'EdgeColor', '#4A245D'); 192 | xlabel('Özellikler'); 193 | ylabel('Önem Dereceleri'); 194 | title('Modelin Özellik Önem Dereceleri'); 195 | saveas(gcf, 'figure18.png'); 196 | 197 | % Belirli bir hiperparametre için performansın görselleştirilmesi 198 | param_values = [0.01, 0.1, 1, 10, 100]; % BoxConstraint değerleri 199 | mse_values = zeros(size(param_values)); % Ortalama kare hata değerleri 200 | 201 | for i = 1:numel(param_values) 202 | % Modeli oluşturma 203 | model = fitrsvm(X_train, Y_train, 'KernelFunction', 'gaussian', 'BoxConstraint', param_values(i)); 204 | 205 | % Test seti üzerinde tahminler yapma 206 | Y_pred_test = predict(model, X_test); 207 | 208 | % Ortalama kare hata hesaplama 209 | mse_values(i) = mean((Y_test - Y_pred_test).^2); 210 | end 211 | 212 | % Çizgi grafiği ile performansın görselleştirilmesi 213 | figure; 214 | plot(param_values, mse_values, '-o', 'LineWidth', 2, 'MarkerSize', 8, 'MarkerEdgeColor', '#D95319', 'MarkerFaceColor', '#EDB120'); 215 | xlabel('BoxConstraint Değeri'); 216 | ylabel('Ortalama Kare Hata (MSE)'); 217 | title('BoxConstraint Değerine Göre Model Performansı'); 218 | saveas(gcf, 'figure19.png'); 219 | 220 | % Özellikler arası ilişkinin 3D gösterimi 221 | figure; 222 | scatter3(X(:, 1), X(:, 2), Y, 50, Y, 'filled'); 223 | colormap(jet); 224 | colorbar; 225 | xlabel('Deprem Büyüklüğü'); 226 | ylabel('Derinlik (km)'); 227 | zlabel('Deprem Büyüklüğü'); 228 | title('Özellikler Arası İlişkinin 3D Gösterimi'); 229 | saveas(gcf, 'figure20.png'); 230 | 231 | % Artık ve özellikler arasındaki korelasyon haritası 232 | figure; 233 | corr_matrix = corrcoef([X, residuals]); 234 | heatmap({'Deprem Büyüklüğü', 'Derinlik (km)', 'Artık'}, {'Deprem Büyüklüğü', 'Derinlik (km)', 'Artık'}, corr_matrix, ... 235 | 'Colormap', jet, 'ColorbarVisible', 'off', 'FontSize', 10, 'CellLabelColor', 'none'); 236 | title('Özellikler ve Artık Arasındaki Korelasyon'); 237 | saveas(gcf, 'figure21.png'); 238 | -------------------------------------------------------------------------------- /data/processed_data/earthquake_data.csv: -------------------------------------------------------------------------------- 1 | x_id,earthquake_id,provider,title,date,mag,depth,geojson,location_properties,rev,date_time,created_at,location_tz 2 | 65f9de47598490444155329f,DcmoBNDIPOZPx,kandilli,DISBUDAK-LAPSEKI (CANAKKALE),2024.03.19 21:36:40,2.8,7,,,,2024-03-19 21:36:40,1710880600,Europe/Istanbul 3 | 65f9d7f4598490444155329e,t8cnUhrKb_kHK,kandilli,CAKALLI-BELEN (HATAY),2024.03.19 21:14:44,1.9,6.8,,,,2024-03-19 21:14:44,1710879284,Europe/Istanbul 4 | 65f9cfeaecffce697c750690,e_Nd4rRwICyUi,kandilli,DEDEKOY-AKCADAG (MALATYA),2024.03.19 19:48:26,1.7,12.5,,,,2024-03-19 19:48:26,1710874106,Europe/Istanbul 5 | 65f9c268598490444155329b,yWz9tsBmSHs0w,kandilli,EGE DENIZI,2024.03.19 19:43:28,2.9,10.2,,,,2024-03-19 19:43:28,1710873808,Europe/Istanbul 6 | 65f9c198dd21bd74f05d822f,oxnRqeGpKvsdU,kandilli,KALEBOYNU-GOKSUN (KAHRAMANMARAS),2024.03.19 19:40:16,2.4,5,,,,2024-03-19 19:40:16,1710873616,Europe/Istanbul 7 | 65f9c139598490444155329a,_0lRyG7US1cQo,kandilli,CANAKLI-(HAKKARI),2024.03.19 19:31:29,3.4,5,,,,2024-03-19 19:31:29,1710873089,Europe/Istanbul 8 | 65f9cef5dd21bd74f05d8231,h9zdi2pZay6Vg,kandilli,ALTINHUSEYIN-PULUMUR (TUNCELI),2024.03.19 19:23:34,2.3,11.8,,,,2024-03-19 19:23:34,1710872614,Europe/Istanbul 9 | 65f9b25f86e26cb6ccc54f51,IckrM2fnibjjY,kandilli,HANCERLI-AKCADAG (MALATYA),2024.03.19 18:34:59,3.1,7.3,,,,2024-03-19 18:34:59,1710869699,Europe/Istanbul 10 | 65f9d2e1598490444155329d,9UQ6zhupq6ZIk,kandilli,SEYITUSAGI-YESILYURT (MALATYA),2024.03.19 18:08:40,1.6,0,,,,2024-03-19 18:08:40,1710868120,Europe/Istanbul 11 | 65f9d289598490444155329c,ACq2ZU01XaY9G,kandilli,SARIERIK-PAZARCIK (KAHRAMANMARAS),2024.03.19 17:54:30,1.2,8.9,,,,2024-03-19 17:54:30,1710867270,Europe/Istanbul 12 | 65f9cc9fdd21bd74f05d8230,1WFan3fF3HLAX,kandilli,INCECIK-ELBISTAN (KAHRAMANMARAS),2024.03.19 17:37:40,1.9,8.7,,,,2024-03-19 17:37:40,1710866260,Europe/Istanbul 13 | 65f99afc5984904441553299,DnYV7VuqjJOz8,kandilli,MENTESE-KAVAKLIDERE (MUGLA),2024.03.19 16:49:39,1.7,5,,,,2024-03-19 16:49:39,1710863379,Europe/Istanbul 14 | 65f99986dd21bd74f05d822e,wi7ZTjkfJyB1u,kandilli,ADAOREN-DURSUNBEY (BALIKESIR),2024.03.19 16:42:36,2.3,6.2,,,,2024-03-19 16:42:36,1710862956,Europe/Istanbul 15 | 65f994a0ecffce697c75068f,wuiDGXZFiRj2t,kandilli,KALEBOYNU-GOKSUN (KAHRAMANMARAS),2024.03.19 16:24:03,1.8,17.6,,,,2024-03-19 16:24:03,1710861843,Europe/Istanbul 16 | 65f989cf86e26cb6ccc54f50,vOam4SWZ0PKq9,kandilli,GEMLIK KORFEZI (MARMARA DENIZI),2024.03.19 15:24:06,1.4,11.3,,,,2024-03-19 15:24:06,1710858246,Europe/Istanbul 17 | 65f9937eecffce697c75068e,uFceaMRhpNc1y,kandilli,KUSADASI KORFEZI (EGE DENIZI),2024.03.19 15:02:16,1.4,9.8,,,,2024-03-19 15:02:16,1710856936,Europe/Istanbul 18 | 65f97c76ecffce697c75068d,KOqS0LAyl76s8,kandilli,AKCAKOY-KOSK (AYDIN),2024.03.19 14:42:53,1.3,16.1,,,,2024-03-19 14:42:53,1710855773,Europe/Istanbul 19 | 65f9892e5984904441553298,TFEXjQ_uJhs1x,kandilli,KABAAGACKIRAN-AKHISAR (MANISA),2024.03.19 14:28:25,1.3,12.8,,,,2024-03-19 14:28:25,1710854905,Europe/Istanbul 20 | 65f972a2dd21bd74f05d822d,L7EY2mGvqrEjQ,kandilli,ONIKI ADALAR (AKDENIZ),2024.03.19 13:35:31,2,5.3,,,,2024-03-19 13:35:31,1710851731,Europe/Istanbul 21 | 65f970bc86e26cb6ccc54f0d,eqZqjXGWBaPoM,kandilli,YENIKOY-TAVSANLI (KUTAHYA),2024.03.19 13:10:34,1.5,0,,,,2024-03-19 13:10:34,1710850234,Europe/Istanbul 22 | 65f970bc86e26cb6ccc54f0e,Kk8rEUtc6cA5H,kandilli,ELMALI-TAVSANLI (KUTAHYA),2024.03.19 13:06:27,1.5,11.6,,,,2024-03-19 13:06:27,1710849987,Europe/Istanbul 23 | 65f970bc86e26cb6ccc54f0f,FXNvPb8HhgQHn,kandilli,GUMUSGOLCUK-TAVSANLI (KUTAHYA),2024.03.19 13:01:16,1.8,0,,,,2024-03-19 13:01:16,1710849676,Europe/Istanbul 24 | 65f970bc86e26cb6ccc54f10,Whnd9lCIlNhg8,kandilli,CELTIKCI-ORHANGAZI (BURSA),2024.03.19 12:31:05,1.4,0,,,,2024-03-19 12:31:05,1710847865,Europe/Istanbul 25 | 65f970bc86e26cb6ccc54f11,UynJf_uTs3kky,kandilli,CAMKOY-MILAS (MUGLA),2024.03.19 12:28:25,1.5,0,,,,2024-03-19 12:28:25,1710847705,Europe/Istanbul 26 | 65f970bc86e26cb6ccc54f12,UU1pqwecWhttq,kandilli,CAMDERE-GOKSUN (KAHRAMANMARAS),2024.03.19 12:19:42,1.4,16.6,,,,2024-03-19 12:19:42,1710847182,Europe/Istanbul 27 | 65f970bc86e26cb6ccc54f13,zMy_IkhwS_wln,kandilli,YAVUZLAR-DARENDE (MALATYA),2024.03.19 12:14:00,1.8,14.5,,,,2024-03-19 12:14:00,1710846840,Europe/Istanbul 28 | 65f970bc86e26cb6ccc54f14,LsIPfTFdtxYUR,kandilli,CENNETPINARI-PAZARCIK (KAHRAMANMARAS),2024.03.19 11:22:11,1.7,7.3,,,,2024-03-19 11:22:11,1710843731,Europe/Istanbul 29 | 65f970bc86e26cb6ccc54f15,HtUOgUUl5p4VW,kandilli,IGCELER-KIZILCAHAMAM (ANKARA),2024.03.19 11:09:03,2.5,4.2,,,,2024-03-19 11:09:03,1710842943,Europe/Istanbul 30 | 65f970bc86e26cb6ccc54f16,_D8TMsh5zPY8i,kandilli,DUNDAR-ORHANELI (BURSA),2024.03.19 10:46:53,1.6,0,,,,2024-03-19 10:46:53,1710841613,Europe/Istanbul 31 | 65f970bc86e26cb6ccc54f17,UPg69mYZOpZRC,kandilli,KARAGOL-CELIKHAN (ADIYAMAN),2024.03.19 10:43:03,2.7,9.2,,,,2024-03-19 10:43:03,1710841383,Europe/Istanbul 32 | 65f970bc86e26cb6ccc54f18,v29HQgx66aH_F,kandilli,ASAGITIRTAR-YALVAC (ISPARTA),2024.03.19 10:29:17,2.3,6.5,,,,2024-03-19 10:29:17,1710840557,Europe/Istanbul 33 | 65f970bc86e26cb6ccc54f19,ofUclQfsClCOY,kandilli,EKINOZU (KAHRAMANMARAS),2024.03.19 10:07:36,2.2,5.4,,,,2024-03-19 10:07:36,1710839256,Europe/Istanbul 34 | 65f970bc86e26cb6ccc54f1a,5kuC4uk6p9Uuw,kandilli,HIRKATEPE-BEYPAZARI (ANKARA),2024.03.19 10:05:00,2.3,5,,,,2024-03-19 10:05:00,1710839100,Europe/Istanbul 35 | 65f970bc86e26cb6ccc54f1b,i3qEvT8CjsYKs,kandilli,EGNEZ-SOMA (MANISA),2024.03.19 10:02:29,2.1,0,,,,2024-03-19 10:02:29,1710838949,Europe/Istanbul 36 | 65f970bc86e26cb6ccc54f1c,Uzgh2rhTdkG5N,kandilli,CAMDERE-KOZAN (ADANA),2024.03.19 09:41:31,2.1,7.4,,,,2024-03-19 09:41:31,1710837691,Europe/Istanbul 37 | 65f970bc86e26cb6ccc54f1d,heMEKEODc2CkB,kandilli,KARAKOY-(BOLU),2024.03.19 09:40:35,1.7,6,,,,2024-03-19 09:40:35,1710837635,Europe/Istanbul 38 | 65f970bc86e26cb6ccc54f1e,_UQg9KKjPbnD9,kandilli,KUSADASI KORFEZI (EGE DENIZI),2024.03.19 09:12:47,1.4,10.5,,,,2024-03-19 09:12:47,1710835967,Europe/Istanbul 39 | 65f970bc86e26cb6ccc54f1f,BLogcbHFMXq74,kandilli,BELEN-EZINE (CANAKKALE),2024.03.19 08:53:36,1.6,13.1,,,,2024-03-19 08:53:36,1710834816,Europe/Istanbul 40 | 65f970bc86e26cb6ccc54f20,en1UWlB52sBiq,kandilli,SUGUL-DARENDE (MALATYA),2024.03.19 08:11:29,1.2,5.4,,,,2024-03-19 08:11:29,1710832289,Europe/Istanbul 41 | 65f970bc86e26cb6ccc54f21,70_FlWTNgJTGA,kandilli,BAGLICAY-GURUN (SIVAS),2024.03.19 07:54:06,2.7,2.7,,,,2024-03-19 07:54:06,1710831246,Europe/Istanbul 42 | 65f970bc86e26cb6ccc54f22,TNaV9CsDliT8a,kandilli,ORENDERESI-AFSIN (KAHRAMANMARAS),2024.03.19 07:44:17,1.3,5,,,,2024-03-19 07:44:17,1710830657,Europe/Istanbul 43 | 65f970bc86e26cb6ccc54f23,kBbwfqx8mR6JZ,kandilli,ADAOREN-DURSUNBEY (BALIKESIR),2024.03.19 07:43:28,3.8,5.4,,,,2024-03-19 07:43:28,1710830608,Europe/Istanbul 44 | 65f970bc86e26cb6ccc54f24,SkVcVOhkSEgPv,kandilli,KARAGOL-CELIKHAN (ADIYAMAN),2024.03.19 07:26:34,3.4,2.8,,,,2024-03-19 07:26:34,1710829594,Europe/Istanbul 45 | 65f970bc86e26cb6ccc54f25,LygCZDjHKk5Gr,kandilli,KOYCEGIZ (MUGLA),2024.03.19 07:14:55,1.4,6.7,,,,2024-03-19 07:14:55,1710828895,Europe/Istanbul 46 | 65f970bc86e26cb6ccc54f26,389M0O_7q9Do9,kandilli,DURULDU-(MALATYA),2024.03.19 07:03:51,3.2,5.6,,,,2024-03-19 07:03:51,1710828231,Europe/Istanbul 47 | 65f970bc86e26cb6ccc54f27,NjMULPLl0zax0,kandilli,GUMUSDOVEN-ELBISTAN (KAHRAMANMARAS),2024.03.19 06:53:24,1.8,4.1,,,,2024-03-19 06:53:24,1710827604,Europe/Istanbul 48 | 65f970bc86e26cb6ccc54f28,aDD5YM6vV2_dQ,kandilli,OZCANLI-ELBISTAN (KAHRAMANMARAS),2024.03.19 06:52:54,1.8,15.6,,,,2024-03-19 06:52:54,1710827574,Europe/Istanbul 49 | 65f970bc86e26cb6ccc54f29,xoAVhWeqOP1Uk,kandilli,ARMUTALAN-ELBISTAN (KAHRAMANMARAS),2024.03.19 06:09:03,1.4,22.2,,,,2024-03-19 06:09:03,1710824943,Europe/Istanbul 50 | 65f970bc86e26cb6ccc54f2a,wxn907WUNSuW_,kandilli,KARACA-MARMARIS (MUGLA),2024.03.19 05:52:13,0.9,4.1,,,,2024-03-19 05:52:13,1710823933,Europe/Istanbul 51 | 65f970bc86e26cb6ccc54f2b,HjkIAX5Y8YOuN,kandilli,KUMYAKA-MUDANYA (BURSA),2024.03.19 05:47:17,0.8,7.4,,,REVIZE01 (2024.03.19 05:47:17),2024-03-19 05:47:17,1710823637,Europe/Istanbul 52 | 65f970bc86e26cb6ccc54f2c,Y0Ky5mQqiFYbI,kandilli,CICEKLI-ANDIRIN (KAHRAMANMARAS),2024.03.19 05:20:08,1.4,5.4,,,,2024-03-19 05:20:08,1710822008,Europe/Istanbul 53 | 65f970bc86e26cb6ccc54f2d,6hNmKGFTp3mj0,kandilli,KURUDERE-DARENDE (MALATYA),2024.03.19 04:57:54,1.3,8.1,,,,2024-03-19 04:57:54,1710820674,Europe/Istanbul 54 | 65f970bc86e26cb6ccc54f2e,zCtesPnemWuPB,kandilli,KUCUKHACIBEY-ELDIVAN (CANKIRI),2024.03.19 04:56:22,1.8,17.5,,,,2024-03-19 04:56:22,1710820582,Europe/Istanbul 55 | 65f970bc86e26cb6ccc54f2f,A_y6pAuRhiv3e,kandilli,KIRLANGIC-YESILYURT (MALATYA),2024.03.19 04:52:50,1.2,22.6,,,,2024-03-19 04:52:50,1710820370,Europe/Istanbul 56 | 65f970bc86e26cb6ccc54f30,WP6DYmBNO4yVf,kandilli,BAHTILLI-SIMAV (KUTAHYA),2024.03.19 04:25:23,0.7,4.8,,,,2024-03-19 04:25:23,1710818723,Europe/Istanbul 57 | 65f970bc86e26cb6ccc54f31,h_KhuOPOR3oC1,kandilli,GUMUSDOVEN-ELBISTAN (KAHRAMANMARAS),2024.03.19 04:19:59,1.4,6,,,,2024-03-19 04:19:59,1710818399,Europe/Istanbul 58 | 65f970bc86e26cb6ccc54f32,VvUr1xQPYFL2J,kandilli,AKBAYIR-ELBISTAN (KAHRAMANMARAS),2024.03.19 04:15:13,2,10.3,,,,2024-03-19 04:15:13,1710818113,Europe/Istanbul 59 | 65f970bc86e26cb6ccc54f33,qswMJXTi6pGYW,kandilli,DURASIL-AKHISAR (MANISA),2024.03.19 04:03:12,1.8,7.7,,,,2024-03-19 04:03:12,1710817392,Europe/Istanbul 60 | 65f970bc86e26cb6ccc54f34,HheAmlodqm2Jq,kandilli,DURASIL-AKHISAR (MANISA),2024.03.19 03:51:32,2.7,7.5,,,,2024-03-19 03:51:32,1710816692,Europe/Istanbul 61 | 65f970bc86e26cb6ccc54f35,ZTfYhQnzGYmpD,kandilli,KOZLU-(BOLU),2024.03.19 03:36:54,1.7,4.2,,,,2024-03-19 03:36:54,1710815814,Europe/Istanbul 62 | 65f970bc86e26cb6ccc54f36,OaXmfj4x9gv6n,kandilli,AVCILAR ACIKLARI-ISTANBUL (MARMARA DENIZI),2024.03.19 03:34:14,1.4,12.2,,,,2024-03-19 03:34:14,1710815654,Europe/Istanbul 63 | 65f970bc86e26cb6ccc54f37,yVF0ouspwnqJ3,kandilli,YALINTAS-ELBISTAN (KAHRAMANMARAS),2024.03.19 02:15:27,1.7,7.9,,,,2024-03-19 02:15:27,1710810927,Europe/Istanbul 64 | 65f970bc86e26cb6ccc54f38,8oneFgIIZYS_L,kandilli,YEDIOLUK-SARIZ (KAYSERI),2024.03.19 01:56:48,1.4,13.1,,,,2024-03-19 01:56:48,1710809808,Europe/Istanbul 65 | 65f970bc86e26cb6ccc54f39,gl0Kim7TsHNqH,kandilli,FINDIKLIKOYAK-GOKSUN (KAHRAMANMARAS),2024.03.19 01:47:10,1.2,10.7,,,,2024-03-19 01:47:10,1710809230,Europe/Istanbul 66 | 65f970bc86e26cb6ccc54f3a,UNa9bpTIoHftu,kandilli,BASMEZRA-PUTURGE (MALATYA),2024.03.19 00:25:03,1.3,4.2,,,,2024-03-19 00:25:03,1710804303,Europe/Istanbul 67 | 65f970bc86e26cb6ccc54f3b,gCTUOEfdRRlkM,kandilli,CUMAALANI-CAMELI (DENIZLI),2024.03.18 23:47:24,1.3,2,,,,2024-03-18 23:47:24,1710802044,Europe/Istanbul 68 | 65f970bc86e26cb6ccc54f3c,txZq31Z1rtz8r,kandilli,GEMLIK KORFEZI (MARMARA DENIZI),2024.03.18 22:44:45,1.5,5.4,,,,2024-03-18 22:44:45,1710798285,Europe/Istanbul 69 | 65f970bc86e26cb6ccc54f3d,ckmkCWKS7wcZI,kandilli,KUMYAKA-MUDANYA (BURSA),2024.03.18 22:27:19,2.3,10.2,,,,2024-03-18 22:27:19,1710797239,Europe/Istanbul 70 | 65f970bc86e26cb6ccc54f3e,b8ZQdFDcE_sV7,kandilli,SALKONAK-YESILYURT (MALATYA),2024.03.18 22:20:34,1.4,7.4,,,,2024-03-18 22:20:34,1710796834,Europe/Istanbul 71 | 65f970bc86e26cb6ccc54f3f,NCEUO1lohmJmK,kandilli,ALTINHUSEYIN-PULUMUR (TUNCELI),2024.03.18 22:14:18,2.1,9.9,,,,2024-03-18 22:14:18,1710796458,Europe/Istanbul 72 | -------------------------------------------------------------------------------- /data/processed_data/tr.csv: -------------------------------------------------------------------------------- 1 | city,lat,lng,country,iso2,admin_name,capital,population,population_proper 2 | Istanbul,41.0136,28.9550,Turkey,TR,İstanbul,admin,16079000,15519267 3 | Ankara,39.9300,32.8500,Turkey,TR,Ankara,primary,5503985,5503985 4 | İzmir,38.4200,27.1400,Turkey,TR,İzmir,admin,4320519,4320519 5 | Bursa,40.1833,29.0500,Turkey,TR,Bursa,admin,2901396,2901396 6 | Antalya,36.8874,30.7075,Turkey,TR,Antalya,admin,2426356,2426356 7 | Konya,37.8667,32.4833,Turkey,TR,Konya,admin,2232374,2232374 8 | Gaziantep,37.0628,37.3792,Turkey,TR,Gaziantep,admin,2028563,2028563 9 | Şanlıurfa,37.1583,38.7917,Turkey,TR,Şanlıurfa,admin,1985753,1985753 10 | Mersin,36.8000,34.6333,Turkey,TR,Mersin,admin,1814468,1814468 11 | Adana,37.0000,35.3213,Turkey,TR,Adana,admin,1765981,1765981 12 | Diyarbakır,37.9100,40.2400,Turkey,TR,Diyarbakır,admin,1732396,1732396 13 | Kayseri,38.7225,35.4875,Turkey,TR,Kayseri,admin,1389680,1389680 14 | Samsun,41.2903,36.3336,Turkey,TR,Samsun,admin,1335716,1335716 15 | Akçaabat,41.0167,39.5500,Turkey,TR,Trabzon,minor,1215351,123552 16 | Denizli,37.7667,29.0833,Turkey,TR,Denizli,admin,1027782,1027782 17 | Çankaya,39.9244,32.8856,Turkey,TR,Ankara,minor,914501,914501 18 | Esenyurt,41.0470,28.6580,Turkey,TR,İstanbul,,891120,891120 19 | Eskişehir,39.7767,30.5206,Turkey,TR,Eskişehir,admin,871187,871187 20 | Seyhan,36.9831,35.3328,Turkey,TR,Adana,minor,792536,792536 21 | Küçükçekmece,41.0000,28.8000,Turkey,TR,İstanbul,minor,770317,770317 22 | Erzurum,39.9086,41.2769,Turkey,TR,Erzurum,admin,767848,767848 23 | Bağcılar,41.0344,28.8564,Turkey,TR,İstanbul,,734369,734369 24 | Pendik,40.8747,29.2350,Turkey,TR,İstanbul,minor,693599,693599 25 | Selçuklu,37.8814,32.4922,Turkey,TR,Konya,minor,648850,648850 26 | Yıldırım,40.1100,29.0821,Turkey,TR,Bursa,minor,643681,643681 27 | Kartal,40.8872,29.1900,Turkey,TR,İstanbul,minor,461155,461155 28 | Batman,37.8870,41.1320,Turkey,TR,Batman,admin,447106,447106 29 | Esenler,41.0339,28.8903,Turkey,TR,İstanbul,,444561,444561 30 | Kahramanmaraş,37.5833,36.9333,Turkey,TR,Kahramanmaraş,admin,443575,443575 31 | Kâğıthane,41.0719,28.9664,Turkey,TR,İstanbul,,437026,437026 32 | Avcılar,40.9792,28.7214,Turkey,TR,İstanbul,,435625,435625 33 | Trabzon,41.0050,39.7225,Turkey,TR,Trabzon,admin,426882,426882 34 | Malatya,38.3486,38.3194,Turkey,TR,Malatya,admin,426381,426381 35 | Elazığ,38.6744,39.2228,Turkey,TR,Elazığ,admin,421726,421726 36 | Yüreğir,36.9981,35.3439,Turkey,TR,Adana,minor,407054,407054 37 | Hatay,36.2025,36.1606,Turkey,TR,Hatay,admin,377793,377793 38 | Sivas,39.7500,37.0167,Turkey,TR,Sivas,admin,377561,377561 39 | Gebze,40.8000,29.4333,Turkey,TR,Kocaeli,minor,371000,371000 40 | Kocaeli,40.7625,29.9175,Turkey,TR,Kocaeli,admin,363416,363416 41 | Kayapınar,37.9400,40.1900,Turkey,TR,Diyarbakır,minor,362407,362407 42 | Manisa,38.6306,27.4222,Turkey,TR,Manisa,admin,356702,356702 43 | Konak,38.4189,27.1285,Turkey,TR,İzmir,minor,356563,356563 44 | Van,38.4942,43.3800,Turkey,TR,Van,admin,353419,353419 45 | Pamukkale,37.9167,29.1167,Turkey,TR,Denizli,,346625,346625 46 | Sarıyer,41.1669,29.0572,Turkey,TR,İstanbul,minor,342503,342503 47 | Meram,37.8364,32.4383,Turkey,TR,Konya,minor,342315,342315 48 | Tarsus,36.9165,34.8951,Turkey,TR,Mersin,minor,339676,339676 49 | Balıkesir,39.6333,27.8833,Turkey,TR,Balıkesir,admin,331788,331788 50 | Beylikdüzü,41.0011,28.6419,Turkey,TR,İstanbul,,331525,331525 51 | Sultanbeyli,40.9683,29.2617,Turkey,TR,İstanbul,,327798,327798 52 | Aksaray,38.3742,34.0289,Turkey,TR,Aksaray,admin,319865,319865 53 | Alanya,36.5500,32.0000,Turkey,TR,Antalya,minor,312319,312319 54 | Yeşilyurt,38.2961,38.2489,Turkey,TR,Malatya,minor,304839,304839 55 | Adıyaman,37.7639,38.2778,Turkey,TR,Adıyaman,admin,304615,304615 56 | Afyonkarahisar,38.7578,30.5386,Turkey,TR,Afyonkarahisar,admin,299673,299673 57 | İskenderun,36.5817,36.1650,Turkey,TR,Hatay,minor,297943,297943 58 | Battalgazi,38.4228,38.3656,Turkey,TR,Malatya,minor,295821,295821 59 | Çorum,40.5455,34.9570,Turkey,TR,Çorum,admin,294807,294807 60 | Güngören,41.0225,28.8717,Turkey,TR,İstanbul,,289331,289331 61 | Çorlu,41.1500,27.8000,Turkey,TR,Tekirdağ,minor,279251,279251 62 | Sakarya,40.7833,30.4000,Turkey,TR,Sakarya,admin,271515,271515 63 | Arnavutköy,41.1856,28.7406,Turkey,TR,İstanbul,,270549,270549 64 | İnegöl,40.0806,29.5097,Turkey,TR,Bursa,minor,268155,268155 65 | Kütahya,39.4167,29.9833,Turkey,TR,Kütahya,admin,266784,266784 66 | Osmaniye,37.0750,36.2500,Turkey,TR,Osmaniye,admin,264373,264373 67 | Isparta,37.7647,30.5567,Turkey,TR,Isparta,admin,258375,258375 68 | Siverek,37.7500,39.3167,Turkey,TR,Şanlıurfa,minor,258265,258265 69 | Tuzla,40.8161,29.3006,Turkey,TR,İstanbul,,255468,255468 70 | Kızıltepe,37.1939,40.5861,Turkey,TR,Mardin,minor,252656,252656 71 | Uşak,38.6778,29.4042,Turkey,TR,Uşak,admin,252044,252044 72 | Çekme,41.0369,29.1786,Turkey,TR,İstanbul,,251937,251937 73 | Büyükçekmece,41.0200,28.5775,Turkey,TR,İstanbul,minor,247736,247736 74 | Beykoz,41.1342,29.0922,Turkey,TR,İstanbul,minor,246700,246700 75 | Düzce,40.8417,31.1583,Turkey,TR,Düzce,admin,240633,240633 76 | Manavgat,36.7833,31.4333,Turkey,TR,Antalya,minor,230597,230597 77 | Ordu,40.9833,37.8833,Turkey,TR,Ordu,admin,229214,155117 78 | Bolu,40.7347,31.6075,Turkey,TR,Bolu,admin,205525,205525 79 | Tekirdağ,40.9778,27.5153,Turkey,TR,Tekirdağ,admin,204001,204001 80 | Tokat,40.3139,36.5542,Turkey,TR,Tokat,admin,201294,201294 81 | Viranşehir,37.2306,39.7653,Turkey,TR,Şanlıurfa,minor,195910,195910 82 | Karaköprü,37.1847,38.7908,Turkey,TR,Şanlıurfa,minor,195552,195552 83 | Karaman,37.1819,33.2181,Turkey,TR,Karaman,admin,194018,194018 84 | Muş,38.7333,41.4911,Turkey,TR,Muş,admin,193394,193394 85 | Kırıkkale,39.8417,33.5139,Turkey,TR,Kırıkkale,admin,193093,192473 86 | Aydın,37.8481,27.8453,Turkey,TR,Aydın,admin,191037,191037 87 | Çanakkale,40.1519,26.4056,Turkey,TR,Çanakkale,admin,180823,180823 88 | Edirne,41.6769,26.5556,Turkey,TR,Edirne,admin,180327,180327 89 | Torbalı,38.1619,27.3583,Turkey,TR,İzmir,minor,178772,178772 90 | Ereğli,41.2792,31.4208,Turkey,TR,Zonguldak,minor,175605,175605 91 | Bodrum,37.0378,27.4242,Turkey,TR,Muğla,minor,175000,175000 92 | Menemen,38.6000,27.0667,Turkey,TR,İzmir,minor,174564,174564 93 | Akhisar,38.9167,27.8333,Turkey,TR,Manisa,minor,173026,173026 94 | Çerkezköy,41.2833,28.0000,Turkey,TR,Tekirdağ,minor,166789,166789 95 | Siirt,37.9250,41.9458,Turkey,TR,Siirt,admin,166332,166332 96 | Körfez,40.7833,29.7333,Turkey,TR,Kocaeli,minor,165503,165503 97 | Talas,38.6833,35.5667,Turkey,TR,Kayseri,minor,165127,165127 98 | Turgutlu,38.5000,27.7000,Turkey,TR,Manisa,minor,163223,163223 99 | Gölcük,40.6667,29.8333,Turkey,TR,Kocaeli,minor,162584,162584 100 | Salihli,38.4811,28.1392,Turkey,TR,Manisa,minor,161562,161562 101 | Ceyhan,37.0289,35.8125,Turkey,TR,Adana,minor,160474,160474 102 | Bingöl,38.8861,40.5017,Turkey,TR,Bingöl,admin,160165,160165 103 | Fethiye,36.6514,29.1231,Turkey,TR,Muğla,minor,157745,157745 104 | Erzincan,39.7464,39.4914,Turkey,TR,Erzincan,admin,157452,157452 105 | Nazilli,37.9125,28.3206,Turkey,TR,Aydın,minor,156748,156748 106 | Bartın,41.6344,32.3375,Turkey,TR,Bartın,admin,155016,155016 107 | Edremit,39.5922,27.0200,Turkey,TR,Balıkesir,minor,154487,154487 108 | Bandırma,40.3500,27.9667,Turkey,TR,Balıkesir,minor,154359,154359 109 | Kırşehir,39.1456,34.1608,Turkey,TR,Kırşehir,admin,153511,153511 110 | Nevşehir,38.6264,34.7139,Turkey,TR,Nevşehir,admin,153117,153117 111 | Ağrı,39.7186,43.0508,Turkey,TR,Ağrı,admin,149188,149188 112 | Amasya,40.6500,35.8331,Turkey,TR,Amasya,admin,149084,149084 113 | Kastamonu,41.3764,33.7764,Turkey,TR,Kastamonu,admin,148931,148931 114 | Lüleburgaz,41.4056,27.3569,Turkey,TR,Kırklareli,minor,148037,148037 115 | Ereğli,37.5167,34.0500,Turkey,TR,Konya,minor,145389,145389 116 | Yalova,40.6556,29.2750,Turkey,TR,Yalova,admin,144407,144407 117 | Cizre,37.3320,42.1870,Turkey,TR,Şırnak,minor,143124,143124 118 | Elbistan,38.2014,37.1883,Turkey,TR,Kahramanmaraş,minor,143000,143000 119 | Nizip,37.0100,37.7972,Turkey,TR,Gaziantep,minor,142389,142389 120 | Rize,41.0247,40.5222,Turkey,TR,Rize,admin,141143,141143 121 | Çarşamba,41.1992,36.7275,Turkey,TR,Samsun,minor,138840,138840 122 | Silivri,41.0736,28.2478,Turkey,TR,İstanbul,minor,137861,137861 123 | Iğdır,39.9208,44.0444,Turkey,TR,Iğdır,admin,137613,137613 124 | Giresun,40.9153,38.3894,Turkey,TR,Giresun,admin,135920,135920 125 | Silopi,37.2486,42.4703,Turkey,TR,Şırnak,minor,134754,134754 126 | Ödemiş,38.2311,27.9719,Turkey,TR,İzmir,minor,132511,132511 127 | Karabük,41.1986,32.6264,Turkey,TR,Karabük,admin,131989,131989 128 | Kozan,37.4500,35.8000,Turkey,TR,Adana,minor,130495,130495 129 | Ergani,38.2692,39.7617,Turkey,TR,Diyarbakır,minor,130105,130105 130 | Çayırova,40.8265,29.3745,Turkey,TR,Kocaeli,minor,129655,129655 131 | Ünye,41.1333,37.2833,Turkey,TR,Ordu,minor,126702,126702 132 | Polatlı,39.5842,32.1472,Turkey,TR,Ankara,minor,125075,125075 133 | Serik,36.9167,31.1000,Turkey,TR,Antalya,minor,124335,124335 134 | Kadirli,37.3697,36.1000,Turkey,TR,Osmaniye,minor,124053,124053 135 | Patnos,39.2358,42.8686,Turkey,TR,Ağrı,minor,122833,122833 136 | Kâhta,37.7803,38.6217,Turkey,TR,Adıyaman,minor,122774,122774 137 | Doğubayazıt,39.5472,44.0833,Turkey,TR,Ağrı,minor,121263,121263 138 | Samandağ,36.0850,35.9806,Turkey,TR,Hatay,minor,121109,121109 139 | Zonguldak,41.4564,31.7986,Turkey,TR,Zonguldak,admin,120395,120395 140 | Söke,37.7508,27.4103,Turkey,TR,Aydın,minor,120217,120217 141 | Yüksekova,37.5690,44.2830,Turkey,TR,Hakkâri,minor,119760,119760 142 | Silifke,36.3761,33.9322,Turkey,TR,Mersin,minor,119303,119303 143 | Niğde,37.9667,34.6792,Turkey,TR,Niğde,admin,118186,118186 144 | Karatepe,40.7333,29.9667,Turkey,TR,Kocaeli,,118066,118066 145 | Kapaklı,41.3333,27.9667,Turkey,TR,Tekirdağ,minor,116882,116882 146 | Fatsa,41.0333,37.5000,Turkey,TR,Ordu,minor,116154,116154 147 | Kilis,36.7167,37.1167,Turkey,TR,Kilis,admin,116034,116034 148 | Kars,40.6078,43.0958,Turkey,TR,Kars,admin,115891,115891 149 | Kuşadası,37.8597,27.2597,Turkey,TR,İzmir,minor,113580,113580 150 | Midyat,37.4167,41.3697,Turkey,TR,Mardin,minor,113367,113367 151 | Akçakale,36.7108,38.9478,Turkey,TR,Şanlıurfa,minor,113194,113194 152 | Burdur,37.7194,30.2833,Turkey,TR,Burdur,admin,113077,113077 153 | Soma,39.1883,27.6089,Turkey,TR,Manisa,minor,108981,108981 154 | Kemalpaşa,38.4278,27.4161,Turkey,TR,İzmir,minor,106298,106298 155 | Nusaybin,37.0750,41.2153,Turkey,TR,Mardin,minor,105856,105856 156 | Yozgat,39.8208,34.8083,Turkey,TR,Yozgat,admin,105167,105167 157 | Alaşehir,38.3500,28.5167,Turkey,TR,Manisa,minor,105145,105145 158 | Suruç,36.9764,38.4269,Turkey,TR,Şanlıurfa,minor,104302,104302 159 | Bergama,39.1167,27.1833,Turkey,TR,İzmir,minor,103185,103185 160 | Tavşanlı,39.5333,29.4833,Turkey,TR,Kütahya,minor,101903,101903 161 | Çankırı,40.5986,33.6192,Turkey,TR,Çankırı,admin,96025,96025 162 | Şırnak,37.5200,42.4590,Turkey,TR,Şırnak,admin,93431,93431 163 | Mardin,37.3131,40.7350,Turkey,TR,Mardin,admin,86948,86948 164 | Bilecik,40.1431,29.9792,Turkey,TR,Bilecik,admin,81723,81723 165 | Hakkari,37.5770,43.7390,Turkey,TR,Hakkâri,admin,81424,81424 166 | Bitlis,38.4000,42.1083,Turkey,TR,Bitlis,admin,71501,71501 167 | Bayburt,40.2597,40.2278,Turkey,TR,Bayburt,admin,66633,66633 168 | Kırklareli,41.7347,27.2253,Turkey,TR,Kırklareli,admin,61880,61880 169 | Gümüşhane,40.4597,39.4778,Turkey,TR,Gümüşhane,admin,57269,57269 170 | Muğla,37.2167,28.3667,Turkey,TR,Muğla,admin,56619,56619 171 | Ardahan,41.1111,42.7022,Turkey,TR,Ardahan,admin,42226,42226 172 | Tunceli,39.1064,39.5472,Turkey,TR,Tunceli,admin,38504,38504 173 | Artvin,41.1833,41.8181,Turkey,TR,Artvin,admin,35081,35081 174 | Yumurtalık,36.7678,35.7922,Turkey,TR,Adana,minor,18587,18587 175 | Sinop,42.0267,35.1511,Turkey,TR,Sinop,admin,13354,218.408 176 | Yenice,36.9667,35.0500,Turkey,TR,Mersin,minor,8689,8689 177 | Adalar,40.8578,29.1200,Turkey,TR,İstanbul,minor,7499,7499 178 | Çağlayan,40.9000,39.7167,Turkey,TR,Trabzon,minor,4520,4520 179 | Mahmutbey,41.0536,28.8256,Turkey,TR,İstanbul,minor,, 180 | Etimesgut,39.9458,32.6694,Turkey,TR,Ankara,minor,, 181 | Samandıra,40.9990,29.2257,Turkey,TR,İstanbul,minor,, 182 | Keçiören,40.0000,32.8667,Turkey,TR,Ankara,minor,, 183 | Pursaklar,40.0320,32.8953,Turkey,TR,Ankara,minor,, 184 | Melikgazi,38.7500,35.4500,Turkey,TR,Kayseri,minor,, 185 | Altındağ,39.9636,32.9033,Turkey,TR,Ankara,minor,, 186 | Buca,38.3500,27.1667,Turkey,TR,İzmir,minor,, 187 | Gaziemir,38.3214,27.1275,Turkey,TR,İzmir,minor,, 188 | Karşıyaka,38.4596,27.1152,Turkey,TR,İzmir,minor,, 189 | Kemerburgaz,41.1617,28.9206,Turkey,TR,İstanbul,minor,, 190 | Mamak,39.9422,32.9231,Turkey,TR,Ankara,minor,, 191 | Bornova,38.4697,27.2211,Turkey,TR,İzmir,minor,, 192 | Burç,37.0136,37.1791,Turkey,TR,Gaziantep,minor,, 193 | Sincan,39.9594,32.5767,Turkey,TR,Ankara,minor,, 194 | Kazanlı,36.8156,34.7576,Turkey,TR,Mersin,minor,, 195 | Yenimahalle,39.9719,32.8119,Turkey,TR,Ankara,minor,, 196 | Hadımköy,41.1559,28.6177,Turkey,TR,İstanbul,minor,, 197 | Mahmut Şevket Paşa,41.1528,29.1897,Turkey,TR,İstanbul,minor,, 198 | Değirmendere,40.7200,29.7808,Turkey,TR,Kocaeli,minor,, 199 | Yolboyu,37.8976,40.0009,Turkey,TR,Diyarbakır,minor,, 200 | Bağlar,37.8333,40.0000,Turkey,TR,Diyarbakır,minor,, 201 | Yenişehir,37.9415,40.1380,Turkey,TR,Diyarbakır,minor,, 202 | Erenler,40.7550,30.3934,Turkey,TR,Sakarya,minor,, 203 | Kazımpaşa,40.7916,30.2950,Turkey,TR,Sakarya,minor,, 204 | Serdivan,40.7738,30.3801,Turkey,TR,Sakarya,minor,, 205 | Darıca,40.7797,29.3945,Turkey,TR,Kocaeli,minor,, 206 | -------------------------------------------------------------------------------- /data/raw_data/cleaned_data.csv: -------------------------------------------------------------------------------- 1 | x_id,earthquake_id,provider,title,mag,depth,geojson,location_properties,rev,date_time,created_at,location_tz 2 | 65f9de47598490444155329f,DcmoBNDIPOZPx,kandilli,DISBUDAK-LAPSEKI (CANAKKALE),2.8,7.0,,,,2024-03-19 21:36:40,1710880600,Europe/Istanbul 3 | 65f9d7f4598490444155329e,t8cnUhrKb_kHK,kandilli,CAKALLI-BELEN (HATAY),1.9,6.8,,,,2024-03-19 21:14:44,1710879284,Europe/Istanbul 4 | 65f9cfeaecffce697c750690,e_Nd4rRwICyUi,kandilli,DEDEKOY-AKCADAG (MALATYA),1.7,12.5,,,,2024-03-19 19:48:26,1710874106,Europe/Istanbul 5 | 65f9c268598490444155329b,yWz9tsBmSHs0w,kandilli,EGE DENIZI,2.9,10.2,,,,2024-03-19 19:43:28,1710873808,Europe/Istanbul 6 | 65f9c198dd21bd74f05d822f,oxnRqeGpKvsdU,kandilli,KALEBOYNU-GOKSUN (KAHRAMANMARAS),2.4,5.0,,,,2024-03-19 19:40:16,1710873616,Europe/Istanbul 7 | 65f9c139598490444155329a,_0lRyG7US1cQo,kandilli,CANAKLI-(HAKKARI),3.4,5.0,,,,2024-03-19 19:31:29,1710873089,Europe/Istanbul 8 | 65f9cef5dd21bd74f05d8231,h9zdi2pZay6Vg,kandilli,ALTINHUSEYIN-PULUMUR (TUNCELI),2.3,11.8,,,,2024-03-19 19:23:34,1710872614,Europe/Istanbul 9 | 65f9b25f86e26cb6ccc54f51,IckrM2fnibjjY,kandilli,HANCERLI-AKCADAG (MALATYA),3.1,7.3,,,,2024-03-19 18:34:59,1710869699,Europe/Istanbul 10 | 65f9d2e1598490444155329d,9UQ6zhupq6ZIk,kandilli,SEYITUSAGI-YESILYURT (MALATYA),1.6,0.0,,,,2024-03-19 18:08:40,1710868120,Europe/Istanbul 11 | 65f9d289598490444155329c,ACq2ZU01XaY9G,kandilli,SARIERIK-PAZARCIK (KAHRAMANMARAS),1.2,8.9,,,,2024-03-19 17:54:30,1710867270,Europe/Istanbul 12 | 65f9cc9fdd21bd74f05d8230,1WFan3fF3HLAX,kandilli,INCECIK-ELBISTAN (KAHRAMANMARAS),1.9,8.7,,,,2024-03-19 17:37:40,1710866260,Europe/Istanbul 13 | 65f99afc5984904441553299,DnYV7VuqjJOz8,kandilli,MENTESE-KAVAKLIDERE (MUGLA),1.7,5.0,,,,2024-03-19 16:49:39,1710863379,Europe/Istanbul 14 | 65f99986dd21bd74f05d822e,wi7ZTjkfJyB1u,kandilli,ADAOREN-DURSUNBEY (BALIKESIR),2.3,6.2,,,,2024-03-19 16:42:36,1710862956,Europe/Istanbul 15 | 65f994a0ecffce697c75068f,wuiDGXZFiRj2t,kandilli,KALEBOYNU-GOKSUN (KAHRAMANMARAS),1.8,17.6,,,,2024-03-19 16:24:03,1710861843,Europe/Istanbul 16 | 65f989cf86e26cb6ccc54f50,vOam4SWZ0PKq9,kandilli,GEMLIK KORFEZI (MARMARA DENIZI),1.4,11.3,,,,2024-03-19 15:24:06,1710858246,Europe/Istanbul 17 | 65f9937eecffce697c75068e,uFceaMRhpNc1y,kandilli,KUSADASI KORFEZI (EGE DENIZI),1.4,9.8,,,,2024-03-19 15:02:16,1710856936,Europe/Istanbul 18 | 65f97c76ecffce697c75068d,KOqS0LAyl76s8,kandilli,AKCAKOY-KOSK (AYDIN),1.3,16.1,,,,2024-03-19 14:42:53,1710855773,Europe/Istanbul 19 | 65f9892e5984904441553298,TFEXjQ_uJhs1x,kandilli,KABAAGACKIRAN-AKHISAR (MANISA),1.3,12.8,,,,2024-03-19 14:28:25,1710854905,Europe/Istanbul 20 | 65f972a2dd21bd74f05d822d,L7EY2mGvqrEjQ,kandilli,ONIKI ADALAR (AKDENIZ),2.0,5.3,,,,2024-03-19 13:35:31,1710851731,Europe/Istanbul 21 | 65f970bc86e26cb6ccc54f0d,eqZqjXGWBaPoM,kandilli,YENIKOY-TAVSANLI (KUTAHYA),1.5,0.0,,,,2024-03-19 13:10:34,1710850234,Europe/Istanbul 22 | 65f970bc86e26cb6ccc54f0e,Kk8rEUtc6cA5H,kandilli,ELMALI-TAVSANLI (KUTAHYA),1.5,11.6,,,,2024-03-19 13:06:27,1710849987,Europe/Istanbul 23 | 65f970bc86e26cb6ccc54f0f,FXNvPb8HhgQHn,kandilli,GUMUSGOLCUK-TAVSANLI (KUTAHYA),1.8,0.0,,,,2024-03-19 13:01:16,1710849676,Europe/Istanbul 24 | 65f970bc86e26cb6ccc54f10,Whnd9lCIlNhg8,kandilli,CELTIKCI-ORHANGAZI (BURSA),1.4,0.0,,,,2024-03-19 12:31:05,1710847865,Europe/Istanbul 25 | 65f970bc86e26cb6ccc54f11,UynJf_uTs3kky,kandilli,CAMKOY-MILAS (MUGLA),1.5,0.0,,,,2024-03-19 12:28:25,1710847705,Europe/Istanbul 26 | 65f970bc86e26cb6ccc54f12,UU1pqwecWhttq,kandilli,CAMDERE-GOKSUN (KAHRAMANMARAS),1.4,16.6,,,,2024-03-19 12:19:42,1710847182,Europe/Istanbul 27 | 65f970bc86e26cb6ccc54f13,zMy_IkhwS_wln,kandilli,YAVUZLAR-DARENDE (MALATYA),1.8,14.5,,,,2024-03-19 12:14:00,1710846840,Europe/Istanbul 28 | 65f970bc86e26cb6ccc54f14,LsIPfTFdtxYUR,kandilli,CENNETPINARI-PAZARCIK (KAHRAMANMARAS),1.7,7.3,,,,2024-03-19 11:22:11,1710843731,Europe/Istanbul 29 | 65f970bc86e26cb6ccc54f15,HtUOgUUl5p4VW,kandilli,IGCELER-KIZILCAHAMAM (ANKARA),2.5,4.2,,,,2024-03-19 11:09:03,1710842943,Europe/Istanbul 30 | 65f970bc86e26cb6ccc54f16,_D8TMsh5zPY8i,kandilli,DUNDAR-ORHANELI (BURSA),1.6,0.0,,,,2024-03-19 10:46:53,1710841613,Europe/Istanbul 31 | 65f970bc86e26cb6ccc54f17,UPg69mYZOpZRC,kandilli,KARAGOL-CELIKHAN (ADIYAMAN),2.7,9.2,,,,2024-03-19 10:43:03,1710841383,Europe/Istanbul 32 | 65f970bc86e26cb6ccc54f18,v29HQgx66aH_F,kandilli,ASAGITIRTAR-YALVAC (ISPARTA),2.3,6.5,,,,2024-03-19 10:29:17,1710840557,Europe/Istanbul 33 | 65f970bc86e26cb6ccc54f19,ofUclQfsClCOY,kandilli,EKINOZU (KAHRAMANMARAS),2.2,5.4,,,,2024-03-19 10:07:36,1710839256,Europe/Istanbul 34 | 65f970bc86e26cb6ccc54f1a,5kuC4uk6p9Uuw,kandilli,HIRKATEPE-BEYPAZARI (ANKARA),2.3,5.0,,,,2024-03-19 10:05:00,1710839100,Europe/Istanbul 35 | 65f970bc86e26cb6ccc54f1b,i3qEvT8CjsYKs,kandilli,EGNEZ-SOMA (MANISA),2.1,0.0,,,,2024-03-19 10:02:29,1710838949,Europe/Istanbul 36 | 65f970bc86e26cb6ccc54f1c,Uzgh2rhTdkG5N,kandilli,CAMDERE-KOZAN (ADANA),2.1,7.4,,,,2024-03-19 09:41:31,1710837691,Europe/Istanbul 37 | 65f970bc86e26cb6ccc54f1d,heMEKEODc2CkB,kandilli,KARAKOY-(BOLU),1.7,6.0,,,,2024-03-19 09:40:35,1710837635,Europe/Istanbul 38 | 65f970bc86e26cb6ccc54f1e,_UQg9KKjPbnD9,kandilli,KUSADASI KORFEZI (EGE DENIZI),1.4,10.5,,,,2024-03-19 09:12:47,1710835967,Europe/Istanbul 39 | 65f970bc86e26cb6ccc54f1f,BLogcbHFMXq74,kandilli,BELEN-EZINE (CANAKKALE),1.6,13.1,,,,2024-03-19 08:53:36,1710834816,Europe/Istanbul 40 | 65f970bc86e26cb6ccc54f20,en1UWlB52sBiq,kandilli,SUGUL-DARENDE (MALATYA),1.2,5.4,,,,2024-03-19 08:11:29,1710832289,Europe/Istanbul 41 | 65f970bc86e26cb6ccc54f21,70_FlWTNgJTGA,kandilli,BAGLICAY-GURUN (SIVAS),2.7,2.7,,,,2024-03-19 07:54:06,1710831246,Europe/Istanbul 42 | 65f970bc86e26cb6ccc54f22,TNaV9CsDliT8a,kandilli,ORENDERESI-AFSIN (KAHRAMANMARAS),1.3,5.0,,,,2024-03-19 07:44:17,1710830657,Europe/Istanbul 43 | 65f970bc86e26cb6ccc54f23,kBbwfqx8mR6JZ,kandilli,ADAOREN-DURSUNBEY (BALIKESIR),3.8,5.4,,,,2024-03-19 07:43:28,1710830608,Europe/Istanbul 44 | 65f970bc86e26cb6ccc54f24,SkVcVOhkSEgPv,kandilli,KARAGOL-CELIKHAN (ADIYAMAN),3.4,2.8,,,,2024-03-19 07:26:34,1710829594,Europe/Istanbul 45 | 65f970bc86e26cb6ccc54f25,LygCZDjHKk5Gr,kandilli,KOYCEGIZ (MUGLA),1.4,6.7,,,,2024-03-19 07:14:55,1710828895,Europe/Istanbul 46 | 65f970bc86e26cb6ccc54f26,389M0O_7q9Do9,kandilli,DURULDU-(MALATYA),3.2,5.6,,,,2024-03-19 07:03:51,1710828231,Europe/Istanbul 47 | 65f970bc86e26cb6ccc54f27,NjMULPLl0zax0,kandilli,GUMUSDOVEN-ELBISTAN (KAHRAMANMARAS),1.8,4.1,,,,2024-03-19 06:53:24,1710827604,Europe/Istanbul 48 | 65f970bc86e26cb6ccc54f28,aDD5YM6vV2_dQ,kandilli,OZCANLI-ELBISTAN (KAHRAMANMARAS),1.8,15.6,,,,2024-03-19 06:52:54,1710827574,Europe/Istanbul 49 | 65f970bc86e26cb6ccc54f29,xoAVhWeqOP1Uk,kandilli,ARMUTALAN-ELBISTAN (KAHRAMANMARAS),1.4,22.2,,,,2024-03-19 06:09:03,1710824943,Europe/Istanbul 50 | 65f970bc86e26cb6ccc54f2a,wxn907WUNSuW_,kandilli,KARACA-MARMARIS (MUGLA),0.9,4.1,,,,2024-03-19 05:52:13,1710823933,Europe/Istanbul 51 | 65f970bc86e26cb6ccc54f2b,HjkIAX5Y8YOuN,kandilli,KUMYAKA-MUDANYA (BURSA),0.8,7.4,,,REVIZE01 (2024.03.19 05:47:17),2024-03-19 05:47:17,1710823637,Europe/Istanbul 52 | 65f970bc86e26cb6ccc54f2c,Y0Ky5mQqiFYbI,kandilli,CICEKLI-ANDIRIN (KAHRAMANMARAS),1.4,5.4,,,,2024-03-19 05:20:08,1710822008,Europe/Istanbul 53 | 65f970bc86e26cb6ccc54f2d,6hNmKGFTp3mj0,kandilli,KURUDERE-DARENDE (MALATYA),1.3,8.1,,,,2024-03-19 04:57:54,1710820674,Europe/Istanbul 54 | 65f970bc86e26cb6ccc54f2e,zCtesPnemWuPB,kandilli,KUCUKHACIBEY-ELDIVAN (CANKIRI),1.8,17.5,,,,2024-03-19 04:56:22,1710820582,Europe/Istanbul 55 | 65f970bc86e26cb6ccc54f2f,A_y6pAuRhiv3e,kandilli,KIRLANGIC-YESILYURT (MALATYA),1.2,22.6,,,,2024-03-19 04:52:50,1710820370,Europe/Istanbul 56 | 65f970bc86e26cb6ccc54f30,WP6DYmBNO4yVf,kandilli,BAHTILLI-SIMAV (KUTAHYA),0.7,4.8,,,,2024-03-19 04:25:23,1710818723,Europe/Istanbul 57 | 65f970bc86e26cb6ccc54f31,h_KhuOPOR3oC1,kandilli,GUMUSDOVEN-ELBISTAN (KAHRAMANMARAS),1.4,6.0,,,,2024-03-19 04:19:59,1710818399,Europe/Istanbul 58 | 65f970bc86e26cb6ccc54f32,VvUr1xQPYFL2J,kandilli,AKBAYIR-ELBISTAN (KAHRAMANMARAS),2.0,10.3,,,,2024-03-19 04:15:13,1710818113,Europe/Istanbul 59 | 65f970bc86e26cb6ccc54f33,qswMJXTi6pGYW,kandilli,DURASIL-AKHISAR (MANISA),1.8,7.7,,,,2024-03-19 04:03:12,1710817392,Europe/Istanbul 60 | 65f970bc86e26cb6ccc54f34,HheAmlodqm2Jq,kandilli,DURASIL-AKHISAR (MANISA),2.7,7.5,,,,2024-03-19 03:51:32,1710816692,Europe/Istanbul 61 | 65f970bc86e26cb6ccc54f35,ZTfYhQnzGYmpD,kandilli,KOZLU-(BOLU),1.7,4.2,,,,2024-03-19 03:36:54,1710815814,Europe/Istanbul 62 | 65f970bc86e26cb6ccc54f36,OaXmfj4x9gv6n,kandilli,AVCILAR ACIKLARI-ISTANBUL (MARMARA DENIZI),1.4,12.2,,,,2024-03-19 03:34:14,1710815654,Europe/Istanbul 63 | 65f970bc86e26cb6ccc54f37,yVF0ouspwnqJ3,kandilli,YALINTAS-ELBISTAN (KAHRAMANMARAS),1.7,7.9,,,,2024-03-19 02:15:27,1710810927,Europe/Istanbul 64 | 65f970bc86e26cb6ccc54f38,8oneFgIIZYS_L,kandilli,YEDIOLUK-SARIZ (KAYSERI),1.4,13.1,,,,2024-03-19 01:56:48,1710809808,Europe/Istanbul 65 | 65f970bc86e26cb6ccc54f39,gl0Kim7TsHNqH,kandilli,FINDIKLIKOYAK-GOKSUN (KAHRAMANMARAS),1.2,10.7,,,,2024-03-19 01:47:10,1710809230,Europe/Istanbul 66 | 65f970bc86e26cb6ccc54f3a,UNa9bpTIoHftu,kandilli,BASMEZRA-PUTURGE (MALATYA),1.3,4.2,,,,2024-03-19 00:25:03,1710804303,Europe/Istanbul 67 | 65f970bc86e26cb6ccc54f3b,gCTUOEfdRRlkM,kandilli,CUMAALANI-CAMELI (DENIZLI),1.3,2.0,,,,2024-03-18 23:47:24,1710802044,Europe/Istanbul 68 | 65f970bc86e26cb6ccc54f3c,txZq31Z1rtz8r,kandilli,GEMLIK KORFEZI (MARMARA DENIZI),1.5,5.4,,,,2024-03-18 22:44:45,1710798285,Europe/Istanbul 69 | 65f970bc86e26cb6ccc54f3d,ckmkCWKS7wcZI,kandilli,KUMYAKA-MUDANYA (BURSA),2.3,10.2,,,,2024-03-18 22:27:19,1710797239,Europe/Istanbul 70 | 65f970bc86e26cb6ccc54f3e,b8ZQdFDcE_sV7,kandilli,SALKONAK-YESILYURT (MALATYA),1.4,7.4,,,,2024-03-18 22:20:34,1710796834,Europe/Istanbul 71 | 65f970bc86e26cb6ccc54f3f,NCEUO1lohmJmK,kandilli,ALTINHUSEYIN-PULUMUR (TUNCELI),2.1,9.9,,,,2024-03-18 22:14:18,1710796458,Europe/Istanbul 72 | -------------------------------------------------------------------------------- /data_fetch/earthquake_data_fetch.m: -------------------------------------------------------------------------------- 1 | function earthquake_data_fetch() 2 | % API'den veri çekme işlemi 3 | url = 'https://api.orhanaydogdu.com.tr/deprem/kandilli/live'; 4 | options = weboptions('ContentType', 'json'); 5 | response = webread(url, options); 6 | 7 | % API'den gelen verilerin kontrolü 8 | if isempty(response) 9 | error('API verisi alınamadı.'); 10 | end 11 | 12 | % Veri işleme ve analiz için örnek adımlar 13 | % Örneğin, gelen verilerin ilk 5 öğesini yazdıralım 14 | disp('İlk 5 deprem verisi:'); 15 | disp(response(1:5)); 16 | end 17 | -------------------------------------------------------------------------------- /helpers/data_preprocessing.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import matplotlib.pyplot as plt 3 | import seaborn as sns 4 | import plotly.graph_objs as go 5 | import plotly.express as px 6 | 7 | 8 | # Veri setini yükle 9 | data = pd.read_csv('../data/processed_data/earthquake_data.csv') 10 | 11 | # Başlığı ve ilk 5 satırı göster 12 | print("Başlık ve ilk 5 satır:") 13 | print(data.head()) 14 | 15 | # Sütunları ve veri tiplerini göster 16 | print("\nSütunlar ve Veri Tipleri:") 17 | print(data.dtypes) 18 | 19 | # Veri setinin özet istatistiklerini göster 20 | print("\nÖzet İstatistikler:") 21 | print(data.describe()) 22 | 23 | # Veri setinin şeklini göster 24 | print("\nVeri Setinin Şekli:") 25 | print(data.shape) 26 | 27 | numeric_columns = data.select_dtypes(include=['int64', 'float64']).columns 28 | 29 | # Eksik değerleri kontrol et ve doldur (örneğin, ortalama ile doldur) 30 | data[numeric_columns] = data[numeric_columns].fillna(data[numeric_columns].mean()) 31 | 32 | # Deprem büyüklüklerinin histogramı 33 | plt.figure(figsize=(10, 6)) 34 | sns.histplot(data['mag'], bins=20, kde=True, color='blue') 35 | plt.title('Deprem Büyüklüklerinin Dağılımı') 36 | plt.xlabel('Büyüklük') 37 | plt.ylabel('Frekans') 38 | plt.show() 39 | 40 | # Deprem derinliklerinin dağılımı 41 | plt.figure(figsize=(10, 6)) 42 | sns.histplot(data['depth'], bins=20, kde=True, color='green') 43 | plt.title('Deprem Derinliklerinin Dağılımı') 44 | plt.xlabel('Derinlik (km)') 45 | plt.ylabel('Frekans') 46 | plt.show() 47 | 48 | # Zaman Serisi Analizi 49 | data['date'] = pd.to_datetime(data['date']) # Tarih sütununu datetime'a çevirme 50 | data = data.set_index('date') # Tarih sütununu indeks olarak ayarlama 51 | plt.figure(figsize=(10, 6)) 52 | data['mag'].plot(color='red') 53 | plt.title('Zaman Serisi Analizi: Deprem Büyüklükleri') 54 | plt.xlabel('Tarih') 55 | plt.ylabel('Büyüklük') 56 | plt.show() 57 | 58 | # Deprem büyüklüklerinin zaman içindeki değişimi (rolling 30 günlük ortalama) 59 | plt.figure(figsize=(10, 6)) 60 | data['mag'].rolling(window=30).mean().plot(color='orange') 61 | plt.title('Zaman Serisi Analizi: Deprem Büyüklüklerinin 30 Günlük Ortalaması') 62 | plt.xlabel('Tarih') 63 | plt.ylabel('Büyüklük') 64 | plt.show() 65 | 66 | # Depremlerin saatlik, günlük frekans dağılımları 67 | plt.figure(figsize=(10, 5)) 68 | 69 | plt.subplot(2, 2, 1) 70 | data.resample('h').size().plot(color='purple') 71 | plt.title('Saatlik Deprem Frekansı') 72 | plt.xlabel('Tarih') 73 | plt.ylabel('Deprem Sayısı') 74 | plt.xlim(data.index.min(), data.index.max()) # Saatlik Deprem Frekansı için xlims'i belirle 75 | 76 | plt.subplot(2, 2, 2) 77 | data.resample('D').size().plot(color='green') 78 | plt.title('Günlük Deprem Frekansı') 79 | plt.xlabel('Tarih') 80 | plt.ylabel('Deprem Sayısı') 81 | plt.xlim(data.index.min(), data.index.max()) # Günlük Deprem Frekansı için xlims'i belirle 82 | 83 | plt.tight_layout() 84 | plt.show() 85 | 86 | # Depremlerin büyüklük ve derinlik arasındaki ilişkiyi gösteren scatter plot 87 | plt.figure(figsize=(10, 6)) 88 | sns.scatterplot(x='mag', y='depth', data=data, color='teal') 89 | plt.title('Depremlerin Büyüklük ve Derinlik İlişkisi') 90 | plt.xlabel('Büyüklük') 91 | plt.ylabel('Derinlik (km)') 92 | plt.show() 93 | 94 | # Deprem büyüklüklerinin kutu grafiği 95 | plt.figure(figsize=(8, 6)) 96 | sns.boxplot(x=data['mag'], color='orange') 97 | plt.title('Deprem Büyüklüklerinin Kutu Grafiği') 98 | plt.xlabel('Büyüklük') 99 | plt.show() 100 | 101 | # Deprem derinliklerinin dağılımı ve yoğunluğu 102 | plt.figure(figsize=(12, 6)) 103 | sns.histplot(data['depth'], bins=30, kde=True, color='green') 104 | plt.title('Deprem Derinliklerinin Dağılımı ve Yoğunluğu') 105 | plt.xlabel('Derinlik (km)') 106 | plt.ylabel('Frekans') 107 | plt.show() 108 | 109 | 110 | # Tarih sütununu datetime'a çevirme 111 | data['date_time'] = pd.to_datetime(data['date_time']) 112 | 113 | # Veri setini tarih sütununa göre gruplama 114 | grouped_data = data.groupby(pd.Grouper(key='date_time', freq='D')).size().reset_index(name='count') 115 | 116 | # Görselleştirme 117 | fig = go.Figure(data=go.Heatmap( 118 | z=[grouped_data['count']], 119 | x=grouped_data['date_time'], 120 | y=['Deprem Sayısı'], 121 | colorscale='Viridis')) 122 | 123 | fig.update_layout( 124 | title='Zaman İçinde Deprem Sayısının Değişimi', 125 | xaxis_title='Tarih', 126 | yaxis_title='') 127 | 128 | fig.show() 129 | 130 | datas = pd.read_csv("../data/processed_data/tr.csv") 131 | 132 | # Temizlenmiş veriyi 'cleaned_data.csv' olarak kaydet 133 | data.to_csv('../data/raw_data/cleaned_data.csv', index=False) 134 | -------------------------------------------------------------------------------- /helpers/visualization_utils.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import pandas as pd 3 | 4 | 5 | def plot_earthquake_frequency(data): 6 | """ 7 | Depremlerin sıklık dağılımını çizgi grafiği olarak görselleştirir. 8 | """ 9 | # Veri setindeki tarih sütununu datetime türüne çevir 10 | data['Date'] = pd.to_datetime(data['Date']) 11 | 12 | # Tarih sütununu indeks olarak ayarla 13 | data.set_index('Date', inplace=True) 14 | 15 | # Günlük frekansı hesapla 16 | daily_frequency = data.resample('D').size() 17 | 18 | # Çizgi grafiği çiz 19 | plt.figure(figsize=(10, 6)) 20 | plt.plot(daily_frequency, marker='o', linestyle='-') 21 | plt.title('Daily Earthquake Frequency') 22 | plt.xlabel('Date') 23 | plt.ylabel('Frequency') 24 | plt.grid(True) 25 | plt.show() 26 | 27 | 28 | # Örnek olarak kullanılacak veri setini yükle 29 | data = pd.read_csv('../data/raw_data/cleaned_data.csv') 30 | 31 | # Veri görselleştirmesini çağır 32 | plot_earthquake_frequency(data) 33 | -------------------------------------------------------------------------------- /models/earthquake_models/complex_model.m: -------------------------------------------------------------------------------- 1 | % Adım 1: Veriyi yükleme ve hazırlama 2 | data = readtable('Earthquake_Prediction_Analysis_Project/earthquake_data.csv'); 3 | X = [data.mag, data.depth]; % Giriş özellikleri 4 | Y = data.mag; % Tahmin edilecek değerler 5 | 6 | % Adım 2: Model Seçimi ve Hiperparametre Ayarları 7 | model = fitrsvm(X, Y, 'KernelFunction', 'gaussian', 'OptimizeHyperparameters', 'auto'); 8 | 9 | % Adım 3: Modelin Doğrulanması ve Performans Metriklerinin Hesaplanması 10 | cv_model = crossval(model); 11 | mse = kfoldLoss(cv_model); % Ortalama kare hatası 12 | 13 | % Adım 4: Detaylı Analizler 14 | % Modelin performans metriklerini hesaplayabiliriz 15 | Y_pred = predict(model, X); 16 | accuracy = sum(Y_pred == Y) / length(Y); % Doğruluk oranı 17 | precision = sum(Y_pred & Y) / sum(Y_pred); % Hassasiyet 18 | recall = sum(Y_pred & Y) / sum(Y); % Geri çağırma 19 | f1_score = 2 * (precision * recall) / (precision + recall); % F1 skoru 20 | 21 | % Adım 5: 3D Görselleştirme 22 | figure; 23 | scatter3(data.mag, data.depth, data.mag, 'filled'); 24 | xlabel('Magnitude'); 25 | ylabel('Depth'); 26 | zlabel('Target Variable'); 27 | title('3D Visualization of Seismic Activity'); 28 | 29 | % Modeli kullanarak tahminler yapma 30 | Y_pred = predict(model, X); 31 | 32 | % Tahmin edilen değerlerle gerçek değerler arasındaki karşılaştırma 33 | % Örneğin, ilk 10 tahmini kontrol etmek için: 34 | disp('Gerçek Değerler vs. Tahmin Edilen Değerler:'); 35 | disp([Y(1:5), Y_pred(1:5)]); 36 | 37 | % Model performansını değerlendirme 38 | % Örneğin, ortalama kare hatayı kontrol etmek için: 39 | disp(['Ortalama Kare Hata: ', num2str(mse)]); 40 | 41 | % Scatter Plot (Nokta Grafiği) 42 | figure; 43 | scatter(Y, Y_pred); 44 | xlabel('Gerçek Değerler'); 45 | ylabel('Tahmin Edilen Değerler'); 46 | title('Gerçek Değerler vs. Tahmin Edilen Değerler'); 47 | 48 | % Hata Dağılımı Grafiği 49 | figure; 50 | error = Y - Y_pred; 51 | histogram(error, 20); % 20 bölüme sahip bir histogram 52 | xlabel('Hata'); 53 | ylabel('Frekans'); 54 | title('Hata Dağılımı'); 55 | 56 | -------------------------------------------------------------------------------- /models/earthquake_models/elastic_wave_model.m: -------------------------------------------------------------------------------- 1 | % Adım 1: Veriyi yükleme 2 | data = readtable('Earthquake_Prediction_Analysis_Project/earthquake_data.csv'); 3 | 4 | % Adım 2: Gerekli özellikleri seçme 5 | mag = data.mag; 6 | depth = data.depth; 7 | date_time = datetime(data.date_time); 8 | 9 | % Model Parametreleri 10 | L = 10; % Ortam Uzunluğu (m) 11 | dx = 0.1; % Uzay Adımı Büyüklüğü (m) 12 | dt = 0.01; % Zaman Adımı Büyüklüğü (s) 13 | T = 2; % Toplam Simülasyon Süresi (s) 14 | c = 5; % Dalga Hızı (m/s) 15 | 16 | % Grid Başlatma 17 | x = 0:dx:L; % Uzay Izgarası 18 | t = 0:dt:T; % Zaman Izgarası 19 | Nx = numel(x); % Uzay Izgarası Noktası Sayısı 20 | Nt = numel(t); % Zaman Izgarası Noktası Sayısı 21 | 22 | u = zeros(Nx, Nt); % Taşıma Matrisi 23 | v = zeros(Nx, Nt); % Hız Matrisi 24 | 25 | u0 = sin(pi*x/L); % Başlangıç Yer Değiştirme Profili 26 | v0 = zeros(size(x)); % Başlangıç Hız Profili 27 | 28 | u(:,1) = u0; % Başlangıç Koşullarını Uygula 29 | v(:,1) = v0; 30 | 31 | for n = 2:Nt % Zaman Adımı Döngüsü 32 | for i = 2:Nx-1 % Uzay Adımı Döngüsü 33 | % Sonlu Fark Şeması 34 | u(i,n) = u(i,n-1) + dt*v(i,n-1); 35 | v(i,n) = v(i,n-1) + dt*c^2/dx^2 * (u(i+1,n-1) - 2*u(i,n-1) + u(i-1,n-1)); 36 | end 37 | end 38 | 39 | 40 | % Adım 4: Sismik dalga simülasyonu 41 | % Örnek olarak, basit bir sismik dalga simülasyonu gerçekleştirelim 42 | % Bu adım için uygun modeller ve fonksiyonlar kullanılmalıdır 43 | 44 | % Adım 5: Sonuçları görselleştirme 45 | % Elastik ve sismik dalga simülasyon sonuçlarını görselleştirelim 46 | 47 | % Elastik Dalga Simülasyonunu Görselleştirme 48 | figure; 49 | for n = 1:Nt 50 | plot(x, u(:,n), 'b', 'LineWidth', 2); 51 | xlim([0 L]); 52 | ylim([-1 1]); 53 | xlabel('Pozisyon (m)', 'FontSize', 12, 'FontWeight', 'bold'); 54 | ylabel('Yer Değiştirme', 'FontSize', 12, 'FontWeight', 'bold'); 55 | title(['Elastik Dalga Simülasyonu (t = ', num2str(t(n)), ' s)'], 'FontSize', 14, 'FontWeight', 'bold'); 56 | drawnow; 57 | pause(0.01); % Animasyon hızı kontrolü 58 | end 59 | 60 | 61 | % Sismik dalga simülasyonu 62 | % ... (Sismik dalga simülasyonunu hesaplamak için gerekli kod) 63 | 64 | % İleri düzey görselleştirme 65 | % Animasyonlu 3D Grafik Oluşturma 66 | figure; 67 | for n = 1:Nt 68 | plot3(x, u(:,n), t(n)*ones(size(x)), 'b', 'LineWidth', 2); 69 | xlabel('Pozisyon (m)', 'FontSize', 12, 'FontWeight', 'bold'); 70 | ylabel('Yer Değiştirme', 'FontSize', 12, 'FontWeight', 'bold'); 71 | zlabel('Zaman (s)', 'FontSize', 12, 'FontWeight', 'bold'); 72 | title('Elastik Dalga Simülasyonu', 'FontSize', 14, 'FontWeight', 'bold'); 73 | grid on; 74 | drawnow; 75 | pause(0.01); % Animasyon hızı kontrolü 76 | end 77 | 78 | % Sismik dalga simülasyonu sonuçlarını görselleştirme 79 | % Bu adım için uygun modellerin ve fonksiyonların kullanılması gerekmektedir 80 | 81 | 82 | -------------------------------------------------------------------------------- /models/earthquake_models/seismic_simulation.m: -------------------------------------------------------------------------------- 1 | % Adım 1: Veriyi yükleme ve hazırlama 2 | data = readtable('Earthquake_Prediction_Analysis_Project/earthquake_data.csv'); 3 | mag = data.mag; 4 | depth = data.depth; 5 | date_time = datetime(data.date_time); 6 | 7 | % Adım 2: Örnekleme frekansını hesaplama 8 | duration_seconds = seconds(date_time(end) - date_time(1)); % Toplam süreyi saniyeye dönüştürme 9 | L = length(mag); % Veri uzunluğu 10 | Fs = L / duration_seconds; % Örnekleme frekansı (Hz) 11 | 12 | % Adım 3: FFT uygulama 13 | Y = fft(mag); % FFT uygulama 14 | 15 | % Adım 4: Frekans spektrumunu analiz etme 16 | P2 = abs(Y/L); % Tek yan spektrumu hesapla 17 | P1 = P2(1:L/2+1); % Tek yan spektrumu 18 | P1(2:end-1) = 2*P1(2:end-1); % İlk ve son elemanları hariç iki katına çıkar 19 | f = Fs*(0:(L/2))/L; % Frekans domaini oluştur 20 | 21 | % Adım 5: FFT Sonuçlarını Görselleştirme 22 | figure; 23 | subplot(2,1,1); 24 | plot(f,P1); 25 | title('Single-Sided Amplitude Spectrum of Magnitude Data'); 26 | xlabel('Frequency (Hz)'); 27 | ylabel('|Magnitude|'); 28 | 29 | % Adım 6: Zaman Serisi Analizi 30 | subplot(2,1,2); 31 | plot(date_time, mag); 32 | title('Magnitude Data over Time'); 33 | xlabel('Time'); 34 | ylabel('Magnitude'); 35 | 36 | % Adım 7: Regresyon Analizi 37 | figure; 38 | scatter(depth, mag); 39 | title('Regression Analysis: Depth vs Magnitude'); 40 | xlabel('Depth'); 41 | ylabel('Magnitude'); 42 | 43 | % Adım 8: Makine Öğrenimi Modeli (Regresyon Modeli) 44 | X = [ones(size(depth)) depth]; % Özellik matrisi (konstant ve derinlik) 45 | [b, bint, r, rint, stats] = regress(mag, X); % Regresyon analizi 46 | 47 | % Modelin katsayıları 48 | intercept = b(1); 49 | slope = b(2); 50 | 51 | % R-kare değeri 52 | R_squared = stats(1); 53 | 54 | % Hata terimlerinin standart sapması 55 | error_std = sqrt(stats(4)); 56 | 57 | % Modeli görselleştirme 58 | figure; 59 | scatter(depth, mag); 60 | hold on; 61 | plot(depth, intercept + slope * depth, 'r', 'LineWidth', 2); 62 | xlabel('Depth'); 63 | ylabel('Magnitude'); 64 | title('Regression Analysis: Depth vs Magnitude'); 65 | legend('Data', 'Regression Line'); 66 | 67 | % Adım 9: Diğer Analizler 68 | 69 | % Varyans Analizi 70 | variance_depth = var(depth); 71 | variance_mag = var(mag); 72 | 73 | fprintf('Depth Variance: %.4f\n', variance_depth); 74 | fprintf('Magnitude Variance: %.4f\n', variance_mag); 75 | 76 | 77 | % Adım 10: Zaman Serisi Analizi ve Görselleştirme 78 | figure; 79 | plot(date_time, mag, 'b', 'LineWidth', 1.5); 80 | title('Magnitude Time Series', 'FontSize', 14); 81 | xlabel('Date Time', 'FontSize', 12); 82 | ylabel('Magnitude', 'FontSize', 12); 83 | datetick('x', 'yyyy-mm-dd'); % Tarih zaman eksenini biçimlendirme 84 | 85 | % Adım 11: Veri Dağılımı Analizi ve Görselleştirme 86 | figure; 87 | subplot(2, 1, 1); 88 | histogram(mag, 'Normalization', 'probability', 'FaceColor', 'blue'); 89 | title('Magnitude Histogram', 'FontSize', 14); 90 | xlabel('Magnitude', 'FontSize', 12); 91 | ylabel('Probability', 'FontSize', 12); 92 | 93 | subplot(2, 1, 2); 94 | histogram(depth, 'Normalization', 'probability', 'FaceColor', 'green'); 95 | title('Depth Histogram', 'FontSize', 14); 96 | xlabel('Depth', 'FontSize', 12); 97 | ylabel('Probability', 'FontSize', 12); 98 | 99 | % Adım 12: İstatistiksel Özet Bilgileri 100 | mag_mean = mean(mag); 101 | mag_std = std(mag); 102 | mag_min = min(mag); 103 | mag_max = max(mag); 104 | 105 | depth_mean = mean(depth); 106 | depth_std = std(depth); 107 | depth_min = min(depth); 108 | depth_max = max(depth); 109 | 110 | fprintf('Magnitude Statistics:\n'); 111 | fprintf('Mean: %.2f, Standard Deviation: %.2f, Min: %.2f, Max: %.2f\n', mag_mean, mag_std, mag_min, mag_max); 112 | 113 | fprintf('Depth Statistics:\n'); 114 | fprintf('Mean: %.2f, Standard Deviation: %.2f, Min: %.2f, Max: %.2f\n', depth_mean, depth_std, depth_min, depth_max); 115 | 116 | % Adım 13: Kutu Grafiği ile Görselleştirme 117 | figure; 118 | boxplot([mag, depth], 'Labels', {'Magnitude', 'Depth'}); 119 | title('Boxplot of Magnitude and Depth', 'FontSize', 14); 120 | ylabel('Values', 'FontSize', 12); 121 | 122 | % Adım 14: Yoğunluk Haritası Oluşturma 123 | figure; 124 | scatter(date_time, depth, 20, mag, 'filled'); 125 | colormap(jet); % Renk haritasını ayarla 126 | colorbar; % Renk skalasını ekle 127 | datetick('x', 'yyyy-mm-dd'); % Tarih zaman eksenini biçimlendirme 128 | title('Depth vs. Time with Magnitude Color Mapping', 'FontSize', 12); 129 | xlabel('Date Time', 'FontSize', 12); 130 | ylabel('Depth', 'FontSize', 12); 131 | caxis([min(mag) max(mag)]); % Renk skalasını ayarla 132 | 133 | % Adım 15: Deprem Büyüklüğü ve Derinlik İlişkisi Scatter Plot 134 | figure; 135 | scatter(mag, depth, 50, 'b', 'filled'); 136 | title('Magnitude vs. Depth Scatter Plot', 'FontSize', 14); 137 | xlabel('Magnitude', 'FontSize', 12); 138 | ylabel('Depth', 'FontSize', 12); 139 | 140 | % Ekstra adımlarınızı buraya ekleyebilirsiniz. 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /output_img/Depth Histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Depth Histogram.png -------------------------------------------------------------------------------- /output_img/Figure_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Figure_22.png -------------------------------------------------------------------------------- /output_img/Figure_23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Figure_23.png -------------------------------------------------------------------------------- /output_img/Figure_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Figure_24.png -------------------------------------------------------------------------------- /output_img/Figure_25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Figure_25.png -------------------------------------------------------------------------------- /output_img/Figure_26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Figure_26.png -------------------------------------------------------------------------------- /output_img/Figure_27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Figure_27.png -------------------------------------------------------------------------------- /output_img/Mag Histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Mag Histogram.png -------------------------------------------------------------------------------- /output_img/Mag vs Depth Scatter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Mag vs Depth Scatter.png -------------------------------------------------------------------------------- /output_img/Magnitude Data over time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Magnitude Data over time.png -------------------------------------------------------------------------------- /output_img/ObjVSNumEvaluations.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/ObjVSNumEvaluations.fig -------------------------------------------------------------------------------- /output_img/Regression_Analysis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/Regression_Analysis.png -------------------------------------------------------------------------------- /output_img/figure1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure1.png -------------------------------------------------------------------------------- /output_img/figure10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure10.png -------------------------------------------------------------------------------- /output_img/figure11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure11.png -------------------------------------------------------------------------------- /output_img/figure12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure12.png -------------------------------------------------------------------------------- /output_img/figure13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure13.png -------------------------------------------------------------------------------- /output_img/figure15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure15.png -------------------------------------------------------------------------------- /output_img/figure16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure16.png -------------------------------------------------------------------------------- /output_img/figure17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure17.png -------------------------------------------------------------------------------- /output_img/figure18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure18.png -------------------------------------------------------------------------------- /output_img/figure19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure19.png -------------------------------------------------------------------------------- /output_img/figure2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure2.png -------------------------------------------------------------------------------- /output_img/figure20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure20.png -------------------------------------------------------------------------------- /output_img/figure21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure21.png -------------------------------------------------------------------------------- /output_img/figure3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure3.png -------------------------------------------------------------------------------- /output_img/figure4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure4.png -------------------------------------------------------------------------------- /output_img/figure5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure5.png -------------------------------------------------------------------------------- /output_img/figure6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure6.png -------------------------------------------------------------------------------- /output_img/figure7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure7.png -------------------------------------------------------------------------------- /output_img/figure8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure8.png -------------------------------------------------------------------------------- /output_img/figure9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/figure9.png -------------------------------------------------------------------------------- /output_img/ÖzelliklerArasıİlişki.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/output_img/ÖzelliklerArasıİlişki.fig -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pandas~=2.2.1 2 | matplotlib~=3.8.3 3 | seaborn~=0.13.2 4 | plotly~=5.19.0 5 | numpy~=1.26.4 6 | scikit-learn~=1.4.1.post1 7 | keras~=2.15.0 -------------------------------------------------------------------------------- /types.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /vecteezy_pulsation-epicenter-location-mark-earthquake-earthquake_20143032.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThecoderPinar/Earthquake_Prediction_Analysis_Project/a9d0975584c391c3a5100b50a115a60bcaa39cc6/vecteezy_pulsation-epicenter-location-mark-earthquake-earthquake_20143032.jpg --------------------------------------------------------------------------------