@@ -394,62 +394,6 @@ def meta_norostat(auth):
394
394
# Make the API call
395
395
return Epidata ._request (params )
396
396
397
- # Fetch AFHSB data
398
- @staticmethod
399
- def afhsb (auth , locations , epiweeks , flu_types ):
400
- """Fetch AFHSB data (point data, no min/max)."""
401
- # Check parameters
402
- if auth is None or locations is None or epiweeks is None or flu_types is None :
403
- raise Exception ('`auth`, `locations`, `epiweeks` and `flu_types` are all required' )
404
-
405
- loc_exception = 'Location parameter `{}` is invalid. Valid `location` parameters are: ' \
406
- '`hhs[1-10]`, `cen[1-9]`, 2-letter state code or 3-letter country code.'
407
- for location in locations :
408
- location = location .lower ()
409
- if (location .startswith ('hhs' ) or location .startswith ('cen' )):
410
- prefix , postfix = location [:3 ], location [3 :]
411
- if (postfix .isnumeric ()):
412
- region_num = int (postfix )
413
- if (region_num < 1 or region_num > 10 or (region_num == 10 and prefix == 'cen' )):
414
- raise Exception (loc_exception .format (location ))
415
- else :
416
- raise Exception (loc_exception .format (location ))
417
- elif (len (location ) < 2 or len (location ) > 3 ):
418
- raise Exception (loc_exception .format (location ))
419
-
420
- flu_exception = 'Flu-type parameters `{}` is invalid. Valid flu-type parameters are: ' \
421
- '`flu1`, `flu2`, `flu3`, `ili`, `flu2-flu1`, `flu3-flu2`, `ili-flu3`.'
422
- valid_flu_types = ['flu1' , 'flu2' , 'flu3' , 'ili' , 'flu2-flu1' , 'flu3-flu2' , 'ili-flu3' ]
423
- for flu_type in flu_types :
424
- if (not flu_type in valid_flu_types ):
425
- raise Exception (flu_exception .format (flu_type ))
426
-
427
- # Set up request
428
- params = {
429
- 'endpoint' : 'afhsb' ,
430
- 'auth' : auth ,
431
- 'locations' : Epidata ._list (locations ),
432
- 'epiweeks' : Epidata ._list (epiweeks ),
433
- 'flu_types' : Epidata ._list (flu_types )
434
- }
435
- # Make the API call
436
- return Epidata ._request (params )
437
-
438
- # Fetch AFHSB metadata
439
- @staticmethod
440
- def meta_afhsb (auth ):
441
- """Fetch AFHSB metadata."""
442
- # Check parameters
443
- if auth is None :
444
- raise Exception ('`auth` is required' )
445
- # Set up request
446
- params = {
447
- 'endpoint' : 'meta_afhsb' ,
448
- 'auth' : auth ,
449
- }
450
- # Make the API call
451
- return Epidata ._request (params )
452
-
453
397
# Fetch NIDSS flu data
454
398
@staticmethod
455
399
def nidss_flu (regions , epiweeks , issues = None , lag = None ):
0 commit comments