Blog Archives

Beyond Basic R – Mapping

August 15, 2018
By
Beyond Basic R – Mapping

Introduction There are many different R packages for dealing with spatial data. The main distinctions between them involve the types of data they work with — raster or vector — and the sophistication of the analyses they can do. Raster data can be thought of as pixels, similar to an image, while vector data consists of points, lines, or polygons....

Read more »

Exploring ggplot2 boxplots – Defining limits and adjusting style

August 9, 2018
By
Exploring ggplot2 boxplots – Defining limits and adjusting style

Boxplots are often used to show data distributions, and ggplot2 is often used to visualize data. A question that comes up is what exactly do the box plots represent? The ggplot2 box plots follow standard Tukey representations, and there are many references of this online and in standard statistical text books. The base R function to calculate the box...

Read more »

Beyond Basic R – Plotting with ggplot2 and Multiple Plots in One Figure

August 8, 2018
By
Beyond Basic R – Plotting with ggplot2 and Multiple Plots in One Figure

R can create almost any plot imaginable and as with most things in R if you don’t know where to start, try Google. The Introduction to R curriculum summarizes some of the most used plots, but cannot begin to expose people to the breadth of plot options that exist.There are existing resources that are great references for plotting in...

Read more »

Beyond Basic R – Data Munging

July 31, 2018
By
Beyond Basic R – Data Munging

What we couldn’t cover In the data cleaning portion of our Intro to R class, we cover a variety of common data manipulation tasks. Most of these were achieved using the package dplyr, including removing or retaining certain columns (select), filtering out rows by column condition (filter), creating new columns (mutate), renaming columns (rename), grouping data by categorical variables (group_by),...

Read more »

Beyond Basic R – Introduction and Best Practices

July 29, 2018
By

We queried more than 60 people who have taken the USGS Introduction to R class over the last two years to understand what other skills and techniques are desired, but not covered in the course. Though many people have asked for an intermediate level class, we believe that many of the skills could be best taught through existing online...

Read more »

Maps with inlmisc

July 16, 2018
By
Maps with inlmisc

Introduction This document gives a brief introduction to making static and dynamic maps using inlmisc, an R package developed by researchers at the United States Geological Survey (USGS) Idaho National Laboratory (INL) Project Office. Included with inlmisc is a collection of functions for creating high-level graphics, such as graphs, maps, and cross sections. All graphics attempt to adhere to the formatting standards for illustrations in USGS publications. You...

Read more »

Daily Streamflow Trend Analysis

May 28, 2018
By
Daily Streamflow Trend Analysis

Introduction This document describes how to produce a set of graphics and perform the associated statistical tests that describe trends in daily streamflow at a single streamgage. The trends depicted cover the full range of quantiles of the streamflow distribution, from the lowest discharge of the year, through the median discharge, up through the highest discharge of the year. The...

Read more »

Groundwater levels across US affected by Mexico earthquake

September 11, 2017
By
Groundwater levels across US affected by Mexico earthquake

What happened? A magnitude 8.1 earthquake was measured in the Pacific region offshore Chiapas, Mexico at 04:49:21 UTC on September 8th 2017. Working in the Water Mission Area for the USGS, our Data Science Team was already hard at work polishing up water visualizations for the devastating Hurricane Harvey, as well as creating a new visualization for Hurricane Irma. That is...

Read more »

The Hydro Network-Linked Data Index

April 30, 2017
By
The Hydro Network-Linked Data Index

Introduction The Hydro Network-Linked Data Index (NLDI) is a system that can index data to NHDPlus V2 catchments and offers a search service to discover indexed information. Data linked to the NLDI includes active NWIS stream gages, water quality portal sites, and outlets of HUC12 watersheds. The NLDI is a core product of the Open Water Data Initiative and is...

Read more »

The National Map Base Maps

April 11, 2017
By

A number of map services are offered through The National Map (TNM). There are no use restrictions on these services. However, map content is limited to the United States and Territories. This post explains how to integrate TNM services within your own interactive web map using Leaflet for R. R packages required for this tutorial include leaflet, rgdal, and dataRetrieval. Install the required packages from the Comprehensive R...

Read more »

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)