Description Usage Arguments Value Examples
Join variables with coordinates to the destination file by ID, so it requires an ID file with coordinates
1 2 3 4 5 6 7 | join_by_id(
IDfile,
coordinatefile,
file2merge = merged,
varname = "value",
newname
)
|
IDfile |
sp or dataframe with coordinate and ID that Oliver uses |
coordinatefile |
sp or datafrme with coordinate and variables values (air quality measurements) but no ID |
file2merge |
dataframe to merge to, i.e. file with all the variables |
varname |
the name of the variable in the coordinatefile to merge |
a dataframe
1 2 3 4 5 6 7 | join_by_id(IDfile= testoaq, coordinatefile=meanoaq, file2merge = merged, varname='day_mean')
require(sf)
require(maptools)
require(sp)
meanoaq = read.csv('q_day.csv') #locations and values
testoaq = read.csv('openaqmorethan1000_ch_locations.csv') # ID with locaitons
join_by_id(IDfile= testoaq, coordinatefile=d, file2merge = merged, varname='value', newname = 'day_value')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.