/plot-earthquake-data

plot Earthquake data on map

Primary LanguagePython

plot-earthquake-data

plot Earthquake data on map

Objective:

We aimed to retrieve earthquake data, parse it, and display specific columns ('mag', 'place', and 'time') in a tabular format using Python.

Topic:

Retrieving, Parsing, and Displaying Earthquake Data in Python

Steps:

Data Retrieval: 
    We assumed the earthquake data was obtained from a source such as the USGS Earthquake API or another provider.
Data Parsing: 
    Utilized pandas to convert the earthquake data into a DataFrame for easier manipulation and display.
Nested Data Handling: 
    Extracted required columns ('mag', 'place', 'time') nested within the 'properties' dictionary of each earthquake event using lambda functions.
Time Conversion: 
    Converted time from milliseconds to a human-readable format ('YYYY-MM-DD HH:MM:SS') using the pd.to_datetime() function and string formatting.
Display: 
    Presented the extracted columns in tabular format.
Adjustments: 
    Made necessary adjustments based on error feedback to ensure correct indexing and handling of nested data.
Verification: Verified the code produced the desired output.
image image
2024-04-26.12.05.55.mov