Subject ▸ R

R and Python commingled: how to get the best of both worlds. Season 1, Episode 1

I confess. I have been in a long term relationship with … Python. Sometimes feels like 10+ years- other times like 15+ years, if I count my sporadic adventures with the language. Few years ago, I finally dared to explore other universes, and took the #rstats R route. I don’t regret it at all. It has been years of full productivity, challenges in learning the language, discovering its strong publishing tools (blogdown, bookdown, pkgdown, and the king of all: Rmarkdown), its science-oriented ecosystem, and, of course, making discoveries from data.

Read More…

The fabrication of an artificial intelligence agent for reservoir history matching from the Volve dataset

Introduction History matching is one of the core activities performed by petroleum engineers to decrease the uncertainty of reservoir models. By comparing real data -production data gathered at the surface-, with the output from a reservoir simulator, the engineer starts filling in the gaps in reservoir properties of those block cells in the model. And this what makes it so interesting in data science, and ultimately, in the fabrication or construction of an artificial intelligence agent.

Read More…

Customizing Rob Hyndman template

Just made changes in Rob Hyndman template to adapt to my new static website.

For what things R programming language is better than Python?

I used and wrote Python applications for more than 10 years. Then, I started to use R for my data science projects in Petroleum Engineering. I know Python quite well, being one its major weaknesses multiple versions of Python floating around and packages with no “adult” supervision. Anyway, after 2 years of R experience (far too short if you compare it with that of the R experts), this is my take on what makes R better than Python:

Read More…

An Artificial Lift Method Selector for Petroleum Engineering written in R

Introduction Inspired by a post by Fernando Ruiz at LinkedIn on an Artificial Lift tool this morning, I decided to dust off an old Excel workbook containing an old matrix with various design aspects of artificial lift. Motivation The objective of the tool is providing a quick way of analyzing the applicability of the different artificial lift methods. At present, it is not a rigorous application because the criteria is limited by the engineer’s bias.

Read More…

Is R as versatile as Python?

The short answer is no. R is not a versatile as Python. R is a comprehensive statistical, mathematical and scientific tool. Its learning curve could be daunting and intimidating but the effort pays if you deal with data every day. Python and R are not in the same league either. While Python is a generic developing and prototyping tool, R focus is narrower, focusing on providing sciences and engineering with well thought data analytics functions and packages.

Read More…

Building your own petroleum engineering library with R: zFactor v0.1.7

Introduction I just released last night a new version of zFactor: v0.1.7. As of this morning, the package has been accepted by CRAN, the Comprehensive R Network Archive. All the code, notes, datasets, notebooks, documentation is publicly available via GitHub at this link. The zFactor R package also includes its own website: https://f0nzie.github.io/zFactor/ Motivation That is one of the neat things about R: the code and documentation that you write for your package can also be used for automatically generating a website in GitHub.

Read More…

Data Science for Petroleum Engineering - Part 5.2: Finding and filling missing data

NOTE. You can find the PDF version of the R markdown notebook in GitHub at this link. The reproducible R markdown notebook (.Rmd) itself is here. Both are full versions of this LinkedIn article. For the time being, LinkedIn publishing does not support markdown which would make sharing scientific and engineering documents much easier. Mistyped data One of the challenges in cleaning up well data is having uniform and standard well names.

Read More…

Data Science for Petroleum Engineering - Part 5: "Transforming Excel well raw data into datasets.​"

One of the big challenges of this new era of data science. machine learning and artificial intelligence is getting unhooked from the habit of working with spreadsheets. They have been around for 30+ years and were awesome. But spreadsheets - or worksheets - do not scale well with massive amounts of data; or continuous streams of data; or other characteristics that are key for taking good and sound decisions such as reproducibility.

Read More…

Data Science for Petroleum Engineering - Part 5.1: Data Introspection with R

NOTE. You can find the PDF version of the R markdown notebook in GitHub at this link. The reproducible R markdown notebook (.Rmd) itself is here. Both are full versions of this LinkedIn article. For the time being, LinkedIn publishing does not support markdown which would make sharing scientific and engineering documents much easier. Transforming Excel well raw data into datasets This section is about getting familiar with our data.

Read More…