mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-09 02:42:36 +00:00
* fix(docs): added margin between sections * feat: removed unused files; updated ga * fix: juan stuff doesnt work * fix: random fix * moon at noon * fix: update docusaurus config * Update controller_doc_classes.py * fix: temp fix * fix: temp fix * Update controller_doc_classes.py * fix: remove old content * fix: taggfix * init * fix: styling and moved file * Update generate_terminal_markdown.py * fix: removed unused images * fix: port new files * Update generate_sdk_markdown.py * Update controller_doc_classes.py Co-authored-by: teh_coderer <me@tehcoderer.com>
80 lines
1.8 KiB
Markdown
Vendored
80 lines
1.8 KiB
Markdown
Vendored
---
|
|
title: stat
|
|
description: OpenBB SDK Function
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# stat
|
|
|
|
<Tabs>
|
|
<TabItem value="model" label="Model" default>
|
|
|
|
Show historical cases and deaths by country.
|
|
|
|
Source Code: [[link](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/openbb_terminal/alternative/covid/covid_model.py#L136)]
|
|
|
|
```python
|
|
openbb.alt.covid.stat(country: str, stat: str = "cases", limit: int = 10)
|
|
```
|
|
|
|
---
|
|
|
|
## Parameters
|
|
|
|
| Name | Type | Description | Default | Optional |
|
|
| ---- | ---- | ----------- | ------- | -------- |
|
|
| country | str | Country to get data for | None | False |
|
|
| stat | str | Statistic to get. Either "cases", "deaths" or "rates" | cases | True |
|
|
| limit | int | Number of raw data to show | 10 | True |
|
|
|
|
|
|
---
|
|
|
|
## Returns
|
|
|
|
| Type | Description |
|
|
| ---- | ----------- |
|
|
| pd.DataFrame | Dataframe of data for given country and statistic |
|
|
---
|
|
|
|
|
|
|
|
</TabItem>
|
|
<TabItem value="view" label="Chart">
|
|
|
|
Prints table showing historical cases and deaths by country.
|
|
|
|
Source Code: [[link](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/openbb_terminal/alternative/covid/covid_view.py#L172)]
|
|
|
|
```python
|
|
openbb.alt.covid.stat_chart(country: str, stat: str = "cases", raw: bool = False, limit: int = 10, export: str = "", plot: bool = True)
|
|
```
|
|
|
|
---
|
|
|
|
## Parameters
|
|
|
|
| Name | Type | Description | Default | Optional |
|
|
| ---- | ---- | ----------- | ------- | -------- |
|
|
| country | str | Country to get data for | None | False |
|
|
| stat | str | Statistic to get. Either "cases", "deaths" or "rates" | cases | True |
|
|
| raw | bool | Flag to display raw data | False | True |
|
|
| limit | int | Number of raw data to show | 10 | True |
|
|
| export | str | Format to export data | | True |
|
|
| plot | bool | Flag to plot data | True | True |
|
|
|
|
|
|
---
|
|
|
|
## Returns
|
|
|
|
This function does not return anything
|
|
|
|
---
|
|
|
|
|
|
|
|
</TabItem>
|
|
</Tabs> |