Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of PHP alias in the Python client #663

Merged
merged 20 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Python-packages/covidcast-py/covidcast/covidcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .errors import NoDataWarning

# Point API requests to the default endpoint
Epidata.BASE_URL = "https://api.covidcast.cmu.edu/epidata/api.php"
Epidata.BASE_URL = "https://api.covidcast.cmu.edu/epidata"

VALID_GEO_TYPES = {"county", "hrr", "msa", "dma", "state", "hhs", "nation"}

Expand Down Expand Up @@ -476,7 +476,6 @@ def _async_fetch_epidata(data_source: str,
date_range = pd.date_range(start_day, end_day, freq="D" if time_type == "day" else "W")
for day in date_range:
day_param = {
"source": "covidcast",
"data_source": data_source,
"signals": signal,
"time_type": "day",
Expand All @@ -491,7 +490,7 @@ def _async_fetch_epidata(data_source: str,
if lag:
day_param["lag"] = lag
params.append(day_param)
output = Epidata.async_epidata(params, batch_size=100)
output = Epidata.async_epidata("covidcast", params, batch_size=100)
for day_data, params in output:
if day_data["message"] == "no results":
warnings.warn(f"No {data_source} {signal} data found on {params['time_values']} "
Expand Down
2 changes: 1 addition & 1 deletion Python-packages/covidcast-py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
install_requires=[
"pandas<2",
"requests",
"delphi-epidata>=4.1.1",
"delphi-epidata>=4.1.2",
melange396 marked this conversation as resolved.
Show resolved Hide resolved
"geopandas",
"matplotlib",
"numpy",
Expand Down
Loading