original_docstring: Calculates days from 2002-01-01 to January 1st of
          the year of the annual dataframe
  
          Args:
              dfr (dataframe): dataframe with annual burned data.
              Must have 'year' column, 'date' column with day of year,
              or datetime date. The function attempts to convert
              column 'date' to day of year, and failing this it is
              assumed that the 'date' column contains day of year.
              Must by passed data from a single year only for this to make sense.
  
          Returns:
              dfr (datafram): the same dateframe with added column
              'days_since' with total days from 2002-01-01 to the day of burn.
          
docstring: Calculates days from 2002-01-01 to January 1st of
  the year of the annual dataframe
  
  dfr (dataframe): dataframe with annual burned data.
  Must have 'year' column, 'date' column with day of year,
  or datetime date. The function attempts to convert
  column 'date' to day of year, and failing this it is
  assumed that the 'date' column contains day of year.
  Must by passed data from a single year only for this to make sense.
  
  dfr (datafram): the same dateframe with added column
  'days_since' with total days from 2002-01-01 to the day of burn.
docstring_tokens: Calculates days from 2002 - 01 - 01 to January 1st of the year of the annual dataframe dfr ( dataframe ) : dataframe with annual burned data . Must have ' year ' column ' date ' column with day of year or datetime date . The function attempts to convert column ' date ' to day of year and failing this it is assumed that the ' date ' column contains day of year . Must by passed data from a single year only for this to make sense . dfr ( datafram ) : the same dateframe with added column ' days_since ' with total days from 2002 - 01 - 01 to the day of burn .
code: def add_days_since(self, dfr):
          """Calculates days from 2002-01-01 to January 1st of
          the year of the annual dataframe
  
          Args:
              dfr (dataframe): dataframe with annual burned data.
              Must have 'year' column, 'date' column with day of year,
              or datetime date. The function attempts to convert
              column 'date' to day of year, and failing this it is
              assumed that the 'date' column contains day of year.
              Must by passed data from a single year only for this to make sense.
  
          Returns:
              dfr (datafram): the same dateframe with added column
              'days_since' with total days from 2002-01-01 to the day of burn.
          """
          year_date = pd.Timestamp('{0}-01-01'.format(dfr.year[0]))
          add_days = (year_date - self.base_date).days
          day_of_year = dfr.index.dayofyear
          dfr['day_since'] = day_of_year + add_days
          return dfr
code_tokens: def add_days_since ( self , dfr ) : year_date = pd . Timestamp ( '{0}-01-01' . format ( dfr . year [ 0 ] ) ) add_days = ( year_date - self . base_date ) . days day_of_year = dfr . index . dayofyear dfr [ 'day_since' ] = day_of_year + add_days return dfr
short_docstring: Calculates days from 2002-01-01 to January 1st of
  the year of the annual dataframe
short_docstring_tokens: Calculates days from 2002 - 01 - 01 to January 1st of the year of the annual dataframe
comment: """Calculates days from 2002-01-01 to January 1st of
          the year of the annual dataframe
  
          Args:
              dfr (dataframe): dataframe with annual burned data.
              Must have 'year' column, 'date' column with day of year,
              or datetime date. The function attempts to convert
              column 'date' to day of year, and failing this it is
              assumed that the 'date' column contains day of year.
              Must by passed data from a single year only for this to make sense.
  
          Returns:
              dfr (datafram): the same dateframe with added column
              'days_since' with total days from 2002-01-01 to the day of burn.
          """