Functions

Simple data analysis routine for science.

This is a module/file level docstring.

data_analysis.data_analysis.download_data(location)

downloads temperature data anomaly from Berkeley Earth for a given location

Parameters:location (str) – name of the region
Returns:data table
Return type:2D numpy float array
data_analysis.data_analysis.extract_monthly_anomaly(data)

Extract the monthly anomaly from the data array and calculate a decimal year.

Parameters:data (1D numpy float array) – raw data
Returns:decimal year
Return type:1D numpy float array
Returns:anomaly
Return type:1D numpy float array
data_analysis.data_analysis.moving_avg(data, width)

calculates moving average of temperature anomaly data

Parameters:
  • data (temperature data) – 1D numpy float array
  • width (int) – half-width of the moving window used for averaging
Returns:

averaged data

Return type:

1D numpy float array