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

All 'US' locations missing 'Province' data #10

Open
carmelotony opened this issue Mar 24, 2020 · 12 comments
Open

All 'US' locations missing 'Province' data #10

carmelotony opened this issue Mar 24, 2020 · 12 comments

Comments

@carmelotony
Copy link

Executing the following use to return timelines for all locations within the country 'US'.

#get locations data
locations = covid19.getLocationByCountryCode("US", timelines = True)

Now it returns only 'US' totals without the 'province' data...

"[{'coordinates': {'latitude': '37.0902', 'longitude': '-95.7129'},
'country': 'US',
'country_code': 'US',
'id': 225,
'last_updated': '2020-03-24T20:41:02.216348Z',
'latest': {'confirmed': 43847, 'deaths': 557, 'recovered': 0},
'province': '',
'timelines': {'confirmed': {'latest': 43847,
'timeline': {'2020-01-22T00:00:00Z': 1,
'2020-01-23T00:00:00Z': 1,
'2020-01-24T00:00:00Z': 2,...."

@bkawakami
Copy link

bkawakami commented Mar 24, 2020

Looks like with the last update of @ExpDev07 this package start return wrong data :(

@ExpDev07
Copy link

ExpDev07 commented Mar 24, 2020

@bkawakami @carmelotony Per JHU's recent announcement (the main data provider), they will:

  1. Not provide data on recoveries.
  2. Drop province-level data and focus on countries as a whole.

If you specify csbs as source you can retrieve US-specific data (including states and counties).

Relevant: ExpDev07/coronavirus-tracker-api#161.

@carmelotony carmelotony changed the title missing 'Province' from location json All 'US' locations missing 'Province' data Mar 24, 2020
@carmelotony
Copy link
Author

@bkawakami @carmelotony Per JHU's recent announcement (the main data provider), they will:

  1. Not provide data on recoveries.
  2. Drop province-level data and focus on countries as a whole.

If you specify csbs as source you can retrieve US-specific data (including states and counties).

Relevant: ExpDev07/coronavirus-tracker-api#161.

Do I need to up date the package getting?
Getting this error when passing csbs

init() got an unexpected keyword argument 'data_source'

@carmelotony
Copy link
Author

Passed "csbs" instead of data_source = "csbs" and it made the connections...
However, after trying to retrieve data got the following error...

Invalid URL 'csbs/v2/locations': No schema supplied. Perhaps you meant http://csbs/v2/locations?

@ExpDev07
Copy link

ExpDev07 commented Mar 24, 2020

The source needs to be passed as a query param. /v2/locations?source=csbs @carmelotony

@Kamaropoulos
Copy link
Owner

@carmelotony the first argument it gets is the URL, that's why it tries to retrieve data from csbs/v2/locations.

Try using COVID19(data_source="csbs") instead. 🙂

@carmelotony
Copy link
Author

carmelotony commented Mar 24, 2020

@carmelotony the first argument it gets is the URL, that's why it tries to retrieve data from csbs/v2/locations.

Try using COVID19(data_source="csbs") instead. 🙂

@Kamaropoulos

getting this error...

TypeError Traceback (most recent call last)
in
1 #creat covid19 instance
----> 2 covid19 = COVID19Py.COVID19(data_source="csbs")

TypeError: init() got an unexpected keyword argument 'data_source'

@ExpDev07
Copy link

Probably need to update your deps.

@Kamaropoulos
Copy link
Owner

@carmelotony the first argument it gets is the URL, that's why it tries to retrieve data from csbs/v2/locations.
Try using COVID19(data_source="csbs") instead. 🙂

@Kamaropoulos

getting this error...

TypeError Traceback (most recent call last)
in
1 #creat covid19 instance
----> 2 covid19 = COVID19Py.COVID19(data_source="csbs")

TypeError: init() got an unexpected keyword argument 'data_source'

Weird, I had it happen once while testing this out but now I can't reproduce it, it worked fine when I tried it again 🤔

@carmelotony
Copy link
Author

@carmelotony the first argument it gets is the URL, that's why it tries to retrieve data from csbs/v2/locations.
Try using COVID19(data_source="csbs") instead. 🙂

@Kamaropoulos
getting this error...
TypeError Traceback (most recent call last)
in
1 #creat covid19 instance
----> 2 covid19 = COVID19Py.COVID19(data_source="csbs")
TypeError: init() got an unexpected keyword argument 'data_source'

Weird, I had it happen once while testing this out but now I can't reproduce it, it worked fine when I tried it again 🤔

Just upgraded to version 0.3.0, but still the same error...

@Kamaropoulos
Copy link
Owner

@carmelotony what's your platform and Python version?

@carmelotony
Copy link
Author

@carmelotony what's your platform and Python version?

window 10 conda 3.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants