Earthquakes
This example loads and parses a CSV file of notable earthquakes from 1900 to 1999, then displays basic file statistics—size in kilobytes, row count, and column count—in a large text element. The visualization emphasizes data loading and parsing over graphical rendering, using `d3.csv` to fetch and parse the remote dataset from a GitHub gist, and `d3.csvFormat` to calculate the raw data size. The code also demonstrates an alternative `fetch`-based approach with `d3.csvParse`, though the active path uses the simpler `d3.csv` promise interface.
AI-generated descriptionA program that loads and parses some CSV data: Earthquakes.
Select set of notable earthquakes from 1900 to 1999.
References:
Original data sorce: World Almanac and Book of Facts: 2011.
Link: https://rdrr.io/github/OpenIntroStat/openintro/man/earthquakes.html
Variables:
year: Year the earthquake took place.
month: Month the earthquake took place.
day: Day the earthquake took place
richter: Magnitude of earthquake using the Richter Scale.
area: City or geographic location of earthquakes.
region: Country or countries if the earthquake occurred on a border.
deaths: Approximate number of deaths caused by earthquake