•  


?? fixs recovery data in api/v2 jhu by codedawi · Pull Request #316 · ExpDev07/coronavirus-tracker-api · GitHub
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

?? fixs recovery data in api/v2 jhu #316

Closed
wants to merge 16 commits into from

Conversation

codedawi
Copy link
Contributor

@codedawi codedawi commented May 20, 2020

  • reimplements the get_category("recovered") methods in jhu service.
  • adds/fixes the tests for recovered data now.
  • resolves the merge issue related to missing recovery data from select countries.
    • Sierra Leone
    • Netherlands , Bonaire, Sint Eustatius and Saba
    • Malawi
    • France , Saint Pierre and Miquelon
    • United Kingdom , Falkland Islands (Malvinas)
    • South Sudan
    • Western Sahara
    • Sao Tome and Principe
    • Yemen
    • Comoros
    • Tajikistan
    • Lesotho

While reviewing the jhu service code I uncovered at critical bug that could expose this service to data & uptime issues in the future. In the PR the function parse_history is implemented as a temporary fix which will prevent the service from going down and providing consumers inaccurate data.

Add note to code:

# ***************************************************************************

# TODO: This iteration approach assumes the indexes remain the same

#       and opens us to a CRITICAL ERROR. The removal of a column in the data source

#       would break the API or SHIFT all the data confirmed, deaths, recovery producting

#       incorrect data to consumers.

# ***************************************************************************

Potential address in @Kilo59 's refactor mentioned.

FIXES : #161 #276 #113

FIXES : codedawi/covid19-badges#1
Covid-19 Confirmed Covid-19 Deaths Covid-19 Recovered

@codedawi codedawi force-pushed the master branch 2 times, most recently from 6a0bea5 to 761f62d Compare May 20, 2020 05:18
@Kilo59
Copy link
Collaborator

@codedawi Hey thanks for this! ?? I'll take a look at this ASAP.

@Kilo59
Copy link
Collaborator

Kilo59 commented May 20, 2020

@codedawi It definitely appears to have fixed the recoveries of many locations (US, AU, etc), but many other locations that are not showing up in the logs as having a "merge error" (DE, CN, CA etc) still show zero recoveries (for me locally).

I'm almost inclined to merge it anyways ?? .
However certain locations such as the UK are showing partial recovery numbers instead, which IMO is worse than still showing 0.

Any API users please feel free to chime in.

{
  
"latest"
: {
    
"confirmed"
: 
250138
,
    
"deaths"
: 
35422
,
    
"recovered"
: 
1067

  },
  
"locations"
: [
    {
      
"id"
: 
217
,
      
"country"
: 
"
United Kingdom
"
,
      
"country_code"
: 
"
GB
"
,
      
"country_population"
: 
66488991
,
      
"province"
: 
"
Bermuda
"
,
      
"last_updated"
: 
"
2020-05-20T20:52:14.791765Z
"
,
      
"coordinates"
: {
        
"latitude"
: 
"
32.3078
"
,
        
"longitude"
: 
"
-64.7505
"

      },
      
"latest"
: {
        
"confirmed"
: 
125
,
        
"deaths"
: 
9
,
        
"recovered"
: 
78

      }
    },
...

    {
      
"id"
: 
223
,
      
"country"
: 
"
United Kingdom
"
,
      
"country_code"
: 
"
GB
"
,
      
"country_population"
: 
66488991
,
      
"province"
: 
"
"
,
      
"last_updated"
: 
"
2020-05-20T20:52:14.806740Z
"
,
      
"coordinates"
: {
        
"latitude"
: 
"
55.3781
"
,
        
"longitude"
: 
"
-3.436
"

      },
      
"latest"
: {
        
"confirmed"
: 
248818
,
        
"deaths"
: 
35341
,
        
"recovered"
: 
0

      }
    },
...

    {
      
"id"
: 
257
,
      
"country"
: 
"
United Kingdom
"
,
      
"country_code"
: 
"
GB
"
,
      
"country_population"
: 
66488991
,
      
"province"
: 
"
Falkland Islands (Malvinas)
"
,
      
"last_updated"
: 
"
2020-05-20T20:52:14.884740Z
"
,
      
"coordinates"
: {
        
"latitude"
: 
"
-51.7963
"
,
        
"longitude"
: 
"
-59.5236
"

      },
      
"latest"
: {
        
"confirmed"
: 
13
,
        
"deaths"
: 
0
,
        
"recovered"
: 
0

      }
    }
  ]
}

I think I would like to merge this immediately to the US hosted version of the API that's based off my own fork .

@codedawi
Copy link
Contributor Author

Any update on getting this merged in? If not we can just close.

Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed source: jhu
Projects
None yet
3 participants
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본