| Title: | Access Public Data from 'Georgia Civic Data' |
| Version: | 0.1.0 |
| Description: | A client for the 'Georgia Civic Data' REST API (documented at https://georgiacivicdata.org/docs), which publishes cleaned public data about Georgia: education (graduation, assessments, enrollment, attendance and school accountability), U.S. Census context, immigration and health, at state, county, school district, school and Census tract level. Find datasets by topic or plain-language search, read their column definitions, and download filtered rows as tidy data frames with place names beside codes and columns typed from each dataset's schema. Also returns school attendance zones and district boundaries as 'sf' objects, and finds the county, tract, school district and zoned schools for points or street addresses. |
| License: | MIT + file LICENSE |
| URL: | https://georgiacivicdata.org/r/, https://github.com/shanejorr/georgia-data-rpackage |
| BugReports: | https://github.com/shanejorr/georgia-data-rpackage/issues |
| Depends: | R (≥ 4.1.0) |
| Imports: | cli (≥ 3.6.0), curl, httr2 (≥ 1.1.0), jsonlite, readr, rlang (≥ 1.1.0), tibble, tidyr |
| Suggests: | dplyr, ggplot2, httptest2, knitr, rmarkdown, sf, spelling, testthat (≥ 3.0.0), withr |
| VignetteBuilder: | knitr |
| Config/roxygen2/version: | 8.1.1 |
| Config/testthat/edition: | 3 |
| Encoding: | UTF-8 |
| Language: | en-US |
| NeedsCompilation: | no |
| Packaged: | 2026-11-05 20:42:44 UTC; shaneorr |
| Author: | Shane Orr [aut, cre, cph] |
| Maintainer: | Shane Orr <shane@georgiacivicdata.org> |
| Repository: | CRAN |
| Date/Publication: | 2026-11-28 14:50:10 UTC |
georgiacivicdata: Access Public Data from 'Georgia Civic Data'
Description
An R client for the Georgia Civic Data REST API at
https://georgiacivicdata.org/api/v1 (documentation:
https://georgiacivicdata.org/docs): cleaned public data about
Georgia's schools and communities, as tidy tibbles with place names
beside codes, typed from each dataset's schema.
Functions
Find data
-
gcd_datasets(): the catalog, one row per dataset. -
gcd_search(): ranked dataset search from plain words.
Understand a dataset
-
gcd_describe(): everything about one dataset or lookup table. -
gcd_columns(): the column dictionary as a table. -
gcd_contract(): the formal ODCS data contract.
Get data
-
gcd_rows(): filtered rows, with names beside codes. -
gcd_values(): which category combinations exist, with row counts.
Lookup tables
-
gcd_dimension(): districts, schools, counties, tracts, block groups and demographic groups, with their attributes.
Geography and school zones
-
gcd_school_zones(): attendance-zone polygons. -
gcd_district_boundaries(): school district outlines. -
gcd_school_zone_status(): whether each school has a zone. -
gcd_school_zone_coverage(): how completely each district's zones were collected. -
gcd_locate(): the county, tract, block group, district and zoned schools for points or street addresses.
Utilities
-
gcd_meta()andgcd_citation(): the metadata and citation that travel with results. -
gcd_cache_clear(): empty the session and disk caches.
Missing values
A missing metric (NA) usually means the value was suppressed to
protect privacy (small counts), not that it is zero. Each dataset's
schema says which (gcd_describe()), and gcd_rows() prints the API's
advisory when a result holds suppressed values.
Data license
The data is published under the Creative Commons Attribution 4.0
International license (CC BY 4.0,
https://creativecommons.org/licenses/by/4.0/). Credit "Georgia Civic
Data (georgiacivicdata.org)" and the original source; gcd_citation()
writes the citation. The package code is MIT-licensed.
Options
-
gcd.quiet:TRUEsilences the advisory messages ofgcd_rows()and the notes of the zone functions for the session. -
gcd.cache:TRUEturns on the disk cache ofgcd_rows()for the session.
Author(s)
Maintainer: Shane Orr shane@georgiacivicdata.org [copyright holder]
Authors:
Shane Orr shane@georgiacivicdata.org [copyright holder]
See Also
Useful links:
Report bugs at https://github.com/shanejorr/georgia-data-rpackage/issues
Clear the session cache and the disk cache
Description
Empties the in-memory cache of metadata (the catalog, dataset schemas
and lookup tables) kept for the R session, and deletes the opt-in disk
cache of row downloads (see the cache argument of gcd_rows()).
Location lookups are never cached, so there is nothing to clear for
them.
Usage
gcd_cache_clear()
Details
The disk cache lives in tools::R_user_dir("georgiacivicdata", "cache").
It is only ever written when you ask for it, with cache = TRUE or
options(gcd.cache = TRUE).
Value
NULL, invisibly.
See Also
gcd_rows() for the disk cache.
Other utilities:
gcd_citation(),
gcd_meta()
Examples
gcd_cache_clear()
Cite a dataset
Description
The citation for data from Georgia Civic Data, ready to paste:
"{title}. Georgia Civic Data (georgiacivicdata.org), CC BY 4.0. {dataset URL}. Original source: {source}."
Usage
gcd_citation(x)
Arguments
x |
A tibble returned by |
Value
A single string: the citation. For a result of gcd_rows() it
is the API's own citation; for a name it is built from the dataset's
schema in the same format.
License and attribution
The data is published under the Creative Commons Attribution 4.0 International license (CC BY 4.0, https://creativecommons.org/licenses/by/4.0/). You may share and adapt it for any purpose, including commercially, as long as you give credit: name Georgia Civic Data (georgiacivicdata.org) and the original source, link the license, and say if you changed the data. The citation covers all three. The license covers Georgia Civic Data's cleaning, standardization, compilation and documentation; the source data stays under its original publisher's terms.
See Also
gcd_meta() for all the metadata.
Other utilities:
gcd_cache_clear(),
gcd_meta()
Examples
gcd_citation("graduation_rate_4_year_cohort")
grad <- gcd_rows("graduation_rate_4_year_cohort", district = "Fulton County",
year = 2024, demographic = "all")
gcd_citation(grad)
Get a dataset's column dictionary
Description
The columns of a dataset, lookup table or geometry dataset as a tidy
table: what each column means, its type, its unit and, for metrics,
whether it is a numerator or denominator. This is the place to check
"what does pct_proficient_learner_or_above mean, and is it 0-1?".
The dictionary lists every column a dataset can return. Which ones a
given gcd_rows() call returns also depends on its detail and
columns: code columns that would be empty on every row (a county
row's tract_geoid, a district row's school_code) are left out.
Usage
gcd_columns(name, labels = TRUE)
Arguments
name |
A dataset, lookup table or geometry dataset name, such as
|
labels |
|
Value
A tibble, one row per column, with columns:
-
column: the column name. -
label: a short display name. -
type:"integer","number","string","boolean"or"date", whichgcd_rows()maps to integer, double, character, logical and Date. -
role:"year", a foreign key ("fk_district","fk_school", ...),"categorical","metric"or"label"(a joined name column) for datasets;"key"or"attribute"for lookup tables. -
label_of: for a"label"column, the code column it names ("district_code","demographic", ...); otherwiseNA. -
unit:"count","proportion"(0-1 scale), a rate unit, ... -
is_key_metric: logical,TRUEfor the dataset's headline metric. -
metric_component:"numerator"or"denominator"for the counts a rate is built from. -
nullable: logical. -
valid_values: list-column of a categorical column's values. -
description: the full definition. -
null_meaning: what a missing value means in this column.
Fields that don't apply (labels and units for lookup tables and
joined name columns, most fields for geometry datasets) are NA. A
joined name column's description and nullable come from its lookup
table; see gcd_dimension().
See Also
gcd_describe() for the whole schema.
Other describe a dataset:
gcd_contract(),
gcd_describe()
Examples
gcd_columns("graduation_rate_4_year_cohort")
gcd_columns("graduation_rate_4_year_cohort", labels = FALSE)
gcd_columns("schools")
Get a dataset's data contract
Description
The dataset's formal, versioned contract in the Open Data Contract
Standard (ODCS v3.2): its schema, quality rules, version and
schema_hash. For data engineers building pipelines and anyone citing
the exact schema. Most users want gcd_describe() instead.
Datasets and the school_attendance_zones geometry dataset have
contracts; lookup tables and school_district_boundaries do not.
Usage
gcd_contract(name, file = NULL)
Arguments
name |
A dataset, lookup table or geometry dataset name, such as
|
file |
A path. If given, the contract is written there verbatim as
YAML and the path is returned invisibly. Default |
Value
The contract as a nested list (parsed from its JSON form), or,
with file, the path invisibly.
See Also
gcd_describe() for a readable summary.
Other describe a dataset:
gcd_columns(),
gcd_describe()
Examples
contract <- gcd_contract("graduation_rate_4_year_cohort")
contract$version
gcd_contract("graduation_rate_4_year_cohort", file = tempfile(fileext = ".yaml"))
List the datasets in the catalog
Description
The catalog of everything the API publishes, one row per dataset. With
no arguments it returns every dataset: all subject areas, detail
levels and years, tables and geometry alike. Each argument only narrows
the list (the filtering runs on the server). About 176 datasets: small
enough to View() or filter with dplyr.
The six lookup tables (districts, schools, counties, tracts, block
groups, demographics) are not datasets and are not listed; see
gcd_dimension().
Usage
gcd_datasets(
main_topic = NULL,
level = NULL,
year = NULL,
kind = NULL,
details = FALSE
)
Arguments
main_topic |
A single subject area: |
level |
Keep datasets that publish rows at this detail level, such
as |
year |
Keep datasets that cover this year (a single number).
Default |
kind |
|
details |
|
Value
A tibble, one row per dataset, with columns:
-
name: the dataset's name, used by every other function. -
title,summary: what it holds. -
kind:"table"or"geometry". -
main_topic: the subject area. -
detail_levels: list-column of the levels it publishes. -
year_min,year_max: integer, the years covered.
With details = TRUE, also: description, source, source_url,
grain (list-column: the columns that identify a row),
default_detail, year_gaps (list-column of missing years),
update_frequency, search_aliases_en and search_aliases_es
(list-columns of everyday search phrases), and updated_at (POSIXct,
UTC). Geometry datasets have NA where a field doesn't apply.
See Also
gcd_search() to rank datasets by plain words;
gcd_describe() for one dataset.
Other find data:
gcd_search()
Examples
gcd_datasets()
gcd_datasets(main_topic = "education", level = "schools")
gcd_datasets(kind = "geometry", details = TRUE)
Describe a dataset or lookup table
Description
Everything about one dataset, lookup table or geometry dataset: what it holds, its source, years, detail levels, the columns that identify a row (the grain), its key metric, every filter, and the notes its data contract declares (limitations, series breaks, groups that must not be added up, and so on). Printing the result shows a readable summary.
Read the "Pick one value of" line: it names categorical columns
with no total (such as grade_cluster), whose values must not be mixed
in one summary. gcd_rows() returns every value of them unless you
filter one.
The $filters table is also how to discover the filters that are not
columns of the dataset: lookup-table attributes such as
district_type, school_level, locale and demographic_category.
Usage
gcd_describe(name)
Arguments
name |
A dataset, lookup table or geometry dataset name, such as
|
Value
A gcd_description object: a named list with a print method.
Components include name, kind ("table", "geometry" or
"lookup"), title, summary, description, source,
source_url, years (integer), year_gaps, detail_levels,
default_detail, grain, key_metric, and:
-
$columns: the column dictionary, asgcd_columns()returns it by default (for a dataset, the joined name columns included). -
$filters: a tibble of every filter parameter:param,kind(categorical, foreign_key, dimension_attribute, metric_bound, year, detail, ...),values(list-column of allowed values),multi_value,has_total,total_value,requires_single_valueandnullable. -
$notes: the contract's declarations that are present, each a tibble or a string:limitations,year_meaning,null_semantics,series_breaks,non_additive,partitions,pooled_rates,year_window,value_implications,pooled_min_count(andassignment_notefor the zones). -
$raw: the full parsed schema response.
See Also
gcd_columns() for the column table alone; gcd_values() for
the category values present under a filter; gcd_contract() for the
formal contract.
Other describe a dataset:
gcd_columns(),
gcd_contract()
Examples
gcd_describe("graduation_rate_4_year_cohort")
gcd_describe("ccrpi_content_mastery")$filters
gcd_describe("schools")
Get the rows of a lookup table
Description
Returns one of the platform's six lookup tables, the reference lists every dataset's codes point to. They hold much more than names, and the API never adds it to dataset rows:
-
"districts": district name, former names, type, Census id, county, address, coordinates, active flag. -
"schools": school name, former names, level, grade span, county, NCES id, address, phone, website, coordinates, locale (city, suburb, town, rural), charter and active flags. -
"counties": the 159 county names (without "County"). -
"tracts": 2020 Census tracts with county, land area and population. -
"block_groups": 2020 block groups with tract, county, land area, population, housing units and households. -
"demographics": each demographic group's label and category.
Use it to analyze results by locale, map schools, or browse what exists ("every school in Fulton County"). Unfiltered tables are cached for the R session.
Usage
gcd_dimension(
name,
...,
district = NULL,
school = NULL,
county = NULL,
q = NULL,
columns = NULL,
n_max = Inf
)
Arguments
name |
The lookup table: |
... |
Named filters on the table's key, enum and boolean columns,
and |
district, school, county |
Places by name, matched exactly against
current and former names (ignoring case, accents and a trailing
"County") and turned into codes. Character vectors; default |
q |
A single string: partial text search over the table's name
columns, ignoring case and accents ( |
columns |
A character vector of columns to return. Default |
n_max |
The most rows to return. Default |
Value
A tibble ordered by the table's primary key, one row per
district, school, county, tract, block group or demographic group,
typed from the table's schema: codes (district_code, school_code,
county_fips, tract_geoid, block_group_geoid, demographic) and
text columns are character, coordinates and areas double, counts and
directory_year integer, active and charter logical. See
gcd_columns() for each table's columns.
Joining schools
School codes repeat across districts, so join on district_code and
school_code together:
schools <- gcd_dimension("schools",
columns = c("district_code", "school_code", "locale"))
grad |>
dplyr::left_join(schools, by = c("district_code", "school_code"))
See Also
gcd_columns() for a table's column dictionary; gcd_rows(),
whose results carry these tables' names beside their codes.
Examples
gcd_dimension("counties")
gcd_dimension("schools", county = "Fulton", active = TRUE)
gcd_dimension("districts", district_type = "state_charter")
gcd_dimension("schools", q = "eastside",
columns = c("district_code", "school_code", "school_name"))
Get school district boundaries
Description
The Census TIGER/Line outlines of Georgia's school districts, keyed to district codes: unified districts, the secondary-only pieces some districts serve (Fort Benning grades 9-12), and the Department of Defense districts (which have no district code).
Usage
gcd_district_boundaries(district_code = NULL, district = NULL, geometry = TRUE)
Arguments
district_code |
A character vector of district codes. Default
|
district |
District names, matched to codes as in |
geometry |
|
Value
An sf object (or, with geometry = FALSE, a tibble), one row
per district piece, with columns district_code, district_name (for
Department of Defense districts, the Census name), boundary_type
("unified", "secondary_extension" or "dodea"),
district_census_id, nces_lea_id, grade_low, grade_high,
tiger_geoid, tiger_name, tiger_vintage, land_area_sq_mi,
area_sq_mi, the bounding box and the geometry (WGS 84).
See Also
gcd_school_zones() for the zones inside each district.
Other geography:
gcd_locate(),
gcd_school_zone_coverage(),
gcd_school_zone_status(),
gcd_school_zones()
Examples
gcd_district_boundaries(district = "Clay County")
gcd_district_boundaries(geometry = FALSE)
Locate points or addresses
Description
The county, 2020 Census tract and block group, school district and zoned schools that points or street addresses fall in.
Points are sent to the API's POST /locate route in batches of up to
1,000, so coordinates never appear in URLs and nothing is cached.
Addresses never reach the Georgia Civic Data API: the package
geocodes them on your computer with the U.S. Census batch geocoder
(https://geocoding.geo.census.gov/geocoder/, benchmark
Public_AR_Current, the address data the API's own search uses; up to
10,000 addresses per upload), then sends the coordinates as points. An
address the Census can't match is never sent. To geocode with another
service, geocode first (for example with the 'tidygeocoder' package)
and pass lat and lon.
A zone is the default assignment, not the only option: a student may attend another public school by transfer, or a charter, magnet or other choice school. This is not an official enrollment determination; confirm with the school district.
Usage
gcd_locate(
lat = NULL,
lon = NULL,
address = NULL,
id = NULL,
grade = NULL,
year = NULL
)
Arguments
lat, lon |
Numeric vectors of equal length: latitude and longitude
in decimal degrees (WGS 84). Default |
address |
Street addresses: a character vector of one-line
addresses ( |
id |
Identifiers for the inputs, the same length, carried into the
output so results join back to your data. Default |
grade |
Keep only school zones serving this grade ( |
year |
The zones' school year as its ending year (2027 is
2026-27). Default |
Value
A tibble with columns, in order:
-
id. The input:
lat,lonfor points; for addressesaddress, the geocoder'smatch_status("match","no_match","tie"),match_type("exact","non_exact"),matched_address, and the geocodedlatandlon.-
geographic_type:"county","tract","block_group","school_district","elementary_school","middle_school"or"high_school". -
geographic_id: county FIPS ("13121"), tract GEOID ("13121003500"), block group GEOID ("131210035001"), district code ("761"), or for a school"DISTRICT-SCHOOL"("761-4560"), the formgcd_rows()takes asschool_id. -
geographic_name: the place's name. -
grades: a school row's grade range ("K-5","6-8","9-12");NAon other rows. -
note:NA, or why a row is missing or needs care.
Attributes assignment_note and note carry the API's notes on
reading the zones.
Output
A long tibble: for each input, one row per place it falls in. A typical location gives seven rows: its county, tract, block group and school district, then one row per zoned school. Rows for each input come in a fixed order: county, tract, block group, district, then elementary, middle and high schools by grade.
A level can have more than one school row: some homes are zoned to one
elementary school for kindergarten to grade 2 and another for grades
3-5. The grades column tells them apart; pass grade to keep only
the school for one grade.
The note column is NA normally, and one plain sentence otherwise,
so a missing row is never silent:
a level with no zone collected yet, a gap between zones, or a level served by another district gets a row with
NAid, name and grades, and a note saying why;an input outside Georgia, a point the API rejects, or an address the Census can't match gets one row with
NAgeographic columns and the reason; one bad input never stops the batch;in a Department of Defense district the district row has an
NAid and a note;school rows whose zone has a known pending change, or which overlap another school's zone, say so.
See Also
gcd_school_zones() for the zones' shapes and precision
(method, accuracy_class); gcd_rows() with school_id for data
on a located school.
Other geography:
gcd_district_boundaries(),
gcd_school_zone_coverage(),
gcd_school_zone_status(),
gcd_school_zones()
Examples
# The Georgia State Capitol, by coordinates and by address
gcd_locate(lat = 33.7490, lon = -84.3880)
gcd_locate(address = "206 Washington St SW, Atlanta, GA 30334")
# Only the school for one grade
gcd_locate(lat = 33.7490, lon = -84.3880, grade = "9")
Get the metadata carried by a result
Description
Every tibble from gcd_rows() carries the response's metadata as an
attribute: what the rows are, where they come from and how to cite
them. gcd_meta() returns it.
Many dplyr verbs drop attributes, so read the metadata from the result
as it came back. gcd_citation() also accepts a dataset name.
Usage
gcd_meta(x)
Arguments
x |
A tibble returned by |
Value
A named list: dataset (the name), title, detail,
key_metric, units (a named list of each metric's unit),
null_semantics (what a missing value means), source,
source_url, citation, license, schema (the schema's path),
advisories (a tibble of code and message), year_meaning,
omitted_columns (columns left out because they were empty), data_version,
updated_at and request_url. Fields the API didn't send are absent.
See Also
gcd_citation() to cite the data.
Other utilities:
gcd_cache_clear(),
gcd_citation()
Examples
grad <- gcd_rows("graduation_rate_4_year_cohort", district = "Fulton County",
year = 2024, demographic = "all")
gcd_meta(grad)$advisories
Get rows of a dataset
Description
The core function: the rows of one dataset at one detail level, as a tibble typed from the dataset's schema, with place names beside their codes.
It returns every category and group the filters don't exclude. Nothing is pinned by default: no single demographic group, no single subject. A call with only a dataset name returns the whole dataset at its default detail level.
Usage
gcd_rows(
name,
...,
year = NULL,
detail = NULL,
district = NULL,
school = NULL,
county = NULL,
labels = TRUE,
columns = NULL,
sort = NULL,
n_max = Inf,
cache = getOption("gcd.cache", FALSE),
quiet = FALSE
)
Arguments
name |
The dataset's name, such as
|
... |
Named filters (see "Filters"). Unnamed arguments are an error. |
year |
Years to keep, an integer vector. A run of consecutive years
( |
detail |
The one level the rows describe, such as |
district, school, county |
Places by name, such as
|
labels |
|
columns |
A character vector to return only some columns. Default
|
sort |
A character vector of columns to sort by on the server;
prefix |
n_max |
The most rows to return. Default |
cache |
|
quiet |
|
Value
A tibble of rows at one detail level, typed from the schema:
codes and names character (leading zeros kept), year integer,
counts integer, rates and proportions double (proportions on the 0-1
scale), booleans logical. Columns come in grain order: year, each
geography code followed by its names, demographic and its labels,
other categorical columns, then metrics. gcd_columns() describes
each column. The tibble carries a gcd_meta attribute (see
gcd_meta()): dataset, title, detail, key metric, units,
null_semantics, source, citation, license, advisories, data version,
updated_at and the request URL.
Filters
Give filters as named arguments in ...; each value is a vector.
Values within one filter are OR'd; different filters are AND'd.
Accepted names:
any categorical column:
subject = "mathematics",demographic = c("all", "black");geography codes:
district_code,school_code,county_fips,tract_geoid,block_group_geoid;-
school_id: schools as"DISTRICT-SCHOOL"codes (school_id = c("761-0199", "660-0104")), the formgcd_locate()returns (a school code alone is not unique across districts); lookup-table attributes:
district_type = "state_charter",school_level = "high",locale = "rural",demographic_category = "race";metric bounds:
graduation_rate_min = 0.9,num_cohort_max = 50(inclusive, in stored units).
NA in a filter selects rows where a nullable column is empty;
logicals become true / false. The API validates every filter and
its errors name what went wrong; gcd_describe() lists each dataset's
filters and their values.
Labels
With labels = TRUE (the default) the rows carry the API's joined name
columns, each right after its code: district_name,
district_census_id and district_type after district_code;
school_name after school_code; county_name, tract_name and
block_group_name after their codes; demographic_label and
demographic_category after demographic. Codes are always kept:
school names repeat across districts, names change over time, and joins
run on codes.
Categorical values (
subject,grade_cluster) are readable snake_case codes already; there are no separate labels for them.-
demographic_category(race, gender, economic_status, ...) is a grouping that arrives with the labels; filtering by it works either way. Other lookup-table attributes (school addresses, locale, coordinates) are not joined; get them from
gcd_dimension()and join.
labels = FALSE asks for the dataset's own columns only, for large
pulls. gcd_columns() takes the same argument and lists the name
columns too, with role "label". Either way, code columns that would be empty on every row (a
district row's school_code, a state row's geography codes) are left
out, so both settings give the same shape.
Missing values and totals
NA in a metric usually means the value was suppressed to protect
privacy (small counts), not zero; the schema's null_semantics says
which (gcd_describe()). Because nothing is pinned, results hold the
all totals beside the subgroups: never add a total to its subgroups.
The API's advisories say so when they apply, and print once per call as
messages (quiet = TRUE or options(gcd.quiet = TRUE) silences them;
they stay in gcd_meta(x)$advisories).
Rates must be pooled from their counts, never averaged:
sum(num_graduates) / sum(num_cohort), not mean(graduation_rate).
gcd_columns() shows each metric's numerator and denominator.
Large downloads and the disk cache
Up to 10,000 rows come back as one JSON page. A larger result is downloaded in full as CSV in one response (with a progress bar); the metadata and advisories then come from the first JSON page and describe its first 10,000 rows.
With cache = TRUE (or options(gcd.cache = TRUE)), responses are kept
in tools::R_user_dir("georgiacivicdata", "cache") with their ETag.
Repeating a request asks the server whether the data changed: an
unchanged answer reuses the saved copy without downloading, and a new
data release downloads afresh. A response the server marks fresh (for
five minutes) is reused without asking. Clear it with
gcd_cache_clear().
Data license
The data is CC BY 4.0: credit Georgia Civic Data and the original
source, as gcd_citation() writes.
See Also
gcd_values() to see which category values exist under a
filter; gcd_describe() and gcd_columns() to understand a dataset;
gcd_citation() to cite it.
Other get data:
gcd_values()
Examples
# Names and codes (the default), one district by name
grad <- gcd_rows(
"graduation_rate_4_year_cohort",
district = "Fulton County",
demographic = c("all", "black", "hispanic"),
year = 2020:2024
)
# One school, by name within its district
gcd_rows("graduation_rate_4_year_cohort",
district = "Fulton County", school = "Roswell High School",
demographic = "all")
# Statewide schools, one subject, codes only
gcd_rows("ccrpi_content_mastery", year = 2025, detail = "schools",
grade_cluster = "high", subject = "mathematics", labels = FALSE)
# Top 10 counties by unemployment
gcd_rows("employment", year = 2024, sort = "-unemployment_rate",
n_max = 10)
Get each district's attendance-zone coverage
Description
How completely each standard district's attendance zones were collected, one row per district and zone level: the source tier, the status of each level, the share of the district's land and 2020 population the zones cover, how they were built, and the reason for anything short of complete.
The API returns one row per district with a column per level
(level_status_elementary, pct_population_middle, ...); this function
pivots those columns long. The district filter runs in R (the route
takes no filters; the table has about 180 rows).
Usage
gcd_school_zone_coverage(
district_code = NULL,
district = NULL,
geometry = FALSE
)
Arguments
district_code |
A character vector of district codes. Default
|
district |
District names, matched to codes as in |
geometry |
|
Value
A tibble (or sf object), one row per district and zone level,
with columns year (integer), district_code, district_name,
tier (the source tier, A to E or N), status (the district's
overall status), zone_level, level_status ("zoned",
"one_school_per_grade", "partial", "not_available",
"served_by_other_district"), pct_land_area and pct_population
(0-1, the share the level's zones cover), zone_count, methods,
accuracy_classes, reason, then levels_covered,
currency_statuses, best_lead, extension_note and
served_elsewhere (a list-column of tibbles: the other district's
school serving that level, with district_code, school_code and
reason).
See Also
gcd_school_zones() for the zones.
Other geography:
gcd_district_boundaries(),
gcd_locate(),
gcd_school_zone_status(),
gcd_school_zones()
Examples
gcd_school_zone_coverage(district = "Clay County")
coverage <- gcd_school_zone_coverage()
table(coverage$zone_level, coverage$level_status)
Get each school's attendance-zone status
Description
Whether each school of the standard districts has an attendance zone on the platform and, if not, why: a magnet or charter school with no zone, a district whose maps are not published yet, and so on. Answers "why doesn't this school have a zone?" without inferring it from a missing polygon.
Usage
gcd_school_zone_status(
district_code = NULL,
school_code = NULL,
district = NULL,
school = NULL,
zone_status = NULL,
no_zone_category = NULL
)
Arguments
district_code, school_code |
Character vectors of codes. Default
|
district, school |
Names, matched to codes as in |
zone_status |
|
no_zone_category |
Why a school has no zone (the API's categories,
listed by |
Value
A tibble, one row per school, with columns year (integer),
district_code, district_name, school_code, school_name,
zone_status, zone_levels (the levels it is zoned for, as one
string), no_zone_category and reason. The API's note on reading
the table is the note attribute.
See Also
gcd_school_zones() for the zones; gcd_school_zone_coverage()
for each district's coverage.
Other geography:
gcd_district_boundaries(),
gcd_locate(),
gcd_school_zone_coverage(),
gcd_school_zones()
Examples
gcd_school_zone_status(district = "Atlanta Public Schools")
gcd_school_zone_status(zone_status = "no_zone")
Get school attendance zones
Description
Attendance-zone polygons: the areas that assign a home to its zoned elementary, middle and high school, one polygon per school, level and grade run, for the current school year.
Zones differ in precision. Some are the district's official GIS
layers; others are digitized from PDF maps, rebuilt from street lists,
or are the whole district outline (districts with one school per
grade). Read method and accuracy_class before treating zones as
equally exact, and see gcd_school_zone_coverage() for how completely
each district was collected. A zone is the default assignment, not an
official enrollment determination: confirm with the district.
A statewide pull is large, especially at resolution = "full".
Filter to a district and keep the "display" default for maps.
Usage
gcd_school_zones(
district_code = NULL,
school_code = NULL,
district = NULL,
school = NULL,
zone_level = NULL,
grade = NULL,
year = NULL,
resolution = c("display", "full"),
geometry = TRUE
)
Arguments
district_code, school_code |
Character vectors of codes. Default
|
district, school |
Names, matched to codes as in |
zone_level |
|
grade |
One grade: keep zones serving it ( |
year |
The zones' school year as its ending year (2027 is
2026-27). Default |
resolution |
|
geometry |
|
Value
An sf object (or, with geometry = FALSE, a tibble), one row
per zone, with columns year (integer), district_code,
district_name, school_code, school_name, zone_level,
grade_low, grade_high ("pk", "k", "01" ... "12"),
method (how the zone was built), accuracy_class,
currency_status, boundary_vintage, source_url, retrieved_on
(Date), area_sq_mi, the bounding box (bbox_xmin, bbox_ymin,
bbox_xmax, bbox_ymax), source_school_name (the name as the
district's map spells it), then positional_rmse_m, currency_note,
source_publisher, nces_school_id, district_census_id,
nces_lea_id and the geometry (WGS 84). The API's disclaimer is
the note attribute.
See Also
gcd_locate() to find the zones a point falls in;
gcd_school_zone_status() for schools without a zone;
gcd_describe() with "school_attendance_zones" for every field.
Other geography:
gcd_district_boundaries(),
gcd_locate(),
gcd_school_zone_coverage(),
gcd_school_zone_status()
Examples
zones <- gcd_school_zones(district = "Atlanta Public Schools",
zone_level = "high")
plot(zones["school_name"])
gcd_school_zones(district_code = "630", geometry = FALSE)
Search the catalog
Description
Ranked dataset search from plain words, in English or Spanish ("jobless rate", "kids missing school", "desempleo"). Use it when you know what you are looking for but not what the dataset is called.
Search is hybrid: keyword matching plus matching by meaning. The query
text is sent to the Georgia Civic Data API, which embeds it with Voyage
AI for the meaning half and never logs it. This is the one function
whose results can't be reproduced by filtering gcd_datasets() locally,
and the ranking can change between releases of the platform.
Usage
gcd_search(query, main_topic = NULL, level = NULL, year = NULL, n = 20)
Arguments
query |
Plain words, a single string. |
main_topic, level, year |
The same filters as |
n |
The number of matches to return, 1 to 100. Default 20. |
Value
A tibble, one row per match, best first, with columns:
-
rank: integer, 1 is the best match. -
name,title,summary,main_topic: the dataset. -
detail_levels: list-column of the levels it publishes. -
year_min,year_max: integer, the years covered. -
score: double, the match score. -
matched_on: list-column of what matched (aliases, columns, summary, ...). -
matched_columns: list-column of the dataset's columns that matched.
Attributes confidence ("high", "medium" or "low"),
retrieval (a list: mode and reranked) and total_matches
describe the search. On low confidence the function says that nothing
in the catalog may fit; it also names any lookup tables that matched.
See Also
gcd_datasets() for the full catalog; gcd_describe() and
gcd_columns() to understand a match.
Other find data:
gcd_datasets()
Examples
gcd_search("high school graduation")
gcd_search("desempleo", n = 5)
gcd_search("chronic absence", level = "districts")
List the category combinations a filter covers
Description
Which combinations of category values exist, and how many rows each
has, under the same filters as gcd_rows(). It answers "which subjects
exist in 2016 at district level?" or "which demographic groups does this
county have rows for?" without downloading the rows. The schema's
valid_values list every value a column has ever used; gcd_values()
lists what exists for this filter, which is what you need when a
filter returns zero rows.
The API returns at most 500 combinations; the function warns when that cap is reached.
Usage
gcd_values(
name,
columns,
...,
year = NULL,
detail = NULL,
district = NULL,
school = NULL,
county = NULL
)
Arguments
name |
The dataset's name, such as
|
columns |
One or more categorical columns (or |
... |
Named filters, exactly as in |
year |
Years to keep, an integer vector. A run of consecutive years
( |
detail |
The one level the rows describe, such as |
district, school, county |
Places by name, such as
|
Value
A tibble, most rows first, with one column per requested
column (typed from the schema; NA where the column is empty for
those rows) and n_rows (integer), the number of rows with that
combination.
See Also
gcd_rows() for the rows themselves; gcd_describe() for
every filter and its allowed values.
Other get data:
gcd_rows()
Examples
gcd_values("ccrpi_content_mastery", "subject", year = 2016,
detail = "districts")
gcd_values("graduation_rate_4_year_cohort", "demographic",
district = "Fulton County", year = 2024)