code: def author_impact_factor(self, year=2014, refresh=True):
          
          scopus_abstracts = self.get_journal_abstracts(refresh=refresh)
  
          cites = [int(ab.citedby_count) for ab in scopus_abstracts]
          years = [int(ab.coverDate.split('-')[0]) for ab in scopus_abstracts]
  
          data = zip(years, cites, scopus_abstracts)
          data = sorted(data, key=itemgetter(1), reverse=True)
  
          # now get aif papers for year-1 and year-2
          aif_data = [tup for tup in data if tup[0] in (year - 1, year - 2)]
          Ncites = sum([tup[1] for tup in aif_data])
          if len(aif_data) > 0:
              return (Ncites, len(aif_data), Ncites / float(len(aif_data)))
          else:
              return (Ncites, len(aif_data), 0)
docs: Get author_impact_factor for the .
  
          Parameters
          ----------
          year : int (optional, default=2014)
              The year based for which the impact factor is to be calculated.
  
          refresh : bool (optional, default=True)
              Whether to refresh the cached search file (if it exists) or not.
  
          Returns
          -------
          (ncites, npapers, aif) : tuple of integers
              The citations count, publication count, and author impact factor.