I am trying to obtain the values of this columns (Year, Mom Dy, Hr, Mn, Sec) from the following [website https://www.ngdc.noaa.gov/hazel/view/hazards/tsunami/event-data?maxYear=2022&minYear=2010&country=USA] but I am new using Beautiful soup and I cannot find the table tag in the inspection to obtain the information. This are the columns
I have tried using this code:
url = 'https://www.ngdc.noaa.gov/hazel/view/hazards/tsunami/event-data?
maxYear=2022&minYear=2010&country=USA'
r = requests.get(url)
soup = BeautifulSoup(r.content, 'html.parser')
soup.find('class',attrs={'ReactVirtualized__Grid__innerScrollContainer'})
But nothing is returned.
Data comes from an API you can call. You can optionally create a date index and sort on that as well after generating a DataFrame from the returned json.
You can read about the API options here:
https://www.ngdc.noaa.gov/hazel/view/swagger#/Tsunami%20Events#
There is also a search tool here:
https://www.ngdc.noaa.gov/hazel/view/hazards/tsunami/event-search