Skip to content

Commit

Permalink
using xmart endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
spoonerf committed Sep 13, 2024
1 parent 01640a8 commit 566000e
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions snapshots/who/latest/monkeypox.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
WHO_REGIONS = ["EURO", "AMRO", "WPRO", "EMRO", "AFRO", "SEARO"]


def import_data() -> pd.DataFrame:
df = pd.DataFrame()
# Fetching the data for each WHO region separately
for region in WHO_REGIONS:
url = f"https://frontdoor-l4uikgap6gz3m.azurefd.net/MPX/V_MPX_VALIDATED_DAILY?&$format=csv&$filter=WHO_REGION%20eq%20%27{region}%27"
df_region = pd.read_csv(url)
df = pd.concat([df, df_region])
return df


@click.command()
@click.option("--upload/--skip-upload", default=True, type=bool, help="Upload dataset to Snapshot")
def main(upload: bool) -> None:
Expand All @@ -33,7 +23,7 @@ def main(upload: bool) -> None:
df = pd.DataFrame()
# Fetching the data for each WHO region separately
for region in WHO_REGIONS:
url = f"https://frontdoor-l4uikgap6gz3m.azurefd.net/MPX/V_MPX_VALIDATED_DAILY?&$format=csv&$filter=WHO_REGION%20eq%20%27{region}%27"
url = f"https://xmart-api-public.who.int/MPX/V_MPX_VALIDATED_DAILY?&$format=csv?&$format=csv&$filter=WHO_REGION%20eq%20%27{region}%27"
df_region = pd.read_csv(url)
df = pd.concat([df, df_region])

Expand Down

0 comments on commit 566000e

Please sign in to comment.