You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting_started_with_epidatpy.rst
+24-4Lines changed: 24 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ The ``pub_covidcast`` function lets us access the ``covidcast`` endpoint:
77
77
78
78
print(apicall)
79
79
80
-
``pub_covidcast`` returns an ``EpiDataCall``, which can be further converted into different output formats - such as a Pandas DataFrame:
80
+
``pub_covidcast`` returns an ``EpiDataCall``, which is a not-yet-executed query that can be inspected. The query can be executed and converted to a DataFrame by using the ``.df()`` method:
81
81
82
82
.. exec::
83
83
:context: true
@@ -175,9 +175,29 @@ it using any of the available Python libraries:
175
175
176
176
.. code-block:: python
177
177
178
-
data.plot(x="time_value", y="value", title="Smoothed CLI from Facebook Survey", xlabel="Date", ylabel="CLI")
Copy file name to clipboardExpand all lines: docs/signal_discovery.rst
+20-18Lines changed: 20 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -28,16 +28,20 @@ data streams which are publically accessible from the COVIDcast API. See the `da
28
28
and signals documentation <https://cmu-delphi.github.io/delphi-epidata/api/covidcast_signals.html>`_
29
29
for descriptions of the available sources.
30
30
31
-
>>> from epidatpy import CovidcastEpidata
32
-
>>> epidata = CovidcastEpidata()
33
-
>>> sources = epidata.source_df
34
-
>>> sources.head()
35
-
source name description reference_signal license dua signals
36
-
0 chng Change Healthcare Change Healthcare is a healthcare technology c... smoothed_outpatient_cli CC BY-NC https://cmu.box.com/s/cto4to822zecr3oyq1kkk9xm... smoothed_outpatient_cli,smoothed_adj_outpatien...
37
-
1 covid-act-now Covid Act Now (CAN) COVID Act Now (CAN) tracks COVID-19 testing st... pcr_specimen_total_tests CC BY-NC None pcr_specimen_positivity_rate,pcr_specimen_tota...
38
-
2 doctor-visits Doctor Visits From Claims Information about outpatient visits, provided ... smoothed_cli CC BY https://cmu.box.com/s/l2tz6kmiws6jyty2azwb43po... smoothed_cli,smoothed_adj_cli
39
-
3 fb-survey Delphi US COVID-19 Trends and Impact Survey We conduct the Delphi US COVID-19 Trends and I... smoothed_cli CC BY https://cmu.box.com/s/qfxplcdrcn9retfzx4zniyug... raw_wcli,raw_cli,smoothed_cli,smoothed_wcli,ra...
40
-
4 google-symptoms Google Symptoms Search Trends Google's [COVID-19 Search Trends symptoms data... s05_smoothed_search To download or use the data, you must agree to... None ageusia_raw_search,ageusia_smoothed_search,ano...
31
+
.. exec::
32
+
:context: true
33
+
34
+
from epidatpy import CovidcastEpidata
35
+
import pandas as pd
36
+
37
+
pd.set_option('display.max_columns', None)
38
+
pd.set_option('display.max_rows', None)
39
+
pd.set_option('display.width', 1000)
40
+
41
+
epidata = CovidcastEpidata()
42
+
sources = epidata.source_df
43
+
44
+
print(sources.head())
41
45
42
46
This DataFrame contains the following columns:
43
47
@@ -52,14 +56,12 @@ The ``signal_df`` DataFrame can also be used to obtain information about the sig
52
56
that are available - for example, what time range they are available for,
53
57
and when they have been updated.
54
58
55
-
>>> signals = epidata.signal_df
56
-
>>> signals.head()
57
-
source signal name active short_description description time_type time_label value_label format category high_values_are is_smoothed is_weighted is_cumulative has_stderr has_sample_size geo_types
58
-
0 chng smoothed_outpatient_cli COVID-Related Doctor Visits False Estimated percentage of outpatient doctor visi... Estimated percentage of outpatient doctor visi... day Date Value raw early bad True False False False False county,hhs,hrr,msa,nation,state
59
-
1 chng smoothed_adj_outpatient_cli COVID-Related Doctor Visits (Day-adjusted) False Estimated percentage of outpatient doctor visi... Estimated percentage of outpatient doctor visi... day Date Value raw early bad True False False False False county,hhs,hrr,msa,nation,state
60
-
2 chng smoothed_outpatient_covid COVID-Confirmed Doctor Visits False COVID-Confirmed Doctor Visits Estimated percentage of outpatient doctor visi... day Date Value raw early bad True False False False False county,hhs,hrr,msa,nation,state
61
-
3 chng smoothed_adj_outpatient_covid COVID-Confirmed Doctor Visits (Day-adjusted) False COVID-Confirmed Doctor Visits Estimated percentage of outpatient doctor visi... day Date Value raw early bad True False False False False county,hhs,hrr,msa,nation,state
62
-
4 chng smoothed_outpatient_flu Influenza-Confirmed Doctor Visits False Estimated percentage of outpatient doctor visi... Estimated percentage of outpatient doctor visi... day Day Value raw early bad True False False None None county,hhs,hrr,msa,nation,state
59
+
.. exec::
60
+
:context: true
61
+
62
+
signals = epidata.signal_df
63
+
64
+
print(signals.head())
63
65
64
66
This DataFrame contains one row each available signal, with the following columns:
0 commit comments