Category Archives: R Learning Curve

RClimate: Converting 5 Global Temperature Anomaly Series to A Common Baseline

The 5 global land-ocean temperature anomaly (LOTA) series use different baseline periods, making direct comparisons between the series more difficult than it would be if each series had the same baseline period.

This post shows how to convert the 5 major LOTA series to a common baseline. Links to on-line source data file and RClimate script are provided. Here is long term LOTA trends using a 133 month moving average and 1979-2008 baseline.

Click to enlarge

Continue reading

Mapping Temperature Anomalies with R: UPDATE 12/17/13

In this post I show how to map NASA GISS’s  2×2 degree temperature anomaly data using R mapping tools. Rather than rely on a single value to reflect monthly global temperature anomaly, this map shows the anomalies  in each of the 16,200 cells in a  2 degree lon/lat grid. This lets us see the details that make up the global mean, we can see which areas are warmer and which are cooler.  I provide a link to my RClimate script and data file so that interested R users can make their own maps.

Here’s my R Climate map of NASA’s July 2010 2×2 degree data set. (Click map to check out the enlargement )

Continue reading

RClimate Script: Pacific Decadal Oscillation Trend

This RClimate Script lets users retrieve and plot the monthly and moving average  Pacific Decadal Oscillation (PDO) data  from the University of Washington’s JISAO website. The script retrieves the PDO data from January, 1900 until latest month available at time script is run.  The trend chart shows the JISAO PDO trend and user selected moving average period.

Continue reading

Learn R Toolkit Update

My Learn R Toolkit  went on-line in April, 2009. I’m happy to announce that the 10,000th  file download benchmark was reached on October 30.

Here are a few comments that Learn R Toolkit users have submitted:

  • “… I think your instructional material is simply excellent. Your explanations are uncomplicated, unhurried and clear.”
  • “I’ve enjoyed your R tutorial series. Thank you. It was worth the $19.”
  • “You’ve given me some fishing poles to catch what I want to catch.”
  • “Your tutorials are a good starting point for learning about R. I’m interested in manipulating data … and find myself referencing your tutorials on different issues.”

All modules are free, so be sure  to check out my Learn R Toolkit for yourself.

CO2 Emission Trends

“Since 1751 approximately 329 billion [metric] tons of carbon have been released to the atmosphere from the consumption of fossil fuels and cement production. Half of these emissions have occurred since the mid 1970s. The 2006 global fossil-fuel carbon emission estimate, 8230 million metric tons of carbon, represents an all-time high and a 3.2% increase from 2005.” CDIAC

This is the 1st in a series of posts on CO2 emissions, CO2’s fate in the atmosphere and the long term climate and ocean impacts of these emissions.

In this 1st post, I use  CDIAC  CO2 emission data to prepare a trend chart and CSV file showing annual global CO2 emissions for  the period 1751-2006. The data and R script are available on-line as a Google spreadsheet and Google document  so that interested readers can easily download CSV files of the data and generate analysis and charts on their own in Excel, R or any software that will accept a CSV file.

Continue reading

Excel Chart Misrepresents CO2 – Temperature Relationship

This post reviews an Excel chart that misrepresents the CO2 – temperature anomaly relationship. The chart developer shows 2 time series on a single chart using Excel’s double Y axis capability. This is a poor charting technique which distorts the data. The developer makes things worse by only showing 15 years of data from a data set that stretches back over 100 years.

I have extended the data period to 1880 – 2008 and prepared  2 R based charts, a trend chart and a scatter plot of CO2 versus temperature anomaly.  My charts provide a more complete picture of the CO2 – temperature relationship than the original Excel chart.

Google document links to the data and R script files are provided so that readers can prepare their own  CO2 – temperature charts in R, Excel or other tools to assess the situation for themselves. Continue reading

Video To Help Excel Users Get Familiar With R

I’ve made a short (9 minute) video to help Excel users get familiar with R.  This video gives a quick overview of the R user interface, demonstrates an R session and walks through a short R chart script. This video is for those Excel users who have heard about R and would like to get a better feel for how it works and what its like.

Here’s  a link to my Getting Familiar video.

Let me know what you think.

Time Series Regression of Global Temperature, El Nino – LaNina, and Volcanic Events

In a previous post, I showed how to make a 3 panel chart displaying RSS temperature anomalies,  El Nino- La Nina (NINO34 index) and volcanic event (SATO Index) time series data.  While time series charts can give a visual impression of how time series are related, time series regression provides much more information, including leading – lagging relationships between the time series.

In this post, I analyze the RSS, NINO34 and SATO time series using a simple trend line and a multiple regression model with lag periods for the independent variables. The post demonstrates some of  R ‘s regression analysis and data lagging capabilities. Links to the R script and data files are provided.

Continue reading

R Panel Chart Beats Excel Panel Chart

In this post, I show how to make a 3 variable time series panel chart in R. As an Excel panel chart pioneer, I can tell you that it is very difficult and messy to produce this type of panel chart in Excel.  The example R panel chart uses R’s a step chart format for one plot and R’s vertical line  format for the other 2 plots. Several of R’s dynamic capabilities, not inherently available in Excel, are also used. No helper series are needed and the chart can easily be regenerated each month as new data is available.

Here’s The R Panel Chart

First, let’s take a look at the chart to see what’s so good about R charting.

rss_3_panel Continue reading

Showing Change Points in a Trend Chart with R

In this post, I show how to add change points to a trend chart with R. Readers can compare my R and Excel – VBA solutions for the same chart to compare R and Excel VBA charting programming. Continue reading