-
Notifications
You must be signed in to change notification settings - Fork 17
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
No data returned from nchs-mortality and can't use week as the time type #1904
Comments
Do you remember which day you were trying to grab data from that gave you a NoDataWarning? |
Also, correct me if I'm wrong @brookslogan but it seems like from the documentation that when using epiweeks we should use |
Hi Nolan,
I tried yesterday currently and received the message. It’s supposed that if the time type is week, it should use epiweek.Week.startdate(). But no matter I used covidcast.signal() or Epidata.covidcast(), I can’t set week as the time type. It always went to coding for the time type “day”. If I set week as time type for Epidatta.covidcast(), the error message is the time format is wrong. I don’t know why.
My query is: data = covidcast.signal("nchs-mortality", "deaths_covid_incidence_num",Week(2021, 5), Week(2021, 7), "state", "il")
Best
Yin
From: Nolan Gormley ***@***.***>
Sent: Tuesday, October 17, 2023 12:08 PM
To: cmu-delphi/covidcast-indicators ***@***.***>
Cc: Peng, Yin ***@***.***>; Author ***@***.***>
Subject: [External] Re: [cmu-delphi/covidcast-indicators] No data returned from nchs-mortality and can't use week as the time type (Issue #1904)
Do you remember which day you were trying to grab data from that gave you a NoDataWarning?
—
Reply to this email directly, view it on GitHub<https://secure-web.cisco.com/1gb-yPJvhoe7E6vZrWvzp0Xnm2t9gLTHf2D8EDR5r0YH-TrTrs4wjlghxypsnFGbGOnC-f9QO_g9b7ERTpxTEKhxxaYWR5dHtHKS4lR8dvFJPgkscHN3bt91sHrlFSk1lXS0rLxLWX9fPUkSMudvYW-ggUGOBtZJePlBccfUQDlDDLgVzepPxgk-U2ua-2RqrqAj08RJO-wlpBxGH8YU82b3m12xrxfMNkToLpuc53HJ8s6IYd_OH2zBSue-cXbrKgGLedhj00h7vUa_KSP6zgEWILNBxU8xXSDg_ckuTN2Uae9zsG3NfC4B9R9_yJFJbQ6a7fWJqpm1HxMRHhicdGCvvv7yXKqmv4hlGeM4FL4uY9S_NOSh4xSfa5k_5rt2g47aZPc0b0p6wZhMABGGdLu03qT8iIANJDvfdD7rTGMk/https%3A%2F%2Fgithub.com%2Fcmu-delphi%2Fcovidcast-indicators%2Fissues%2F1904%23issuecomment-1766831384>, or unsubscribe<https://secure-web.cisco.com/1WvrQmkepyelvZoZd6KK4RQmF0VBcX0-S-N1swXzoTvKKgvhG5DixonTskUb4-e5KB1Q6EhxOf7pDjvquJQoKOlQ_2ck6ntlnzGbqIOp4NDpUkHOf2UlNlTtHQfntgiD7Gtjuwdd8mIN-VkyzSf8-jYXis5dh2_qIruxgLPTEQEjXSvqOgzB1gKc5oUJVEeoqrPsDNauVTAuFvtOSMmL2KCWvZMGfYTKB1rD6-stzjIMOCLbfa-IIK388TcHP3RrKb2UZ6NJacscIB33yEknj0zSF1NeWoZVFkZynXKj2r5RZTgA-caBOYnwgC9x8n3M7GXtU-gWmrAjjBwMKGBW906D74WHXefNxagqtcYXc5c8b16_EOOcLHvYXRIO26i_VC0SU8o-Xeich1Jw0FrMtWVI7C8daY0kZJ11wPjO56SI/https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FBDLAIELIWKKPUG6KQRZIIMLX723P3AVCNFSM6AAAAAA6D7KOZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRWHAZTCMZYGQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
State of Illinois - CONFIDENTIALITY NOTICE: The information contained in this communication is confidential, may be attorney-client privileged or attorney work product, may constitute inside information or internal deliberative staff communication, and is intended only for the use of the addressee. Unauthorized use, disclosure or copying of this communication or any part thereof is strictly prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately by return e-mail and destroy this communication and all copies thereof, including all attachments. Receipt by an unintended recipient does not waive attorney-client privilege, attorney work product privilege, or any other exemption from disclosure.
|
@IDPHChicago: from delphi_epidata import Epidata
data = Epidata.covidcast("nchs-mortality", "deaths_covid_incidence_num", time_type="week", geo_type="state", time_values="202105:202107", geo_value="il") |
Thank you for bringing this to our attention! We recently (accidentally) introduced a bug in processing "week" dates on our server, and you helped us identify it. Now that it has been fixed, you should be able to use the data = covidcast.signal("nchs-mortality", "deaths_covid_incidence_num", Week(2021, 5).startdate(), Week(2021, 7).enddate(), "state", "il", time_type="week") |
It’s so nice to see that you update the covidcast.signal() which would be helpful for my co-workers. Sometimes the outer request is a special time frame by the date not the week. Thank you!
Best
Yin
From: melange396 ***@***.***>
Sent: Wednesday, October 18, 2023 3:07 PM
To: cmu-delphi/covidcast-indicators ***@***.***>
Cc: Peng, Yin ***@***.***>; Mention ***@***.***>
Subject: [External] Re: [cmu-delphi/covidcast-indicators] No data returned from nchs-mortality and can't use week as the time type (Issue #1904)
Thank you for bringing this to our attention! We recently (accidentally) introduced a bug in processing "week" dates on our server, and you helped us identify it.
Now that it has been fixed, you should be able to use the covidcast client successfully... However, its start_day and end_day arguments must be of type datetime.date, even if the signal is "weekly". Either the .startdate() or .enddate() methods of epiweek.Week objects can be used to convert (and both should net the same results for weekly signals). Be sure you also specify time_type="week"! Here is a modified version of your sample code from above that should work properly:
data = covidcast.signal("nchs-mortality", "deaths_covid_incidence_num", Week(2021, 5).startdate(), Week(2021, 7).enddate(), "state", "il", time_type="week")
—
Reply to this email directly, view it on GitHub<https://secure-web.cisco.com/1pv24SHOIQRsEyJ7mUU1e0ON6QLPxfIHGUgGiJB6FbtJlYICSiikJXoGhsJ1jMHzMdJvR_2vZ7cWTzOuYJmP9H8-WAJe5aW_WN9qQFxr8XTorNOF9Df56x6WRKTFHANE_tZIT9lxNrxneD0HQy4abhWFQMOXxQ1kQCC70OsVe-8_FRbPl-Yxzj56VTez26IcBX29IQCrEDPQJi7Y_KvEZVJAe7gQdnoaaO0H-1yccVZhxL3wwqUcEkoypLKqlYpGtYwtDanYfdd_YQ1M9jcyAcC4nm-N1Rv3x2z15hnMv_CjYqROQdZYBPfWyGlxJqTHi0YpzSHw5aL5mDKJnsscV-jSbHfpkxphDEO0hiQog3nYgL9yjUww_V6Xb-ejAVNMBuHeUN1WPt3SGaL7WZsO6sw/https%3A%2F%2Fgithub.com%2Fcmu-delphi%2Fcovidcast-indicators%2Fissues%2F1904%23issuecomment-1769241586>, or unsubscribe<https://secure-web.cisco.com/1YqRYmlsws5XOtJwA5INOalEUvN75_Xjym8bk04cMAt7-fhC4rgW7pBklR6WcfDVdUoFVFluAB2ewFoqVjeCzJaAOY0ozxfxRcPTiae30EtWn6EfkZHYqjeICKBvdNn0ccMn8Q8MBaMoQDYlchGcKaYKb_-IIJfd4attIPONL4593aI1fDK3wuB3LGebrrjLaIyHoUQpfviKp1kQYrnNmuS4WwLfOIxwfIaUtpWxbbyFTQbPM_-ly20ePVDs2GTg-RV59dlcE-MhoR4mlkdzSxOas6tbpfMwPJ6NriKhJVSSrAMRpleucVGa-n0K6wIZZCsdyz0qCb1zkx9aGKzUpBX_HRiE0aEPKjxmrP2sgkwTAk8EuBB7NqNPE0gDKAZs1-MXCd9gTtjM50I1X98LjRw/https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FBDLAIENCCYQLKCLT2CZFFSTYAAZGNAVCNFSM6AAAAAA6D7KOZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRZGI2DCNJYGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
State of Illinois - CONFIDENTIALITY NOTICE: The information contained in this communication is confidential, may be attorney-client privileged or attorney work product, may constitute inside information or internal deliberative staff communication, and is intended only for the use of the addressee. Unauthorized use, disclosure or copying of this communication or any part thereof is strictly prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately by return e-mail and destroy this communication and all copies thereof, including all attachments. Receipt by an unintended recipient does not waive attorney-client privilege, attorney work product privilege, or any other exemption from disclosure.
|
Actual Behavior:
When I query the data of any signal from data source nchs-mortality, it returns NoDataWarning. The time type is day (datetime.date()). The geo type is state. The geo value is il.
When I set the time type as week by using epiweek.Week(), it can't return the correct time and raise "AttributeError: 'Week' object has no attribute 'strftime'".
Expected behavior
I have the API key and would like to use covidcast.signal to download the data of Illinois from data source nchs-mortality. The signals are: deaths_covid_incidence_num, deaths_covid_incidence_prop, deaths_pneumonia_notflu_incidence_num, deaths_pneumonia_notflu_incidence_prop, deaths_pneumonia_or_flu_or_covid_incidence_num, deaths_pneumonia_or_flu_or_covid_incidence_prop.
Context
I can create the pandas dateframes by using covidcast.signal to download data from other data sources.
The text was updated successfully, but these errors were encountered: