Skip to content

Commit 24c0f06

Browse files
committed
varia
1 parent 03cd9a3 commit 24c0f06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3785
-409
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Type: Package
33
Title: Statistical analysis of the EAMENA database
44
Description: Statistical analysis of the EAMENA database
55
Version: 0.1.1
6-
Authors@R: c(person("Thomas", "Huet", email = "thomas.huet@arch.ox.ac.uk", role = c("aut", "cre"), comment=c(ORCID="0000-0002-1112-6122")), person("Michael", "Fradley", email = "michael.fradley@arch.ox.ac.uk", role = c("ctb")))
6+
Authors@R: c(person("Thomas", "Huet", email = "thomas.huet@arch.ox.ac.uk", role = c("aut", "cre"), comment=c(ORCID="0000-0002-1112-6122")), person("Michael", "Fradley", email = "michael.fradley@arch.ox.ac.uk", role = c("ctb"), comment=c(ORCID="0000-0002-3719-2523")))
77
Depends:
88
R (>= 3.0.1)
99
License: MIT

NAMESPACE

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ export(geojson_addZ)
44
export(geojson_boxplot)
55
export(geojson_csv)
66
export(geojson_format_path)
7-
export(geojson_get_field)
87
export(geojson_kml)
98
export(geojson_map)
109
export(geojson_map_path)
11-
export(geojson_measurements)
1210
export(geojson_shp)
1311
export(geojson_stat)
1412
export(geom_bbox)

doc/geojson_addZ.html

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Add a Z value to geometries</title>
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Add Z value to geometries and export in a new file</title>
22
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
44
<link rel="stylesheet" type="text/css" href="R.css" />
55
</head><body><div class="container">
66

77
<table width="100%" summary="page for geojson_addZ"><tr><td>geojson_addZ</td><td style="text-align: right;">R Documentation</td></tr></table>
88

9-
<h2>Add a Z value to geometries</h2>
9+
<h2>Add Z value to geometries and export in a new file</h2>
1010

1111
<h3>Description</h3>
1212

13-
<p>Use a geoserver API to recover the Z for a given set of points stored in a GeoJSON file. The geoserver API can lead to a Timeout.
13+
<p>Use geoserver API to recover the Z for given set of points stored in GeoJSON file. Geoserver API can lead to Timeout.
1414
</p>
1515

1616

@@ -21,11 +21,12 @@ <h3>Usage</h3>
2121
geojson.path = paste0(system.file(package = "eamenaR"),
2222
"/extdata/caravanserail.geojson"),
2323
geojson.out = NA,
24-
elevation.api = "open-elevation",
24+
ids = "EAMENA ID",
25+
elevation.api = "gmrt_point",
2526
timeout = 30,
2627
sleep = 0.3,
2728
dirOut = paste0(system.file(package = "eamenaR"), "/results/"),
28-
verbose = T
29+
verbose = TRUE
2930
)
3031
</pre>
3132

