Skip to main content

Glossary

Key terms used in this book. In the chapters, a term with a dotted underline shows its definition when you hover over it, tap it, or reach it with the Tab key.

1-year estimates
ACS estimates from 12 months of responses. They are the most current but are only published for areas of 65,000 people or more.
5-year estimates
ACS estimates that pool 60 months of responses. They are the most reliable ACS product and the only one for tracts and block groups. An estimate labeled 2022 describes 2018 to 2022.
accessibility
How easily people can reach a service, such as a clinic, given the distance or travel time, how many providers there are, and how many people need them.
active sensor
A sensor that sends out its own signal and measures what comes back, such as radar or lidar.
adjusted R-squared
R-squared lowered a little for each independent variable, so adding useless variables can’t make a model look better. Use it to compare models.
aesthetic
A visual property of a mark, such as its x position, y position, color, fill, size, or shape. In ggplot2, aes() connects columns to aesthetics.
alternative hypothesis
The claim that there is a difference or relationship, such as “at least one group mean differs”.
American Community Survey (ACS)
The Census Bureau’s continuous survey of a sample of households every year. It asks many more questions than the decennial census, but every value is an estimate with a margin of error.
ANOVA
Analysis of variance: a statistical test of whether the averages of three or more groups differ, such as median age in three regions. It compares variation between groups with variation within them.
API
Application Programming Interface: a set of rules for how one program asks another for data or services, such as your R script asking the Census Bureau’s server for a table.
API key
A private code that identifies you to an API. Store it in .Renviron, never in a script you share.
apportionment
Dividing the seats in the House of Representatives among the states by population, the reason the Constitution requires a census.
ArcGIS Online
Esri’s systems for publishing and sharing maps and GIS layers on the web. Many agencies’ data portals run on them.
arcpullr
An R package that downloads layers from ArcGIS REST services as sf objects, with get_spatial_layer().
argument
An input to a function, written inside its parentheses.
ascending order
Smallest to largest for numbers, A to Z for text. arrange() sorts in ascending order unless you wrap the column in desc().
assignment operator
<-, the arrow that stores the value on its right in the name on its left. Read x <- 5 as “x gets 5.”
attribute
A non-spatial fact about a spatial feature, such as a tree’s species or a building’s year built. Attributes are the columns of a layer’s attribute table.
attribute join
A join that matches rows using a shared key column.
Average Nearest Neighbor ratio
The observed mean distance from each point to its nearest neighbor divided by the mean expected at random. Below 1 is clustered.
azimuthal
Describes a projection that preserves direction from a center point. Also called planar.
bar chart
A chart that compares counts or amounts across categories with bars. geom_bar() counts rows for you; geom_col() draws heights you give it.
basemap
A background map of streets, places, or imagery, loaded from the web as tiles, that your own data are drawn on top of.
benchmark
A surveyed point marked on the ground, often by a brass disk, whose position is precisely known. Datums are made real by thousands of them.
big data
Data too large, fast, or varied for ordinary tools, often described by three Vs: volume, velocity, and variety.
bimodal
Having two peaks. It often means two different groups are mixed together.
bin width
The width of each bar in a histogram. Too narrow shows noise; too wide hides detail.
binary weights
Neighbor weights of 1 for a neighbor and 0 for everything else.
block (of code)
Lines of code inside curly braces, { }, that R runs as one unit. if statements, loops, and functions each control a block.
block group
A group of census blocks, usually holding 600 to 3,000 people. It is the smallest geography with ACS 5-year estimates.
block of code
Several lines of code that work together on one task, like the steps of one recipe. In R Markdown, a block usually lives in one code chunk.
Boolean
Another name for logical (TRUE or FALSE) values, after the mathematician George Boole.
boxplot
A chart that summarizes a distribution: the box spans the middle half of the values, a line marks the median, and dots beyond the whiskers are outliers.
camelCase
A way of naming variables that joins words and capitalizes every word after the first, as in popChapelHill.
cardinality
How many rows in one table can match a row in another: one-to-one, one-to-many, many-to-one, or many-to-many.
case-sensitive
Treating capital and lowercase letters as different. In R, Months and months are two different names.
cell
One square of a raster’s grid. Each cell holds exactly one value.
cell size
The length of one side of a raster cell in real-world units, such as 30 m. It is the raster’s resolution.
census block
The smallest Census geography, often a single city block bounded by streets or other visible features. Only decennial census data are published for blocks.
census tract
A small area of about 1,200 to 8,000 people (4,000 on average), drawn to be fairly stable over time. The workhorse unit for neighborhood analysis.
central feature
The existing feature with the smallest total distance to all the others: the spatial counterpart of the median.
central tendency
One value that describes the center of a set of values: the mean, median, or mode.
centroid
The geometric center of a polygon. st_centroid() in R.
change detection
Comparing images of the same place from different dates to find what changed.
character
The data type for text, also called strings. Character values always go inside quotation marks, as in "Chapel Hill".
cheatsheet
A one-page summary of a package or tool. Posit publishes them for dplyr, ggplot2, RStudio, and more.
choropleth map
A map that shades areas, such as counties or buildings, by the value of a variable.
classification
Dividing a numeric variable into a few classes for a map, by choosing how many classes there are and where the breaks between them fall.
Cloud Optimized GeoTIFF (COG)
A GeoTIFF arranged in tiles with zoomed-out copies, so software can read only the area and detail it needs.
clustering
Methods that find groups of similar observations, or groups of places with similar values that sit close together.
code chunk
A block of R code inside an R Markdown file, starting with ```{r} and ending with three backticks.
coefficient
A number a regression estimates: the intercept, or the slope for each independent variable.
coefficient of variation (CV)
The standard error as a percentage of the estimate. A CV above about 30% is a common sign that an estimate is unreliable.
coercion
R converting values from one data type to another. Mixing types in one vector coerces them all to the type that can hold everything, usually character.
cold spot
An area of low values surrounded by low values: a large negative Gi* z-score.
colon operator
:, which makes a sequence of whole numbers: 6:8 is c(6, 7, 8).
comment
A note for people that R ignores. In R, a comment starts with #.
comparison operator
An operator that compares two values and returns TRUE or FALSE: >, <, >=, <=, == (equal to), and != (not equal to).
compiler
A program that translates a whole program into machine code before any of it runs. C and Java are compiled; R is interpreted.
complete spatial randomness
Points or values placed entirely at random, the baseline that spatial pattern and autocorrelation statistics compare against.
compromise projection
A projection, such as Robinson, that preserves no property exactly but keeps every distortion moderate.
confidence interval
A range that is likely to contain the true value of something estimated from data. geom_smooth() shades a 95% confidence interval around its trend line.
confidence level
How sure you can be that the true value lies within a range. The ACS uses a 90% confidence level for its margins of error.
conformal
Describes a projection that preserves local shapes and angles, such as Mercator or Lambert Conformal Conic.
Console
The RStudio pane (bottom left) where R runs commands and prints results, warnings, and errors. Nothing typed here is saved.
contiguity
Sharing a border. Contiguity neighbors are polygons that touch, by the rook or queen rule.
continuous data
Data with a value everywhere on the map that changes from place to place, such as elevation or temperature.
continuous weights
Neighbor weights that vary, usually falling with distance, so closer neighbors count more.
coordinate system
The rules that tie coordinates to places on the Earth, including how the round Earth is flattened onto a map (the projection). Layers must share a coordinate system before you can combine them.
correlation
Whether two variables move together. It doesn’t say how much one changes with the other, or which causes which.
correlation coefficient
r, from −1 to 1: how closely two variables follow a straight line, and in which direction. cor() in R.
CORS
Continuously Operating Reference Stations: permanent GPS stations across the US that the National Geodetic Survey uses to maintain NAD83.
CRAN
The Comprehensive R Archive Network: the official website for downloading R and most R packages.
cross join
A join that pairs every row of one table with every row of the other. cross_join() in dplyr.
crosstalk
An R package that links htmlwidgets in one HTML file, so a filter or selection in one updates the others, with no Shiny.
CSV
A plain-text table in which each line is a row and commas separate the values. Read one into R with read.csv() or read_csv().
dashboard
A web page that shows key information on one screen, usually as several linked, interactive views such as a map, charts, a table, and headline numbers.
data abstraction
The process of making the real world readable by a computer: from reality, to a data model, to a data structure, to machine code.
data frame
R’s table: rows are observations and columns are variables. A tibble is the tidyverse’s version of a data frame.
data model
A formal way of representing geographic information in a computer, deciding which objects and properties to keep. Vector and raster are the two main ones.
data science workflow
The steps of a data analysis: import, tidy, then a loop of transform, visualize, and model, and finally communicate.
data structure
How a data model is actually laid out in memory or on disk, such as lists of coordinates and tables.
data type
The kind of value R is storing. The four main atomic types are logical, integer, numeric, and character; class() tells you which you have.
datum
A model that fixes an ellipsoid to the real Earth, so that a latitude and longitude point to one place on the ground. NAD83 and WGS84 are datums.
debugging
Finding and fixing the mistakes (bugs) in code: read the error message, find the line, make a guess, and test it.
decennial census
The full count of everyone in the US, every ten years. It asks only a few questions but covers every person.
decimal degrees
Coordinates written as signed decimal numbers, such as −79.05°. Negative means south latitude or west longitude.
default value
The value an argument takes when you don’t supply one, set with = in the function definition: function(x, factor = 1.609).
degrees of freedom
The number of values free to vary in a calculation. In ANOVA, k − 1 between groups and N − k within them.
degrees, minutes, and seconds
Coordinates written as whole degrees, minutes (1/60 of a degree), and seconds (1/3,600 of a degree), with a letter N, S, E, or W, such as 79° 3′ 21″ W.
delimiter
The character that separates values in a text file of data, such as a comma in a CSV file or a tab.
Demographic and Housing Characteristics (DHC)
The 2020 census product with more detailed tables on age, sex, households, and housing than the redistricting data.
denominator
The number you divide by to turn a count into a share, usually the total of the same table, such as total population.
density plot
A smoothed histogram whose total area is 1. geom_density() in ggplot2.
dependent variable
The outcome a model explains, y. It goes on the left of the ~ in an R formula.
descending order
Largest to smallest for numbers, Z to A for text. Ask arrange() for it with desc(), as in arrange(desc(dep_delay)).
destination table
In a join, the table that receives new columns: x in st_join(x, y).
differential privacy
Carefully calibrated random noise added to published 2020 census tables to protect respondents’ privacy. It matters most for small areas such as blocks.
DIKW pyramid
Data, information, knowledge, wisdom: four levels, each built on the one below, from raw facts to judging what is true and right.
discrete object
Something that exists in one place and not another, with clear edges, such as a road, a house, or a state.
dispersion
How spread out values are around their center, measured by the range, interquartile range, or standard deviation.
distance band
A neighbor definition: every feature within a set threshold distance is a neighbor. dnearneigh() in spdep.
distance decay
Interaction between places falls as the distance between them grows, because crossing distance costs time, money, or effort.
distance-decay parameter
The power x in inverse distance weights, 1 / d^x. Larger values make weights fall off faster.
distribution
How a variable’s values are spread out: where they are common, where they are rare, and the shape that makes.
dpi
Dots per inch: the resolution of a saved image. 300 dpi is print quality.
dplyr
The tidyverse package for transforming data frames: filtering rows, choosing columns, adding new columns, joining tables, and summarizing.
dynamic data
Data that are continually updated, so the same request may return different data later. Static data are a fixed snapshot.
edge effect
Features near the edge of a study area get too few neighbors because the data stop at the boundary.
Editor
The RStudio pane (top left) where you write and save scripts and R Markdown files. Code here can be kept and run again.
ellipsoid
A sphere flattened at the poles: the smooth mathematical shape used to model the Earth, defined by its semi-major and semi-minor axes.
emerging hot spot analysis
Running a hot spot statistic, such as Gi*, for every time step and classifying each location’s trend: new, intensifying, persistent, or diminishing.
endpoint
The web address of one dataset or service in an API, such as https://api.census.gov/data/2022/acs/acs5.
entity
A real-world object or thing we want to record, such as a tree, a building, or a lake.
Environment
The RStudio pane (top right) that lists the variables and data currently in memory.
environmental justice
The fair sharing of environmental burdens, such as pollution, and benefits, such as parks, across communities, whatever their race or income.
EPSG code
A number that identifies a coordinate reference system in a public registry, such as 4326 for WGS84 latitude and longitude.
equal intervals
A classification method that makes every class cover the same range of values.
equal-area
Describes a projection that preserves area, such as Albers or Mollweide. No projection is both equal-area and conformal.
Equator
The circle halfway between the North and South Poles: 0° latitude.
equidistant
Describes a projection that preserves distance from one point, or along chosen lines.
Euclidean distance
Straight-line distance, from the Pythagorean theorem. Use it only with projected coordinates.
exploratory data analysis (EDA)
Learning what is in a dataset, with summaries and plots, before trying to explain or predict anything with it.
exploratory spatial data analysis (ESDA)
EDA that also asks how values vary across space, using maps, spatial autocorrelation, and clustering.
extent
The area a map or a layer covers, from its westernmost to easternmost and southernmost to northernmost points.
extrapolation
Using a model to predict outside the range of the data it was fitted to. The relationship may not hold there.
F distribution
The values of F you’d expect if the null hypothesis were true. Its shape depends on two degrees of freedom. pf() in R.
F statistic
ANOVA’s test statistic: the variance between groups divided by the variance within groups. Near 1 if the groups don’t differ.
feature
One spatial object in a layer of data, such as one tree, one sidewalk segment, or one building. In an sf object, each row is a feature.
feature service
A layer published on an ArcGIS server whose features and attributes can be requested through its REST endpoint.
FGDC
The Federal Geographic Data Committee, whose metadata standard US federal agencies follow. Internationally, the standard is ISO 19115.
file path
The location of a file on your computer, such as data/counties.csv. When you knit, paths are read relative to the folder the .Rmd file is saved in.
FIPS code
A standard numeric code for a state or county (Federal Information Processing Standards). North Carolina is 37.
first law of geography
Waldo Tobler’s statement that “everything is related to everything else, but near things are more related than distant things.” It is the idea behind spatial autocorrelation.
flattening
How much an ellipsoid is squashed: (a − b) / a, where a and b are the semi-major and semi-minor axes. About 1/298 for the Earth.
flexdashboard
An R package that lays out an R Markdown file as a dashboard of columns or rows of panels, with an optional sidebar.
for loop
A loop that runs its block once for each item in a vector, such as for (f in files) { ... }, then stops.
full join
A join that keeps every row of both tables, with NA wherever there is no match. full_join() in dplyr.
function
Code that takes inputs (arguments), does a job, and returns an output, such as mean(temps).
generalization
Simplifying features when a map shows a place at a smaller scale, for example drawing a city as a point instead of an area.
GeoAI
Artificial intelligence methods, such as deep learning, applied to spatial data, for example to find buildings in satellite images.
geocoding
Turning an address or place name into coordinates that can be mapped.
geodesy
The science of measuring the Earth’s size, shape, orientation, and gravity. Every coordinate rests on a geodetic model of the Earth.
geographic variation
The change in a phenomenon from place to place, such as income from county to county.
GEOID
The unique ID of a Census area, made by stringing together the FIPS codes of each level, such as 37135 for Orange County, NC. Keep GEOIDs as text, and join tables on them.
geoid (shape of the Earth)
The lumpy shape of the Earth defined by gravity, roughly where mean sea level would be. Ellipsoids are smooth approximations of it.
GeoJSON
An open, plain-text format for vector features, written in JSON. Coordinates are longitude first, then latitude, in WGS84.
geom
Short for geometric object: the marks a ggplot draws to show the data, such as points (geom_point()), bars (geom_bar()), or boxes (geom_boxplot()).
geometry column
The column of an sf object that holds each feature’s shape: a point, a line, or a polygon.
geospatial foundation model
A large AI model pretrained on huge image archives that can be fine-tuned for many tasks, such as mapping floods, with little labeled data.
GeoTIFF
The standard file format for raster data: a TIFF image with its location and coordinate system stored inside the file.
Getis-Ord Gi*
A local statistic that gives each observation a z-score: large positive for hot spots, large negative for cold spots.
ggplot2
The tidyverse package for making plots and maps by adding layers.
GISP
Geographic Information Systems Professional: a certification from the GIS Certification Institute for experienced GIS practitioners.
global environment
Your main R workspace, where the variables you create at the Console or in a script live. Functions don’t change it unless you assign their result.
global statistic
A statistic that gives one value for a whole study area, such as Moran’s I. It doesn’t say where clusters are.
grammar of graphics
The idea that any chart can be described with the same small set of parts: data, aesthetic mappings, geoms, scales, facets, and coordinates. ggplot2 is built on it.
graticule
The network of parallels and meridians drawn on a map or globe.
great circle distance
The shortest distance between two points along the Earth’s curved surface. Use it for longitude and latitude.
grouped data frame
A data frame made by group_by(). It looks the same, but later verbs work on each group separately until you call ungroup().
haversine formula
A formula for great circle distance that stays accurate for very short distances.
header
The first line of a data file, when it holds the column names.
help page
A function’s documentation, opened with ?name or help(name). Every help page has a Description, Usage, Arguments, and Examples.
hex code
A six-character code for a color, such as #3182bd: two characters each for its red, green, and blue.
histogram
A chart that divides a variable’s range into bins and draws a bar for how many values fall in each. geom_histogram() in ggplot2.
hotspot
A cluster of places with unusually high values, such as a group of neighborhoods with many burglaries. Finding hotspots is a common goal of spatial analysis.
htmlwidgets
R functions, such as those in leaflet, DT, and plotly, that produce JavaScript, so their interactivity runs in the browser with no R.
HTTP
The protocol web browsers and servers use to talk. A GET request reads data; a POST request sends data.
httr2
An R package for building, sending, and reading web (HTTP) requests, used to call an API by hand.
if statement
Code that runs a block only when a test is TRUE: if (x < 5) { ... }. Add else { ... } for when it is FALSE.
image classification
Assigning each pixel of an image a land cover class, such as forest, water, or developed land.
independence
The assumption, built into most standard statistics, that knowing one observation tells you nothing about another. Data about places usually break it, because nearby places tend to be alike.
independent variable
A variable used to explain the dependent variable, x. It goes on the right of the ~.
indexing
Selecting part of a vector or data frame with square brackets: by position (vect[3]), by a condition (vect[vect > 10]), or by name (vect["Fozzie"]).
infinite loop
A loop that never ends because its test never becomes FALSE. Stop it with Esc or RStudio’s red stop sign.
inner join
A join that keeps only the rows whose key appears in both tables. inner_join() in dplyr.
input (in Shiny)
A control, such as a drop-down menu or checkboxes, that collects a reader’s choice. Its value is read as input$id.
integer
The data type for whole numbers. R stores a typed number as numeric unless you add an L, as in 21L. Shown as <int> by glimpse().
integrated development environment (IDE)
A program that puts everything for writing code in one window: an editor, a place to run the code, and tools to inspect the results.
interactive map
A web map you can pan, zoom, and click to see each feature’s attributes. tmap makes one in view mode.
intercept
The predicted value of y when every x is 0: where the regression line crosses the y axis.
interpreted language
A language, like R, that runs code one line at a time: an interpreter reads each line, translates it, and runs it before moving on.
interquartile range (IQR)
Q3 minus Q1: the spread of the middle half of the data. Outliers barely affect it. IQR() in R.
inverse distance weights
Neighbor weights of 1 / d^x, so a neighbor’s weight falls as its distance grows.
isochrone
A line, or area, of equal travel time from a place, such as everywhere within a 15-minute drive of a hospital.
Jenks natural breaks
A way of dividing values into map classes that puts the breaks where the gaps between values are largest, so similar values share a color.
join
Combining two tables by matching rows on a shared key column, such as attaching Census data to boundaries by GEOID with left_join().
JSON
JavaScript Object Notation: structured text that most web APIs send back, which R can turn into lists or data frames.
k nearest neighbors
A neighbor definition: each feature’s neighbors are the k features closest to it. Every feature gets exactly k.
key
The column whose values are matched to line up rows in a join, such as a student ID or a county FIPS code.
KML
Keyhole Markup Language: the XML-based format behind Google Earth. A .kmz file is a zipped KML file.
knit
To build an R Markdown file into a finished document (HTML, PDF, or Word). Knitting reruns every code chunk from the top in a fresh R session.
Kruskal-Wallis test
A test of whether three or more groups differ, using ranks instead of values, so it doesn’t need normal data. kruskal.test() in R.
label (in leaflet)
Text that appears when the reader hovers over a feature on a leaflet map.
latitude
The angle north or south of the Equator, from 0° to 90°. Lines of equal latitude are parallels.
layer
One piece of a plot or map, added with + and drawn on top of the layers before it. In GIS, a layer holds one theme of features, such as roads or soils.
layer ID
The number at the end of an ArcGIS layer’s URL, such as the 2 in .../MapServer/2, that picks one layer out of a service.
leaflet
An R package (and JavaScript library) for interactive web maps, built in layers joined with the pipe.
left join
A join that keeps every row of the first (left) table, with NA where the second table has no match. left_join() in dplyr.
legend
The key that explains what the colors, sizes, or shapes on a plot or map mean. ggplot2 and tmap build one for every mapped aesthetic.
library
The folder on your computer where installed packages are stored. You install packages into a library, then load them with library().
lidar
An active sensor that measures distance with laser pulses, to build detailed 3D models of terrain, buildings, and trees.
line of best fit
The straight line that comes closest to the points in a scatterplot: a regression’s estimate of y for each x.
line segment
The straight piece of a line between two vertices.
linear model
A model in which y is a straight-line function of the x variables. lm() in R.
linked views
Maps, charts, and tables that respond to each other, so filtering or selecting in one updates the others.
local environment
The private workspace R makes each time a function runs. Its arguments and variables live there and vanish when it finishes.
local Moran’s I
Moran’s I calculated for each observation, to find clusters and outliers. localmoran() in spdep.
local statistic
A statistic calculated for each observation from its neighbors, such as Gi*, so its results can be mapped.
location intelligence
The business use of spatial data and analysis, for site selection, routing, market areas, and real estate.
location–allocation
A method that chooses which of several candidate sites to use, such as for fire stations, so that they minimize travel or serve the most people.
logical
The data type for TRUE and FALSE values, written in capitals with no quotation marks.
logical operator
An operator that combines TRUE and FALSE values: & (AND, both must be true), | (OR, either can be true), and ! (NOT).
logical vector
A vector of TRUE and FALSE values, such as the result of vect > 10. Inside square brackets it keeps the TRUE positions.
longitude
The angle east or west of the Prime Meridian, from 0° to 180°. Lines of equal longitude are meridians.
loop variable
The variable in a for loop that takes the next item of the vector on each pass, such as f in for (f in files).
Manhattan distance
Distance along a grid of streets: the horizontal plus the vertical difference, never shorter than the straight line.
many-to-many
A relationship where rows on both sides can match many rows, such as students and classes. Joins like this multiply rows.
many-to-one
A relationship where many rows match one row in the other table, such as cities and their state.
map projection
A method for flattening the curved graticule onto a flat map. Every projection distorts shape, area, distance, or direction.
map scale
The ratio of a distance on the map to the same distance on the ground. A large-scale map (1:10,000) shows a small area in detail; a small-scale map (1:10,000,000) shows a large area with little detail.
mapping an aesthetic
Tying an aesthetic to a column, inside aes(), as in aes(color = origin). The look of each mark then comes from the data, and ggplot2 adds a legend.
margin of error (MOE)
How far a sample estimate might be from the true value. ACS margins of error use a 90% confidence level: there is a 90% chance the true value lies within the estimate plus or minus the MOE.
Markdown
A simple way of formatting plain text: # for headings, *italic*, **bold**, and - for list items.
masking
When two loaded packages have a function with the same name, the one loaded later hides (masks) the other. Reach the hidden one with package::function().
matrix
A grid of values in R with rows and columns, all of the same type, made with matrix(). A small raster can be held in one.
MaxRecordCount
The most features an ArcGIS server returns for one request. arcpullr asks for larger layers in batches.
mean
The average: the sum of the values divided by how many there are. A few very large or small values can pull it a long way.
mean center
The average x coordinate and average y coordinate of a set of features. Like the mean, outliers pull it.
mean center of population
The point where a flat map of the country would balance if every resident weighed the same.
mean square
A sum of squares divided by its degrees of freedom: a variance. F is the ratio of two mean squares.
median
The middle value when values are sorted, so half are above and half below. Unlike counts, medians can’t be added across areas.
Mercator projection
A conformal cylindrical projection, made for navigation, that greatly enlarges areas near the poles.
meridian
A line of longitude. Meridians run from pole to pole and meet at the poles.
metadata
Data about data: who made a dataset, when, how, and what each part means. In a YAML header, it describes the document.
microdata
Records for individual people or households (with identifying details removed), rather than totals for areas. The ACS publishes microdata as PUMS.
missing value
A value that is unknown, written NA (“not available”) in R. Most calculations with NA give NA; test for it with is.na().
mode
The most common value. The only measure of center that works for categorical data.
modifiable areal unit problem (MAUP)
The way results can change when the same individual data are grouped into different areas, either larger or smaller ones or the same size with different boundaries.
Monte Carlo test
A test that shuffles values across locations many times and asks how often the shuffles beat the observed statistic.
Moran’s I
A global measure of spatial autocorrelation, from −1 (dispersed) through 0 (random) to +1 (clustered), with a p-value.
multimodal
Having several peaks.
multivariate regression
A regression with more than one independent variable. Each coefficient is the change in y with the others held constant.
NAD27
The North American Datum of 1927, based on the Clarke 1866 ellipsoid and a single origin point in Kansas.
NAD83
The North American Datum of 1983, based on the GRS80 ellipsoid and maintained through a network of permanent GPS stations (CORS).
named argument
An argument given with its name, such as digits = 1 in round(x, digits = 1).
natural join
An inner join on every column the two tables share by name. Handy but fragile, so name your key instead.
NC OneMap
North Carolina’s statewide GIS data portal, https://www.nconemap.gov/, with layers from state and local agencies.
NDVI
Normalized difference vegetation index: (NIR − Red) / (NIR + Red). It ranges from −1 to 1, and dense green vegetation is high.
negative index
An index with a minus sign, such as vect[-3], which drops that position and returns the rest.
neighbor list
spdep’s compact way of storing neighbors (class nb): each observation’s neighbors, without all the zeros of a matrix.
neighborhood (in spatial analysis)
The zone of influence around a feature. Features inside it are its neighbors, defined by a distance, the nearest features, or shared borders.
neighborhood weight matrix
An n × n table, W, whose entry wij records the neighbor relationship between observations i and j.
nesting
When every smaller area lies entirely inside exactly one larger area, as blocks do inside block groups, tracts, and counties. Nested areas can be added up without double-counting anyone.
network analysis
Analysis of movement along a network, such as roads, to measure travel distance or time, or how easily people can reach a place.
network distance
Distance along the lines of a network, such as streets, adding up the lengths of the segments on the route.
no data
A flag for raster cells with no measurement. In R these cells become NA.
node
The start or end point of a line. Lines in a network, such as streets, connect at nodes.
nominal dollars
Dollar amounts as reported in their own year, not adjusted for inflation. Adjust them before comparing across years.
normal distribution
A symmetric, bell-shaped distribution. About 68% of values fall within one standard deviation of the mean, and 95% within two.
north arrow
A symbol on a map that shows which direction is north. In tmap, tm_compass().
null hypothesis
The claim a test starts from: that there is no difference or no relationship. A small p-value is evidence against it.
numeric
The data type for numbers that can have a decimal part, such as 103.21. Also called double, and shown as <dbl> by glimpse().
nycflights13
An R package of data on every flight that left New York City’s three airports in 2013, including the flights data frame.
observation
One thing that was measured or recorded, such as a student, a county, or a flight. In a data frame, each row is an observation.
one-to-many
A relationship where one row matches many rows in the other table, such as a state and its cities.
one-to-one
A relationship where each row matches at most one row in the other table, such as states and governors.
open science
Doing research so others can check and reuse it: open access papers, open data, open methods, and open-source software.
ordinary least squares
The usual way to fit a regression line: choose the line that makes the sum of squared residuals as small as possible.
origin
The corner of a raster, usually the lower left, whose coordinates fix where the whole grid sits.
outlier
A value far from all the others. It may be real or an error, so check it before you report it.
overlay analysis
Combining thematic layers to find places that meet several conditions at once, such as wetlands on one soil type near a road.
p-hacking
Re-running an analysis in different ways until a p-value falls below 0.05, which produces false findings.
p-value
The probability of a result at least as extreme as yours if the null hypothesis were true. It is not the chance the null hypothesis is true.
package
A bundle of code, written by other users, that adds new functions to R. Install it once with install.packages(), then load it in each session with library().
palette function
In leaflet, a function, made by colorBin(), colorNumeric(), colorQuantile(), or colorFactor(), that turns data values into colors. Use the same one for the map and its legend.
panel
One box in a flexdashboard, started by a ### heading, that holds one map, chart, table, or value box.
parallel
A line of latitude. Parallels run east–west, parallel to the Equator.
parameter
A name=value setting added to an API request after the ?, such as for=county:*, that says what you want.
passive sensor
A sensor that records sunlight reflected from a surface, or heat the surface gives off, such as a camera or multispectral scanner.
percentile
The value below which a given share of the values fall: a quarter of values are below the 25th percentile. quantile() in R.
physical distance
Separation measured across the Earth’s surface, in meters, kilometers, or miles.
pipe
The operator |>, which passes the result on its left as the first argument of the function on its right. Read it as “and then.”
polygon
A closed shape that represents an area, such as a county, a lake, or a census tract.
popup
A box of text that appears when the reader clicks a feature on an interactive map.
portal
A website where an organization publishes GIS data for people to search, preview, and download, such as NC OneMap.
post-hoc test
A test run after an ANOVA to find which pairs of groups differ, such as Tukey’s HSD.
PostGIS
An extension that adds spatial data types and spatial queries, such as spatial joins, to the PostgreSQL database.
Prime Meridian
The meridian through Greenwich, England, chosen in 1884 as 0° longitude.
program
A set of lines and blocks of code that work together to do a whole job. R runs a program from top to bottom, so order matters.
purrr
The tidyverse package for repeating a task over many inputs, such as downloading data for several years.
qualitative palette
Distinct colors with no order, one per category, used for text columns such as species names.
quartile
The values that split sorted data into four groups of equal size. Q1 is the 25th percentile and Q3 the 75th.
Quarto
The newer successor to R Markdown, from the same developers. Quarto files end in .qmd. This book is written in Quarto.
queen contiguity
Polygons are neighbors if they share an edge or just a corner. On a grid, each cell has eight. spdep’s default.
R Markdown
A document format (.Rmd) that mixes formatted text with chunks of R code. Knitting it runs the code and builds a finished report.
R script
A plain file of R code, ending in .R. Anything that isn’t code must be written as a comment.
R session
One run of R, from start to finish. A new session starts with an empty Environment and no packages loaded; knitting always starts a fresh one.
R-squared
The share of the variation in y that a model explains, from 0 to 1.
radar
An active sensor that sends out microwaves. It sees through clouds and at night, so it is used to map floods during storms.
radiometric resolution
How finely a sensor records differences in brightness.
range
The largest value minus the smallest. range() in R returns both.
raster
Spatial data stored as a grid of cells (pixels), each holding a value, such as a satellite image or an elevation model. In R, the terra package handles rasters.
reactive expression
Shiny code, made with reactive(), that reruns automatically when the inputs it uses change. Call it like a function.
recycling
R repeating a shorter vector until it matches the length of a longer one, so vect[c(TRUE, FALSE)] keeps every other element.
redistricting data (PL 94-171)
The first 2020 census product: basic population, race, voting-age, and housing counts down to the block, used to redraw voting districts.
regression
A statistical model of how one variable (such as home price) changes with one or more others (such as distance to downtown).
remote sensing
Collecting information about Earth without touching it, from sensors on satellites, aircraft, or drones. It produces most of the world’s raster data.
render function
A Shiny function, such as renderLeaflet() or renderDT(), that draws an output and redraws it when the inputs or reactives it uses change.
replicability
When a new study, with new data, answering the same question gets consistent results.
replication crisis
The discovery, in the 2010s, that many published findings fail to hold up when other researchers repeat the studies.
reproducibility
The ability for anyone to rerun an analysis from its code and data and get the same result.
research question
The specific, answerable question a project sets out to answer, usually with a place and a time.
residual
An observation’s actual value minus the value a model predicts for it. Map them to see where a model fits poorly.
resolution
How much detail a raster holds, set by its cell size: smaller cells mean higher resolution, and more data.
REST
The most common style of web API: each dataset has its own URL, you ask for data with ordinary web requests, and the answer usually comes back as JSON.
REST Services Directory
The plain web page an ArcGIS server shows for each service and layer, listing its layer ID, geometry type, MaxRecordCount, and fields.
return value
What a function gives back. In R, it is the value of the last line in the function’s body.
right join
A join that keeps every row of the second (right) table. right_join() in dplyr.
rook contiguity
Polygons are neighbors only if they share an edge. On a grid, each cell has four.
row standardization
Dividing each weight by its row’s total so every row sums to 1. Then W times a variable gives the neighbors’ average.
RStudio
The integrated development environment (IDE) where you write and run R. R does the computing; RStudio is the workspace around it.
sample
A subset of a population that is surveyed to estimate something about the whole population. Smaller samples give less certain estimates.
scale
The level of detail at which you study something: addresses, neighborhoods, counties, or states. A pattern that is clear at one scale can vanish or reverse at another.
scale (in a plot or map)
The rules that turn data values into visual values: which colors, which classes, which axis breaks. Every mapped aesthetic has one, and functions such as scale_fill_manual() or tm_scale_intervals() change it.
scale bar
A bar on a map that shows how distances on the map relate to distances on the ground.
scan statistic
A cluster test that moves a window across a map (and often through time) to find areas with more cases than chance would produce. SaTScan is a widely used program for it.
scatterplot
A plot of two continuous variables against each other, with one point per observation. In ggplot2, geom_point().
scope
Which variables a piece of code can see. A function’s arguments are in its own scope, separate from variables outside it.
secant
Describes a map surface that cuts through the globe, meeting it along two standard lines where the scale is true.
second-order neighbors
The neighbors of a feature’s neighbors.
selection helper
A function that picks columns by name inside select(), such as starts_with(), ends_with(), and contains().
self join
A join of a table to itself, such as employees to their managers.
semi-major axis
On an ellipsoid, the distance from the center to the Equator: about 6,378 km for the Earth.
semi-minor axis
On an ellipsoid, the distance from the center to a pole: about 6,357 km for the Earth.
sequential palette
Colors that run from light to dark, used for numbers so that bigger values look darker.
setting an aesthetic
Giving every mark the same fixed value, outside aes(), as in geom_point(color = "blue"). It is a design choice, not a data choice.
sf
“Simple features”: the R package for spatial vector data. An sf object is a data frame with a geometry column holding each row’s point, line, or polygon.
shapefile
Esri’s common format for vector data: a group of files with the same name (.shp, .shx, .dbf, .prj, and more) that must be kept together.
Shapiro-Wilk test
A test of whether values, such as a model’s residuals, are normally distributed. A large p-value means no evidence against normality.
SharedData
The crosstalk object that wraps a data frame. Widgets built from SharedData objects with the same group are linked, row by row, through their key.
Shiny
An R package for web apps that run R code on a server whenever the reader changes an input.
simple join
A spatial join that attaches the attributes of one matching feature, such as the county each school is in.
skewed
Lopsided: most values are bunched at one end, with a long tail of unusual values at the other, which pulls the mean away from the median.
slope
How much y changes when x goes up by one unit: the coefficient of an independent variable.
small multiples
A set of small charts, one per group, that share the same axes so they can be compared directly. ggplot2 calls this faceting.
snake_case
A way of naming variables with lowercase words joined by underscores, as in pop_chapel_hill. The tidyverse style guide uses it.
social distance
Separation measured by connection, similarity, or interaction, which a ruler can’t measure.
source table
In a join, the table that supplies the new columns: y in st_join(x, y).
space-time cube
A way to store space-time data: a map for every time step, stacked on top of each other, with x, y, and time as its three axes.
spatial autocorrelation
The tendency for things that are close together to be more alike than things that are far apart, such as neighboring counties having similar incomes.
spatial cross-validation
Testing a model by holding out whole regions, rather than random observations, so the test data really are new places.
spatial data
Data that have a location, such as campus buildings or rain gauges. Data with no location of their own, such as class grades, are non-spatial.
spatial data science
The use of data that have a location attached to answer questions about the world. It combines what we study (the spatial), how we handle it (data skills), and how we ask and answer questions (science).
spatial descriptive statistics
Statistics that describe the center and spread of a set of locations, such as the mean center and standard distance.
spatial epidemiology
The study of how health outcomes, such as disease cases, vary across places, and why.
spatial error model
A spatial regression model that allows the errors of neighboring observations to be correlated.
spatial heterogeneity
The idea that relationships between variables change from place to place. A link that is strong in one city may be weak, or reversed, in another.
spatial join
A join that matches features by their location, such as attaching to each point the polygon it falls inside. st_join() in R.
spatial lag
The weighted average of an observation’s neighbors’ values, calculated with row-standardized weights. lag.listw() in spdep.
spatial lag model
A spatial regression model that includes the neighbors’ values of y as an extra explanatory variable.
spatial pattern
The arrangement of objects in space: clustered, random, or dispersed.
spatial resolution
The size of one pixel on the ground, such as 30 m for Landsat.
spatial thinking
Taking seriously how location connects observations: asking whether nearby values are alike, whether a pattern depends on the size of the areas, and whether a relationship holds everywhere.
spatiotemporal kriging
Predicting values at places and times with no measurements, from measurements nearby in both space and time.
species distribution model
A model, often a regression with environmental predictors, that predicts where a plant or animal can live.
spectral resolution
How many wavelength bands a sensor records, and how narrow they are.
spectral signature
The pattern of how much light a material reflects at each wavelength. Different surfaces, such as plants, soil, and water, have different signatures.
SQL
Structured Query Language, the language of databases. ArcGIS where clauses use it: fcounty = 'Orange'.
stacked bar chart
A bar chart where each bar is split into colored segments, one per group, so the bar’s height is the total.
standard deviation
A measure of how spread out values are around their mean, in the same units as the values. sd() in R.
standard distance
The typical distance of features from their mean center: the spatial counterpart of the standard deviation, drawn as a circle.
standard error
A measure of how much a sample estimate would vary from sample to sample. For the ACS, it is the margin of error divided by 1.645.
standard line
A line where a map projection’s surface touches the globe, so the scale there is exactly true.
State Plane Coordinate System
A set of local projections for the US, with one or more zones per state, in feet or meters. North Carolina’s zone is EPSG:32119.
statistic
A number calculated from a sample that summarizes the data, such as a mean. It would change if you drew a different sample.
statistically significant
By convention, a result with p < 0.05. Significant doesn’t mean large or important.
sum of squares
The squared distances of values from a mean, added up. ANOVA splits it into between-group and within-group parts.
summarized join
A spatial join that aggregates all the matching features, such as counting the schools in each county.
summary statistic
One number that describes many values, such as their mean, median, maximum, or count. summarize() calculates them.
syntax
The exact rules for writing code: spelling, capitalization, commas, quotation marks, and matching brackets.
t-test
A test of whether the means of two groups differ. ANOVA extends it to three or more groups.
temporal resolution
How often a sensor revisits the same place.
terra
An R package for working with raster data.
test statistic
A statistic that weighs evidence in a hypothesis test, such as t or F: how large a pattern is compared with random variation.
thematic layer
A layer that holds one theme of features, such as roads, soils, or elevation. Layers that share a coordinate system stack into a map.
thematic map
A map that shows how one theme, such as income, tree height, or building age, varies from place to place.
theme
The settings for everything on a plot that isn’t data: background, grid lines, fonts. Add one with a layer such as theme_minimal().
Thiessen polygons
Polygons drawn around a set of points so each holds the area closer to its point than to any other.
tidy data
Data arranged so that each variable is a column, each observation is a row, and each value has its own cell.
tidycensus
An R package that downloads US Census data through the Census API and returns it as a tidy data frame, with boundaries attached if you ask.
tidyverse
A family of R packages (including dplyr, ggplot2, and readr) for reading, cleaning, reshaping, summarizing, and plotting data, all designed to work together.
tie
Two or more rows with the same value in the column being sorted. arrange() breaks ties with the next column you name.
TIGER
The Census Bureau’s national digital map database of streets and boundaries, first used for the 1990 census. Census boundary files come from it.
tigris
An R package that downloads Census boundary files (TIGER/Line shapefiles) as sf objects.
tmap
An R package for making thematic maps quickly, with sensible defaults.
topological data structure
A data structure that records how features connect and share boundaries, so a shared border is stored only once.
topology
How features connect, such as which polygons touch, regardless of the distances between them.
travel time
Separation measured in minutes along a network, using speeds, turns, and traffic, instead of meters.
truth table
A table listing the result of a logical operator for every combination of TRUE and FALSE inputs.
Tukey’s HSD
Tukey’s honestly significant difference test: compares every pair of groups after an ANOVA, with p-values adjusted for the number of comparisons.
two-step floating catchment area
An accessibility measure that combines provider supply, population demand, and travel time, in two steps: one around each provider and one around each population location.
unique value
A value counted once, however many times it repeats. distinct() keeps one row for each unique value, or each unique combination of values.
urban heat island
An area of a city, usually paved and with few trees, that is hotter than its surroundings.
value box
A dashboard panel that shows one headline number, with a caption and an icon.
variable
In R, a named piece of memory that holds data, such as months <- 12. In a dataset, a measured characteristic, such as median income; each Census variable has a code.
variance
A measure of spread: the standard deviation squared, so its units are squared too. var() in R.
vector
A sequence of values that R stores together, made with c(), such as c(71, 75, 68).
vector data
Spatial data stored as points, lines, and polygons, each with a table of attributes. In R, the sf package handles vector data.
vector data model
Storing geographic features as coordinates: points, lines (chains of vertices), and polygons, each with a row of attributes. It suits discrete objects with clear edges, such as roads and parcels.
vectorized
Done to every element of a vector at once, without a loop. Arithmetic in R is vectorized, so distance / air_time divides row by row.
verb
A dplyr function named for the job it does to a data frame, such as filter(), select(), arrange(), and mutate().
vertex
A point between the ends of a line where it changes direction. More vertices make a smoother line and a bigger file.
weighted average
An average in which some values count more than others. Total distance divided by total air time weights each flight’s speed by its air time.
weighted mean center
A mean center in which each feature counts in proportion to an attribute, such as population.
Welch’s ANOVA
A version of ANOVA that doesn’t assume the groups have equal variances. oneway.test() in R.
WGS84
The World Geodetic System of 1984, the datum GPS uses. GeoJSON and KML give coordinates as WGS84 longitude and latitude.
where clause
An SQL filter, such as "fcounty = 'Orange'", that the server applies before sending data back, so you download only what you need.
while loop
A loop that repeats its block for as long as a test stays TRUE. Something in the block must change the test, or it never stops.
wrapper package
An R package that hides the details of calling an API behind simple functions, such as tidycensus for the Census API.
YAML header
The block at the top of an R Markdown file, between two lines of three dashes, that holds the document’s title, author, date, and output format.
z-score
How many standard deviations a value is from what’s expected. Beyond ±1.96 is significant at the 0.05 level.
ZIP Code Tabulation Area (ZCTA)
The Census Bureau’s approximation of a ZIP code’s area, built from census blocks. ZCTAs do not nest inside counties or tracts.