@@ -111,14 +111,9 @@ def get_geo_signal_combos(data_source):
111111 Cross references based on combinations reported available by COVIDcast metadata.
112112 """
113113 # Maps data_source name with what's in the API, lists used in case of multiple names
114- # pylint: disable=fixme
115- # TODO: Extract this mapping from meta response instead of hard-coding
116- # https://github.com/cmu-delphi/covidcast-indicators/issues/1457
117- source_signal_mappings = {
118- 'indicator-combination' : ['indicator-combination-cases-deaths' ],
119- 'quidel' : ['quidel-covid-ag' ],
120- 'safegraph' : ['safegraph-weekly' ]
121- }
114+
115+ source_signal_mappings = {i ['source' ]:i ['db_source' ] for i in
116+ requests .get ("https://api.covidcast.cmu.edu/epidata/covidcast/meta" ).json ()}
122117 meta = covidcast .metadata ()
123118 source_meta = meta [meta ['data_source' ] == data_source ]
124119 # Need to convert np.records to tuples so they are hashable and can be used in sets and dicts.
@@ -130,8 +125,9 @@ def get_geo_signal_combos(data_source):
130125 # True/False indicate if status is active, "unknown" means we should check
131126 sig_combo_seen = dict ()
132127 for combo in geo_signal_combos :
133- if source_signal_mappings .get (data_source ):
134- src_list = source_signal_mappings .get (data_source )
128+ if data_source in source_signal_mappings .values ():
129+ src_list = [key for (key , value ) in source_signal_mappings .items ()
130+ if value == data_source ]
135131 else :
136132 src_list = [data_source ]
137133 for src in src_list :
0 commit comments