@@ -35,15 +36,19 @@ <h3>Arguments</h3>
3536
<table summary="R argblock">
3637
<tr valign="top"><td><code>geojson.path</code></td>
3738
<td>
38-
<p>the path of the GeoJSON file. By default 'caravanserail.geojson'.</p>
39+
<p>path of GeoJSON file. By default 'caravanserail.geojson'.</p>
3940
</td></tr>
4041
<tr valign="top"><td><code>geojson.out</code></td>
4142
<td>
42-
<p>the name of the output file. By default NA, will add the suffix 'Z' to the the name of the GeoJSON file (variable 'geojson.path').</p>
43+
<p>name of output file. By default NA, will add suffix 'Z' to name of GeoJSON file (variable 'geojson.path').</p>
44+
</td></tr>
45+
<tr valign="top"><td><code>ids</code></td>
46+
<td>
47+
<p>field having the unique keys, to remove duplicated geometries. By default &quot;EAMENA ID&quot;.</p>
4348
</td></tr>
4449
<tr valign="top"><td><code>elevation.api</code></td>
4550
<td>
46-
<p>the geoserver API that will be used to collect the elevation, by default 'open-elevation' (https://api.open-elevation.com/). Another option is 'gmrt' (https://www.gmrt.org).</p>
51+
<p>the geoserver API used to collect the elevation, by default 'gmrt_point' (https://www.gmrt.org). Another option is 'gmrt_profile', and 'open-elevation' (https://api.open-elevation.com/).</p>
4752
</td></tr>
4853
<tr valign="top"><td><code>timeout</code></td>
4954
<td>
@@ -55,7 +60,7 @@ <h3>Arguments</h3>
5560
</td></tr>
5661
<tr valign="top"><td><code>dirOut</code></td>
5762
<td>
58-
<p>the folder where the outputs will be saved. By default: '/results'. If it doesn't exist, it will be created. Only useful is export plot is TRUE.</p>
63+
<p>the folder where outputs will be saved. By default: '/results'. If folder doesn't exist, it will be created.</p>
5964
</td></tr>
6065
<tr valign="top"><td><code>verbose</code></td>
6166
<td>
@@ -68,8 +73,10 @@ <h3>Examples</h3>
6873

6974
<pre>
7075

71-
df &lt;- geojson_addZ(geojson.path = "C:/Rprojects/eamenaR/inst/extdata/caravanserail.geojson",
72-
dirOut = "C:/Rprojects/eamenaR/inst/extdata/")
76+
df &lt;- geojson_addZ()
77+
78+
# using 'open-elevation' as API
79+
df &lt;- geojson_addZ(elevation.api = 'open-elevation')
7380

7481

7582
</pre>

doc/geojson_analysis.html

Lines changed: 0 additions & 82 deletions
This file was deleted.

doc/geojson_boxplot.html

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Create a boxplot or various boxplots of path lengths between...</title>
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Create boxplot or various boxplots of path lengths between...</title>
22
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
44
<link rel="stylesheet" type="text/css" href="R.css" />
55
</head><body><div class="container">
66

77
<table width="100%" summary="page for geojson_boxplot"><tr><td>geojson_boxplot</td><td style="text-align: right;">R Documentation</td></tr></table>
88

9-
<h2>Create a boxplot or various boxplots of path lengths between different heritage places</h2>
9+
<h2>Create boxplot or various boxplots of path lengths between different heritage places</h2>
1010

1111
<h3>Usage</h3>
1212

@@ -37,51 +37,55 @@ <h3>Arguments</h3>
3737
<table summary="R argblock">
3838
<tr valign="top"><td><code>stat.name</code></td>
3939
<td>
40-
<p>the name of the output file and of the plot. By default &quot;caravanserais_areas&quot;.</p>
40+
<p>name of output file and plot. Default &quot;caravanserais_areas&quot;.</p>
41+
</td></tr>
42+
<tr valign="top"><td><code>concept.name</code></td>
43+
<td>
44+
<p>key used to identify heritage places. Default &quot;hp.id&quot;.</p>
4145
</td></tr>
4246
<tr valign="top"><td><code>geojson.path</code></td>
4347
<td>
44-
<p>the path of the GeoJSON file. By default 'caravanserail.geojson'.</p>
48+
<p>path of GeoJSON file. Default 'caravanserail.geojson'.</p>
4549
</td></tr>
4650
<tr valign="top"><td><code>csv.path</code></td>
4751
<td>
48-
<p>the path to the CSV where the edges between two heritage places are recorded.</p>
52+
<p>path to CSV where edges between two heritage places are recorded.</p>
4953
</td></tr>
5054
<tr valign="top"><td><code>stat</code></td>
5155
<td>
52-
<p>the statistic that will be computed. The different values can be &quot;area&quot; for areas, or &quot;dist&quot; for distances between heritage places. By default 'area'.</p>
56+
<p>statistic that will be computed. Different values can be &quot;area&quot; for areas, or &quot;dist&quot; for distances between heritage places. Default 'area'.</p>
5357
</td></tr>
5458
<tr valign="top"><td><code>chart.type</code></td>
5559
<td>
56-
<p>the type of chart that will be plot. By default, &quot;boxplot&quot;.</p>
57-
</td></tr>
58-
<tr valign="top"><td><code>by</code></td>
59-
<td>
60-
<p>the name of the field on which the paths will be grouped. For example &quot;route&quot;. Will create as many plots as there is different categories. By default NA.</p>
60+
<p>type of chart that will be plot. Default, &quot;boxplot&quot;.</p>
6161
</td></tr>
6262
<tr valign="top"><td><code>interactive</code></td>
6363
<td>
64-
<p>if TRUE, create a Plotly chart. By default, FALSE.</p>
64+
<p>if TRUE, create a Plotly chart. Default, FALSE.</p>
6565
</td></tr>
6666
<tr valign="top"><td><code>export.plot</code></td>
6767
<td>
68-
<p>if TRUE, will save the plot. By default, FALSE.</p>
68+
<p>if TRUE, will save the plot. Default, FALSE.</p>
6969
</td></tr>
7070
<tr valign="top"><td><code>dirOut</code></td>
7171
<td>
72-
<p>the folder where the outputs will be saved. By default: '/results'.If it doesn't exist, it will be created. Only useful is export plot is TRUE.</p>
72+
<p>folder where outputs will be saved. Default: '/results'. If it doesn't exist, will be created. Only useful is export plot is TRUE.</p>
7373
</td></tr>
7474
<tr valign="top"><td><code>fig.width, fig.height</code></td>
7575
<td>
76-
<p>size of the output chart.</p>
76+
<p>size of output chart.</p>
7777
</td></tr>
7878
<tr valign="top"><td><code>color.set</code></td>
7979
<td>
80-
<p>the RBrewer color set. By default &quot;Set1&quot;.</p>
80+
<p>the RBrewer color set. Default &quot;Set1&quot;.</p>
8181
</td></tr>
8282
<tr valign="top"><td><code>verbose</code></td>
8383
<td>
84-
<p>if TRUE (by default), print messages.</p>
84+
<p>if TRUE (Default), print messages.</p>
85+
</td></tr>
86+
<tr valign="top"><td><code>name</code></td>
87+
<td>
88+
<p>of field on which paths will be grouped. Example &quot;route&quot;. Will create as many plots as there are different categories. By default NA.</p>
8589
</td></tr>
8690
</table>
8791

doc/geojson_csv.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h2>Convert from GeoJSON to CSV</h2>
1010

1111
<h3>Description</h3>
1212

13-
<p>This function allows file format conversion from GeoJSON to CSV. The output CSV file then can be imported into the EAMENA DB with a bulk upload append procedure.
13+
<p>Function allows file format conversion from GeoJSON to CSV. Output CSV file can be imported into EAMENA DB with bulk upload append procedure.
1414
</p>
1515

1616

@@ -33,23 +33,23 @@ <h3>Arguments</h3>
3333
<table summary="R argblock">
3434
<tr valign="top"><td><code>geom.path</code></td>
3535
<td>
36-
<p>the path to the GeoJSON file. This file comes from the 'geojson_kml()' function.</p>
36+
<p>path to GeoJSON file. File comes from the 'geojson_kml()' function.</p>
3737
</td></tr>
3838
<tr valign="top"><td><code>export</code></td>
3939
<td>
40-
<p>if TRUE (by default), will export the GeoJSON to a CSV file.</p>
40+
<p>if TRUE (default), will export GeoJSON to CSV file.</p>
4141
</td></tr>
4242
<tr valign="top"><td><code>dirOut</code></td>
4343
<td>
44-
<p>the path to the folder where the CSV file will be created.</p>
44+
<p>path to folder where CSV file will be created.</p>
4545
</td></tr>
4646
<tr valign="top"><td><code>csv.name</code></td>
4747
<td>
48-
<p>the name of the CSV that will be created without the extension</p>
48+
<p>name of CSV that will be created without the extension</p>
4949
</td></tr>
5050
<tr valign="top"><td><code>verbose</code></td>
5151
<td>
52-
<p>if TRUE (by default) then display different messages.</p>
52+
<p>if TRUE (default) then display different messages.</p>
5353
</td></tr>
5454
</table>
5555

doc/geojson_format_path.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Format data on paths</title>
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Alignment of heritage place data and heritage place paths...</title>
22
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
44
<link rel="stylesheet" type="text/css" href="R.css" />
55
</head><body><div class="container">
66

77
<table width="100%" summary="page for geojson_format_path"><tr><td>geojson_format_path</td><td style="text-align: right;">R Documentation</td></tr></table>
88

9-
<h2>Format data on paths</h2>
9+
<h2>Alignment of heritage place data and heritage place paths data</h2>
1010

1111
<h3>Description</h3>
1212

13-
<p>Use a dataframe of heritage places (ie, places, vertices), and a file of paths (as edges) between these heritage places, to format a new dataframe. The heritage places (HP) are stored in a GeoJSON file. The paths between these HP are stored in a CSV file. The function cleans the datasets removing existing paths linking two heritage places that don't not exist in the GeoJSON. This new dataframe is used by the functions 'geojson_map_path()', 'geojson_boxplot_path()' to model the dataset with network analysis.
13+
<p>Use dataframe of heritage places (ie, places, vertices), and file of paths (as edges) between these heritage places, to format new dataframe. Heritage places (HP) are stored in GeoJSON file. Paths between HP are stored in CSV file. Function cleans the datasets, removing existing paths linking two heritage places that don't not exist in the GeoJSON. New dataframe is used by functions 'geojson_map_path()', 'geojson_boxplot_path()' to model dataset with network analysis.
1414
</p>
1515

1616

@@ -34,30 +34,30 @@ <h3>Arguments</h3>
3434
<table summary="R argblock">
3535
<tr valign="top"><td><code>geojson.path</code></td>
3636
<td>
37-
<p>the path of the GeoJSON file. By default 'caravanserail.geojson'.</p>
37+
<p>path of GeoJSON file. Default 'caravanserail.geojson'.</p>
3838
</td></tr>
3939
<tr valign="top"><td><code>csv.path</code></td>
4040
<td>
41-
<p>the path to the CSV where the edges between two heritage places are recorded. By default 'caravanserail_paths.csv'.</p>
42-
</td></tr>
43-
<tr valign="top"><td><code>by</code></td>
44-
<td>
45-
<p>the name of the field on which the paths will be grouped. For example &quot;route&quot;. Will create as many plots as there is different categories. By default NA.</p>
41+
<p>path to CSV where edges between two heritage places are recorded. Default 'caravanserail_paths.csv'.</p>
4642
</td></tr>
4743
<tr valign="top"><td><code>concept.name</code></td>
4844
<td>
49-
<p>the concept that will be retrieve from the 'ids.csv' file. By default &quot;hp.id&quot;.</p>
45+
<p>concept that will be retrieve from the 'ids.csv' file. Default &quot;hp.id&quot;.</p>
5046
</td></tr>
5147
<tr valign="top"><td><code>verbose</code></td>
5248
<td>
53-
<p>if TRUE (by default), print messages.</p>
49+
<p>if TRUE (default), print messages.</p>
50+
</td></tr>
51+
<tr valign="top"><td><code>name</code></td>
52+
<td>
53+
<p>of field on which paths will be grouped. Example &quot;route&quot;. Will create as many plots as there are different categories. Default NA.</p>
5454
</td></tr>
5555
</table>
5656

5757

5858
<h3>Value</h3>
5959

60-
<p>A dataframe with the appropriate columns: &quot;from.id&quot;, &quot;from&quot;, &quot;to.id&quot;, &quot;to&quot;, &quot;from.geom&quot;, &quot;to.geom&quot;, &quot;path.wkt&quot;, &quot;dist.m&quot;, &quot;route&quot;
60+
<p>Dataframe with appropriate columns: &quot;from.id&quot;, &quot;from&quot;, &quot;to.id&quot;, &quot;to&quot;, &quot;from.geom&quot;, &quot;to.geom&quot;, &quot;path.wkt&quot;, &quot;dist.m&quot;, &quot;route&quot;
6161
</p>
6262

6363

0 commit comments

Comments
 (0)