plot Earthquake data on map
We aimed to retrieve earthquake data, parse it, and display specific columns ('mag', 'place', and 'time') in a tabular format using Python.
Retrieving, Parsing, and Displaying Earthquake Data in Python
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.