Author Archives: Brad Horn
Renewable Energy and the Carbon Majors
The business case for renewable energy and CO2 reduction is changing as carbon tracking and court cases shift focus from carbon emitters to the ultimate producers of coal, oil and natural gas … to the “carbon majors.”
A 2013 study published in the journal Climatic Change cites 90 companies by name and responsible for 63% of human induced greenhouse gas emissions since the beginning of the industrial revolution. National industrial plans (NIPs) and energy companies from the US and Europe dominate the list with familiar names like ChevronTexaco, ExxonMobil, Saudi Aramco, British Coal, and RWE.
R Source Code
Source code access is one of the great benefits of R. Source code is available for base R and over 5,000 open source packages. There are many reasons to view source code: to know what software does when documentation is vague or incomplete; to combine code objects in custom scripts or libraries; and to change source code as needed. The following post defines the different types of R source code available and how to access R sources.
Qatar National Grid (QND95)
QND95 is a two dimensional coordinate reference system that is the standard for geographic mapping in Qatar. QND95 is intended for onshore activities only. QND95 provides up-to-date specs to calibrate surveying tools, GPS devices, GIS tools, and analysis activity. The coordinate reference system facilitates standardization and consistency across activities.
New Solar Technology – LCOE Roadmap Qatar
Bloomberg has released May 2014 PV Spot Prices with current module costs (COGS), margins and sales prices. This data is extended to profile the levelized cost of energy (LCOE) for solar PV technology, and is combined with new solar efficiency data to define the LCOE roadmap for solar energy in Qatar going forward.
Fast File Reads (fread) for Large Data
The standard way to read text files into R is to use the read.table() command. However, many users struggle with time delays when loading large data sets. An alternative command that offers significant speed improvements is fread(), or fast read, which can found in the data.table package. The following code loads a tab delimited file with a million elements and reveals that fread() reduces load time by almost 99%, as confirmed by the benchmark performance stats at left. The function is still under development, but it is available for download and doesn’t suffer from stability issues. Instead, expect argument structure and command syntax to change over time.
Setting Up A Scientific Programming Environment in Ubuntu
With language, we learn to listen and to speak. With literacy, we learn to read and to write. With programming, we learn how to use and to make software programs. Programming is the new literacy of the digital age. Scientific programming is an essential skill. It allows us to respond to new data structures and new technology, to expand Internet interfaces, to challenge common understandings or wisdom, and to access the control panels of machines and civilization.
Custom Beamer Template
Beamer is a document class that is by far the most practical tool for making presentations involving data science, business analytics, or general research. It is widely used in most conferences and easily lends itself to data intensive reporting and repetitive batch processing.
A custom beamer template is presented that is easy to extend or modify. The benefits of the beamer document are numerous:
Standard Atmosphere in R
Air Mass Coefficient
The air mass coefficient defines the path length (or column depth) of sunlight through the atmosphere. The air mass for dry air, wet air and dust are key inputs for estimating solar extinction and the irradiance intensity on the Earth’s surface. The air mass coefficient is a ratio between the path length for a specific zenith angle and the column depth when the zenith angle equals zero.
R Colors By Name
The R color table appears below. Downloaded here: R Colors By Name (1414 downloads) .
Qatar: Meteosat Solar Data
This is the second article in a series on Meteosat solar data from EUMETSAT. The intent is to define the basic parameters of meteorological data coverage for the State of Qatar. Specifically:
- Simple trigonometry is defined to assess the resolution of the satellite coverage area;
- A land surface analysis is conducted to visualize the geographic coordinates of the satellite pixels across the State of Qatar;
Binary Data In R
There are many reasons to work with binary data in R. Solar resource data, solar PV performance data, and real-time grid monitoring data are typically stored and transmitted in binary data formats.
In practice, the ability to access binary data in R is impossible in the absence of a vender or format specific “can opener” and a properly configured scientific programming environment. As a result, many business applications often bypass binary data use altogether or, instead, rely on secondary sources and summary statistics with no ability to validate data integrity and accuracy.
Solar Data Animation
A solar data animation is supplied to assess quality, spatial and time series dimensions:
- The quality dimension is a function of the availability of different sunlight components: Global Horizontal Irradiance (GHI), Direct Normal Irradiance (DNI), and Diffuse Horizontal Irradiance (DHI).
Correlation Plots in R
The standard function for correlation plots in R is pairs(), which generates a matrix of scatter plots based on all pairwise combinations of variables in a data object. The standard graph looks something like this after a little color enhancement:” Click to enlarge
The code behind this plot is simple:
1 2 3 4 |
pairs(iris[1:4], main = "Anderson's Iris Data", pch = 21, bg = c("red", "green2", "steelblue4")[unclass(iris$Species)]) |
R Syntax Highlighter
Pretty R is an online tool and r syntax highlighter that transforms R source code into HTLM code for website development. The result is easy to read R code for high quality web presentations. The Pretty R webpage is a good learning tool as it provides the HTML code details required to deliver syntax highlighting that complies with R documentation from inside-r.org.
“Hello Dolly!”
Test #1: Image Insert and Word Wrap
Test, test. This is a test … “Hello Dolly!” You are reading my first web posting with some basic tests
Word wrap: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duisaute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.