Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
2017 - Gabrielle Simard-Moore - Calculating the...
Search
PyBay
August 13, 2017
Programming
0
620
2017 - Gabrielle Simard-Moore - Calculating the Epicenter of an Earthquake with Python
PyBay
August 13, 2017
Tweet
Share
More Decks by PyBay
See All by PyBay
2017 - The Packaging Gradient
pybay
2
930
2017 - Building Bridges: Stopping Python 2 without damages
pybay
0
650
2017 - Bringing Python 3 to LinkedIn
pybay
1
560
2017 - Python Debugging with PUDB
pybay
0
710
2017 - Opening up to Open Source
pybay
0
250
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
190
2017 - Performant Asynchronous Programming at Quora
pybay
1
380
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
520
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
630
Other Decks in Programming
See All in Programming
Perplexity Slack Botを作ってAI活用を進めた話 / AI Engineering Summit プレイベント
n3xem
0
670
Claude Codeの使い方
ttnyt8701
1
130
Webからモバイルへ Vue.js × Capacitor 活用事例
naokihaba
0
740
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
3
360
FormFlow - Build Stunning Multistep Forms
yceruto
1
190
C++20 射影変換
faithandbrave
0
500
エンジニア向け採用ピッチ資料
inusan
0
140
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
970
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
41
28k
Using AI Tools Around Software Development
inouehi
0
1.2k
イベントストーミングから始めるドメイン駆動設計
jgeem
4
870
ReadMoreTextView
fornewid
1
450
Featured
See All Featured
Building an army of robots
kneath
306
45k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Side Projects
sachag
455
42k
Scaling GitHub
holman
459
140k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Into the Great Unknown - MozCon
thekraken
39
1.9k
Designing for Performance
lara
609
69k
Faster Mobile Websites
deanohume
307
31k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Navigating Team Friction
lara
187
15k
Why Our Code Smells
bkeepers
PRO
337
57k
Transcript
Calculating the Epicenter of an Earthquake with Python Gabrielle Simard-Moore
From Seismograph to Epicenter • 3 Seismic Stations • P-
and S-wave arrival time difference • Distance to Earthquake • Draw 3 circles • Intersection = Epicenter
Seismic Data
Getting the Distance and Magnitude
None
Tech Stack • Python • Numpy • Datetime • Math
• Flask • Ajax/Jquery • Google Maps JS API
Assumptions • Wave velocity in CA crustal rocks P-wave velocity
~ 6.34 km/s (varies by +/- 2+) S-wave velocity ~ 3.67 km/s (varies by +/- 1+) • Homogeneity of materials (very unrealistic for a heterogeneous lithosphere)
3 stations
Many steps
Degrees to Radians
Geodetic (latitude, longitude) to ECEF X, Y, Z coordinates to
Numpy array ECEF = “Earth centered, Earth fixed”
Vector Normalization
Final Trilateration point: Epicenter
ECEF XYZ to Lat, Lon
Front end
Thanks! github.com/gsimore/earthquakes
[email protected]