-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathREADME.Rmd
143 lines (121 loc) · 6.96 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
eval = FALSE,
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# geodaData
<!-- badges: start -->
<!-- badges: end -->
The goal of geodaData is to store sample spatial datasets. These datasets are intended to be used to teach basic spatial analysis concepts. They are used in the weekly R Spatial Workshop at the Center for Spatial Data Science at UChicago, and are based off of the [GeoDa workbook](https://geodacenter.github.io/documentation.html) and [data site](https://geodacenter.github.io/data-and-lab/) developed by Luc Anselin and team. Datasets are stored in the sf spatial object format.
## Installation
You can install geodaData from CRAN with:
``` r
install.packages("geodaData")
```
You can install the development version of geodaData from [GitHub](https://github.com/) with:
``` r
# install.packages("remotes")
remotes::install_github("spatialanalysis/geodaData")
```
## Usage
To use geodaData in a workshop, first load `sf`, then load the package:
```{r load}
library(sf) # can use without sf, but datasets will print weirdly in console
library(geodaData)
```
Find a list of all datasets in geodaData with:
```{r all}
data(package = "geodaData")
```
You can load a specific dataset into your R environment and show the metadata for it:
```{r data}
head(nyc)
?nyc
```
Instructions for adding a new dataset to this package can be found in the [Wiki](https://github.com/spatialanalysis/geodaData/wiki/How-to-add-a-dataset-to-this-package) of this repository.
## Datasets
Current datasets included in this package:
- `abandonedcars`: Abandoned Vehicles (2016).
- `airbnb`: Airbnb rentals, socioeconomics, and crime in Chicago.
- `atlanta_homicide`: Atlanta, GA region homicide counts and rates.
- `baltimore_home`: Baltimore house sales prices and hedonics.
- `bostonhsg`: Boston housing and neighborhood data.
- `buenosaires`: Electoral Data for 1999 Argentinean Elections.
- `charleston1`: 2000 Census Tract Data for Charleston, SC MSA and counties.
- `charleston2`: 1998 and 2001 Zip Code Business Patterns (Census Bureau) in Charleston, SC MSA.
- `chigroceries`: Chicago supermarkets (2015).
- `chihealth`: Chicago Health and Socio-Economics (2014).
- `chilelabor`: Labor Markets in Chile (1982-2002).
- `chisociohealth`: Chicago Health Indicators (2005-11).
- `cincinnati`: Cincinnati Crime and Socio-Demographics (2008).
- `cleveland`: Cleveland Home Sales (2015).
- `columbus`: Columbus neighborhood crime (1980).
- `commpop`: Chicago Population Change (2000-2010).
- `denver`: Demographics and housing in Denver neighborhoods (2010).
- `elections1216`: 2012 and 2016 Presidential Elections in the United States.
- `grid100`: Grids with simulated variables.
- `guerry`: Guerry "Moral Statistics" (1830s).
- `healthplus`: Health, Income and Diversity for US counties (2000).
- `hickory1`: Census Tract Data for Hickory, NC MSA and counties (2000).
- `hickory2`: Zip Code Business Patterns (Census Bureau) for Hickory, NC MSA (1998 and 2001).
- `houstonhom`: Houston, TX region homicide counts and rates (1980s-90s).
- `juvenile`: Cardiff juvenile delinquent residences.
- `kchomesale`: Home Sales in King County, WA (2014-15).
- `lansing1`: 2000 Census Tract Data for Lansing, MI MSA and counties.
- `lansing2`: 1998 and 2001 Zip Code Business Patterns (Census Bureau) for Lansing, MI MSA.
- `laozone`: Ozone measures at monitoring stations in Los Angeles basin (1996).
- `lasrosas1`: Corn yield, fertilizer and field data for precision agriculture, Argentina (1999).
- `lasrosas2`: Corn yield, fertilizer and field data for precision agriculture, Argentina (1999).
- `liquorstore`: Chicago Liquor Stores (2015).
- `malaria_col_dept`: Malaria incidence and population (1973, 95, 93 censuses and projections until 2005).
- `malaria_col_munic`: Malaria incidence and population (1973, 95, 93 censuses and projections until 2005).
- `milwaukee1`: 2000 Census Tract Data for Milwaukee, WI MSA..
- `milwaukee2`: 1998 and 2001 Zip Code Business Patterns (Census Bureau) for Milwaukee, WI MSA.
- `mspolice`: Police expenditures Mississippi counties.
- `ncovr`: Homicides & Socio-Economics (1960-90).
- `ndvi`: Normalized Difference Vegetation Index grid.
- `nepal`: Health, poverty and education indicators for Nepal districts (2007-14).
- `nyc`: Rental Housing and Demographics in NYC (2000s), non-spatial.
- `nyc_sf`: Rental Housing and Demographics in NYC (2000s).
- `nycearnings`: Block-level Earnings in NYC (2002-14).
- `nyceducation`: NYC Education (2000).
- `nycneighborhood`: Demographics for New York City neighborhoods (2000s).
- `nycsociodemo`: NYC Education and Socio-Demographics (2000s).
- `ohio_lung`: Ohio Lung Cancer Mortality (1960s-80s).
- `orlando1`: 2000 Census Tract Data for Orlando, FL MSA and counties.
- `orlando2`: 1998 and 2001 Zip Code Business Patterns (Census Bureau) for Orlando, FL MSA.
- `ozone9799`: Monthly ozone data, 1997-99.
- `phoenixACS`: Phoenix American Community Survey Data (2010, 5-year averages).
- `pittsburghom`: Pittsburgh homicide locations (1993).
- `sacramento1`: 2000 Census Tract Data for Sacramento MSA.
- `sacramento2`: 1998 and 2001 Zip Code Business Patterns (Census Bureau) for Sacramento MSA.
- `savannah1`: 2000 Census Tract Data for Savannah, GA MSA and counties.
- `savannah2`: 1998 and 2001 Zip Code Business Patterns (Census Bureau) for Savannah, GA MSA.
- `scotlip`: Male lip cancer in Scotland, 1975-80.
- `seattle1`: 2000 Census Tract Data for Seattle, WA MSA and counties.
- `seattle2`: 1998 and 2001 Zip Code Business Patterns (Census Bureau) for Seattle, WA MSA.
- `Sfcartheft`: Car theft incidents in San Francisco (points and area) - for CAST (July-Dec 2012).
- `Sfcrime`: Crime incidents in San Francisco (points and area) - for CAST (July-Dec 2012).
- `Sfdrugs`: Drug incidents in San Francisco (points and area) - for CAST (July-Dec 2012).
- `Sfrobbery`: Robbery incidents in San Francisco (points and area) - for CAST (July-Dec 2012).
- `Sfvandalism`: Vandalism incidents in San Francisco (points and area) - for CAST (July-Dec 2012).
- `SIDS`: North Carolina county SIDS death counts (1970s and 1980s).
- `snow`: John Snow & the 19th Century Cholera Epidemic.
- `southom`: US Southern county homicides 1960-1990.
- `stlouishom`: St Louis region county homicide counts and rates (1980s and 1990s).
- `tampa`: 2000 Census Tract Data for Tampa, FL MSA and counties.
- `us_sdoh`: US Social Determinants of Health Data (2014).
- `vehicle_pts`: Point locations of abandoned vehicles in Chicago in September 2016.
## Similar Packages
Interested in finding more R packages with spatial data included? Check out:
- [spData](https://github.com/Nowosad/spData): package with large variety of
spatial datasets, accompanies the [Geocomputation with R](https://geocompr.github.io) book.
- [tidycensus](https://github.com/walkerke/tidycensus) / [tigris](https://github.com/walkerke/tigris): API package for US Census data