566 search results for "spatial"

mapView: basic interactive viewing of spatial data in R

July 24, 2015
By
mapView: basic interactive viewing of spatial data in R

Working with spatial data in R I find myself quite often in the need to quickly visually check whether a certain analysis has produced reasonable results. There are two ways I usually do this. Either I: (sp)plot the data in … Continue reading →

Read more »

MazamaSpatialUtils — Ebola Map Example

July 14, 2015
By
MazamaSpatialUtils — Ebola Map Example

This entry is part 16 of 16 in the series Using R The MazamaSpatialUtils package on CRAN has just been updated with additional shape file conversion scripts and location buffering so that points located just outside of polygons (i.e. coastal …   read more ...

Read more »

Stop and Frisk: Spatial Analysis of Racial Discrepancies

June 23, 2015
By
Stop and Frisk: Spatial Analysis of Racial Discrepancies

In my last post, I compiled and cleaned publicly available data on over 4.5 million stops over the past 11 years. I also presented preliminary summary statistics showing that blacks had been consistently stopped 3-6 times more than whites over the last decade in NYC. Since the last post, I managed to clean and reformat the … Continue reading...

Read more »

Plotting spatial neighbors in ggmap

June 15, 2015
By
Plotting spatial neighbors in ggmap

The R package spdep has great utilities to define spatial neighbors (e.g. dnearneigh, knearneigh, with a nice vignette to boot), but the plotting functionality is aimed at base graphics. If you’re hoping to plot spatial neighborhoods as line segments in ggplot2, or ggmap, you’ll need the neighborhood data to be stored in a data frame. So, to...

Read more »

MazamaSpatialUtils Package

February 11, 2015
By
MazamaSpatialUtils Package

This entry is part 15 of 15 in the series Using RMazama Science has just released its first package on CRAN — MazamaSpatialUtils. Here is the description: A suite of conversion scripts to create internally standardized spatial polygons dataframes. Utility …   read more ...

Read more »

Spatial, age and sex structured population simulation in R with arrays

January 22, 2015
By

In this post I’ll outline why and how I use arrays as the main data structure in a population simulation which represents the age, sex and spatial location of tsetse flies in the landscape. An earlier post outlines the background to this tsetse population simulation. I wanted a data structure that would make it easy and transparent for me...

Read more »

Spatial visualization with R – Tutorial

December 10, 2014
By
Spatial visualization with R – Tutorial

The visualization of spatial data is one of the most popular applications when using R. This tutorial is an introduction to the visualization of spatial data and map making in R. The following issues will be addressed: Import anduse of shapefiles in R (shapefile is a file format designed for spatial data). Data management and

Read more »

Spatial data extraction around buffered points in R

November 8, 2014
By

Quantifying spatial data (e.g. land cover) around points can be done in a variety of ways, some of which require considerable amounts of patience, clicking around, and/or cash for a license. Here’s a bit of code that I cobbled together to quickly extract land cover data from the National Land Cover Database for buffered regions around points (e.g....

Read more »

Spatial data extraction around buffered points in R

November 8, 2014
By

Quantifying spatial data (e.g. land cover) around points can be done in a variety of ways, some of which require considerable amounts of patience, clicking around, and/or cash for a license. Here’s a bit of code that I cobbled together to quickly extract land cover data from the National Land Cover Database for buffered regions around points (e.g. small...

Read more »

Generating Hurricanes with a Markov Spatial Process

September 30, 2014
By
Generating Hurricanes with a Markov Spatial Process

The National Hurricane Center (NHC) collects datasets with all  storms in North Atlantic, the North Atlantic Hurricane Database (HURDAT). For all sorms, we have the location of the storm, every six jours (at midnight, six a.m., noon and six p.m.). Note that we have also the date, the maximal wind speed – on a 6 hour window – and...

Read more »