0% found this document useful (0 votes)
6 views1 page

Earthquake Alert System for Congo-Brazzaville

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Earthquake Alert System for Congo-Brazzaville

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Code:

import pandas as pd
import playsound as ps
import time as tm

secondsPassed = 0
while True:
df=pd.read_csv('[Link]
summary/all_day.csv')
reqDF = df[['place','mag']]
containCountry = [Link]('Congo-Brazzaville')
dfOfCountry = reqDF[containCountry]
dfOfSEQ = dfOfCountry[dfOfCountry['mag']>5.8]
rowsInDFofSEQ = [Link][0]

if rowsInDFofSEQ>0:
print('Alert! EQ occured')
[Link]('[Link]')
secondsPassed+=10
else:
print('Alhamdulillah No EQ')
print(rowsInDFofSEQ)
print(f"Monitor for {secondsPassed} sec. \Press Ctrl+C to Stop.")
[Link](60)
secondsPassed+=60

Output:

Alhamdulillah No EQ
0
Monitor for 0 sec. \Press Ctrl+C to Stop.

You might also like