scrape_faers_sb

scrape_faers_sb#

SurVigilance.ui.scrapers.scrape_faers_sb(output_dir: str = 'data/faers', headless: bool = True, callback: Callable[[dict], None] | None = None, num_retries: int = 5) DataFrame[source]#

Scrapes all available years and associated quarters from the FAERS website for which data is available.

Parameters#

output_dir: Directory to save CSV (default “data/faers”).

headless: bool

Run the browser in headless mode (default True).

callbackcallable

Callable to receive UI/status events, called with a dict. This is essential to show progress to user.

num_retries: int

Number of retries for data scraping after which error is thrown (default 5).

Returns#

A DataFrame with columns [“Year”, “Quarter”], representing the quarters in each year for which data is available.