Skip to content

Commit d1837c2

Browse files
committed
minor edits of typos
1 parent 7bc078c commit d1837c2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

1_R_Spatial_Data_Handling.Rmd

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Spatial Data Handling"
33
subtitle: "R Notes"
44
author: "Luc Anselin and Grant Morrison^[University of Chicago, Center for Spatial Data Science -- [email protected],[email protected]]"
5-
date: "08/07/2018"
5+
date: "latest update 09/03/2018"
66
output:
77
html_document:
88
fig_caption: yes
@@ -76,7 +76,7 @@ Below follows a list of the commands used in this notebook. For further details
7676
and a comprehensive list of options, please consult the
7777
[R documentation](https://www.rdocumentation.org).
7878

79-
- **base R**: `install.packages`, `library`, `head`, `dim`, `class`, `as.Date`, `names`, `!is.na`, `is.numeric`, `as.integer`, `is.integer`, `length`, `strsplit`, `unlist`, `for`, `vector`, `substr`, `gsub`, `as.numeric`, `data.frame`
79+
- **base R**: `setwd`, `install.packages`, `library`, `head`, `dim`, `class`, `as.Date`, `names`, `!is.na`, `is.numeric`, `as.integer`, `is.integer`, `length`, `strsplit`, `unlist`, `for`, `vector`, `substr`, `gsub`, `as.numeric`, `data.frame`
8080

8181
- **RSocrata**: `read.socrata`
8282

@@ -145,8 +145,8 @@ we will have to deal with. We also check the dimension of this data frame using
145145
dim(vehicle.data)
146146
```
147147

148-
The table has 200,657 observations on 26 variables (the number of observations
149-
may be different as the table is constantly updated).
148+
The table has 203,657 observations on 26 variables (the number of observations shown
149+
may be slightly different as the table is constantly updated).
150150

151151
In RStudio, the type of the variable in each column is listed under its name. For example, under **creation_date**, we see **S3: POSIXct**. You can also find out the same information by applying a `class` command to the variable
152152
**vehicle.data$creation_date**, as in
@@ -278,7 +278,7 @@ At this point, we will go about things in a slightly different way from how
278278
they are illustrated in the GeoDa workbook example. As it turns out, some of the points have missing community area information, which is a critical element to compute the number of abandoned cars at that scale. In GeoDa, we used a visual approach to obtain the missing information. Here, we will exploit some of the GIS functionality in **sf** to carry out a **spatial join**. This boils down to identifying which points belong to each community area (a so-called *point in polygon query*) and assigning the corresponding community area identifier to each point.
279279

280280
We proceed in three steps. First, we create a simple features spatial polygon object with the boundaries of the community areas, which we download from the Chicago Open Data portal. Next,
281-
we carry out a spatial join between our points object and the polygon object to assing a community area code to each point. Finally, we compute the point count by community area.
281+
we carry out a spatial join between our points object and the polygon object to assign a community area code to each point. Finally, we compute the point count by community area.
282282

283283
### Community Area boundary file {-}
284284
We resort to the City of Chicago open data portal for the boundary file of

0 commit comments

Comments
 (0)