greeting(
geomarker_name = "roads",
version = "0.1",
description = "calculates proximity and length of nearby major roadways"
)
#>
#> downloading latest information about images in core library... ■■■■■■■■■■■■■■■■…── Welcome to DeGAUSS! ──
#> downloading latest information about images in core library... ■■■■■■■■■■■■■■■■…
#> downloading latest information about images in core library... ■■■■■■■■■■■■■■■■…• You are using roads, version 0.1
#> downloading latest information about images in core library... ■■■■■■■■■■■■■■■■…• This container returns calculates proximity and length of nearby major
#> roadways
#> downloading latest information about images in core library... ■■■■■■■■■■■■■■■■…• <https://degauss.org/roads>
#> downloading latest information about images in core library... ■■■■■■■■■■■■■■■■…
#> downloading latest information about images in core library... ■■■■■■■■■■■■■■■■…
(Here we supplied values to use in the greeting, but from inside a
DeGAUSS container these will be automatically picked up based on the environment variables that
capture metadata using just dht::greeting()
.)
(d <- read_lat_lon_csv('../tests/testthat/my_address_file_geocoded.csv',
sf = T, project_to_crs = 5072))
#> ℹ loading input file...
#> downloading latest information about images in core library...
#> ■■■■■■■■■■■■■■■■…
#> # A tibble: 5 × 6
#> id lat lon start_date end_date .row
#> <dbl> <dbl> <dbl> <chr> <chr> <int>
#> 1 55001310120 NA NA 6/11/20 6/18/20 1
#> 2 55000100280 39.2 -84.6 3/1/17 3/8/17 2
#> 3 55000100281 39.3 -84.5 1/30/12 2/6/12 3
#> 4 55000100282 39.2 -84.4 12/1/20 12/8/20 4
#> 5 55000100283 39.2 -84.4 4/8/19 4/15/19 5
Returns a list with two elements – the raw data and tibble nested on row (to prevent calculations with duplicate lat/lon).
Nothing is returned if the column is present. An error is thrown if the column is not present.
Again, nothing is returned if the column type matches the desired type. A warning is displayed if the column type does not match the desired type.
If dates are in slash (1/1/21) or ISO (2021-01-01) format, they are returned in ISO format. If dates are in another format, a helpful error message is generated.
Unnests the tibble created with read_lat_lon_csv()
and
merges back to raw data, then writes the output csv with container name
and version appended to filename.
write_geomarker_file(d = d,
raw_data = d,
filename = 'tests/my_address_file_geocoded.csv',
geomarker_name = 'roads',
version = '0.1')
From inside of a DeGAUSS container, where the environment variables that capture metadata are available, this can be accomplished with just: