Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Fixed requested points from PR
  • Loading branch information
ibhuiyan17 committed Apr 13, 2020
commit 149de08d48172aa1610f05f1d1ce2e45da615e9c
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Support multiple data-sources.

## New York Times is now available as a source!

**Specify source parameter with ?source=nyt. NYT also provides a timeseries! To view timelines of cases by US counties use ?source=nyt&timelines=1**
**Specify source parameter with ?source=nyt. NYT also provides a timeseries! To view timelines of cases by US counties use ?source=nyt&timelines=true**

## Recovered cases showing 0

Expand Down
1 change: 0 additions & 1 deletion app/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

# Mapping of services to data-sources.
DATA_SOURCES = {"jhu": JhuLocationService(), "csbs": CSBSLocationService(), "nyt": NYTLocationService()}
# DATA_SOURCES = {"jhu": JhuLocationService(), "csbs": CSBSLocationService()}


def data_source(source):
Expand Down
5 changes: 1 addition & 4 deletions app/services/location/nyt.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ async def get_locations():
# The normalized locations.
locations = []

idx = 0
for county_state, histories in grouped_locations.items():
for idx, (county_state, histories) in enumerate(grouped_locations.items()):
# Make location history for confirmed and deaths from dates.
# List is tuples of (date, amount) in order of increasing dates.
confirmed_list = histories["confirmed"]
Expand Down Expand Up @@ -121,6 +120,4 @@ async def get_locations():
)
)

idx += 1

return locations