You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interactive plotly output is [edtf_plotly_category_ym_threats_types.html](https://eamena-project.github.io/eamenaR/results/edtf_plotly_category_ym_threats_types.html)
645
645
646
-
# Users
646
+
# General statistics
647
647
648
-
The function [`ref_users()`](https://eamena-project.github.io/eamenaR/doc/ref_users) provides basic statistics on the users of the EAMENA database, for example by plotting the cumulative distribution function of the user first registration:
648
+
## Users
649
+
650
+
The function [`ref_db()`](https://eamena-project.github.io/eamenaR/doc/ref_db) provides basic statistics on the users of the EAMENA database, for example by plotting the cumulative distribution function of the user first registration:
Here we restrict the plot to dates after 2020-08-01 (option `date.after`). The option `plot.g = T` gives this plot:
@@ -671,7 +673,7 @@ Here we restrict the plot to dates after 2020-08-01 (option `date.after`). The o
671
673
The total number of users can also be restricted to an interval (options `date.after` and `date.before`), for example limiting the count to the year 2022:
672
674
673
675
```
674
-
d <- ref_users(db.con = my_con,
676
+
d <- ref_db(db.con = my_con,
675
677
stat.name = "users_date_joined_2",
676
678
d = d,
677
679
date.after = "2022-01-01",
@@ -724,149 +726,6 @@ The `dist` shows that the geometries are exactly the same, and that there are sl
A --1. GeoJSON<br><b>POINT</b>--> F("geojson_shp()"):::eamenaRfunction;
734
-
F --2. SHP--> G((GIS));
735
-
G --3. create<br><b>POLYGON</b>--> G;
736
-
G --4. SHP--> F;
737
-
C --2. KML/KMZ--> B((Google<br>Earth));
738
-
B --3. create<br><b>POLYGON</b>--> B;
739
-
B --4. KML/KMZ--> C;
740
-
C --5. GeoJSON<br><b>POLYGON</b>--> D("geojson_csv()"):::eamenaRfunction;
741
-
F --5. GeoJSON<br><b>POLYGON</b>--> D:::eamenaRfunction;
742
-
D --6. append<br>new geometries--> A;
743
-
classDef eamenaRfunction fill:#e7deca;
744
-
```
745
-
746
-
#### Integrating Google Earth geometries
747
-
748
-
Most of the geometries in EAMENA are POINTS (`Geometry Type` = `Center Point`). The objective is to acquire new geometries, like POLYGONs, created in third part app, like Google Earth or a GIS, and to append them to already existing records in EAMENA.
1. Export a GeoJSON file from EAMENA (see: [GeoJSON files](https://github.com/eamena-project/eamenaR#geojson-files)), for example **caravanserail.geojson** ([rendered](https://github.com/eamena-project/eamena-arches-dev/blob/main/data/geojson/caravanserail.geojson) | [raw](https://raw.githubusercontent.com/eamena-project/eamena-arches-dev/main/data/geojson/caravanserail.geojson)) Heritage Places.
786
-
787
-
<aname="geojson_kml"></a>
788
-
789
-
2. Convert **caravanserail.geojson** to a KML file named 'caravanserail_outKML.kml' with the [`geojson_kml()`](https://eamena-project.github.io/eamenaR/doc/geojson_kml) function, filtering on POINTS[^3]:
790
-
791
-
```
792
-
library(dplyr)
793
-
geojson_kml(geom.types = c("POINT"),
794
-
geojson.name = "caravanserail_outKML")
795
-
```
796
-
797
-

798
-
799
-
<aname="bulk_append_3"></a>
800
-
801
-
3. Open 'caravanserail_outKML' in Google Earth and draw POLYGONS. Name the newly created POLYGONS with the ResourceID of a given HP.
802
-
803
-

804
-
805
-
4. Export as KML ('caravanserail_outKML2.kml')
806
-
5. Convert 'caravanserail_outKML2.kml' into GeoJSON with the [`geojson_kml()`](https://eamena-project.github.io/eamenaR/doc/geojson_kml) function selecting only the POLYGONs (ie, the new geometries).
The result is new POLYGON geometries (eg. [caravanserail_outGeoJSON.geojson](https://raw.githubusercontent.com/eamena-project/eamenaR/main/results/caravanserail_outGeoJSON.geojson))
816
-
817
-
818
-
6. Convert the GeoJSON POLYGONs geometries to a format compliant with the EAMENA DB, using the [`geojson_csv()`](https://eamena-project.github.io/eamenaR/doc/geojson_csv) function
The result is a CSV file, [caravanserail_outCSV.csv](https://github.com/eamena-project/eamenaR/blob/main/inst/extdata/caravanserail_outCSV.csv), with the ResourceID and the geometry of each HP. The fields "Location Certainty" and "Geometry Extent Certainty" are filled with default values.
827
-
828
-
<aname="bulk_append_6"></a>
829
-
```
830
-
"resourceid","Geometric Place Expression","Location Certainty","Geometry Extent Certainty"
7. These new geometries will be uploaded into the EAMENA DB and append to existing HP. But it should be safe to first check that every ResourceID exist in the DB (maybe a newly created POLYGON has a typo in its name). Use the [`uuid_id()`](https://eamena-project.github.io/eamenaR/doc/uuid_id) function, in a loop to confirm the existence of the ResourceID
As there are no `NA` in front of the ResourceID, the HP listed in the CSV file exist in the DB.
859
-
860
-
8. To append these geometries to the DB, use the `-ow append` option in the `import_business_data` function (see the [Arches documentation](https://arches.readthedocs.io/en/5.1/command-line-reference/#import-business-data))
Now, each of these two HP has two different kind of geometries: POINT and POLYGON. See for example the whole dataset of caravanserails
868
-
[caravanserail_polygon.geojson](https://github.com/eamena-project/eamenaR/blob/main/inst/extdata/caravanserail_polygon.geojson), one of the record rendered ([EAMENA-0192281.geojson](https://github.com/eamena-project/eamenaR/blob/main/inst/extdata/EAMENA-0192281.geojson)) or this latter record in the [EAMENA DB](https://database.eamena.org/en/report/8db560d5-d17d-40ff-8046-0157b1b698ab)[^4].
869
-
870
729
### BU mapping
871
730
872
731
Get a BU file (*target*, see ["what is a BU?"](https://github.com/eamena-project/eamena-arches-dev/tree/main/data/bulk#bulk-upload-bu--)) from an already structured file (*source*) with the [list_mapping_bu()](https://eamena-project.github.io/eamenaR/doc/list_mapping_bu) function. This function uses a mapping file to create the equivalences between the source file and the target file
@@ -1027,6 +886,133 @@ The data from this new worksheet can be copied/pasted into a [BU template](https
1027
886
</p>
1028
887
1029
888
889
+
### BU append
890
+
891
+
#### Integrating Google Earth geometries
892
+
893
+
Most of the geometries in EAMENA are POINTS (`Geometry Type` = `Center Point`). The objective is to acquire new geometries, like POLYGONs, created in third part app, like Google Earth or a GIS, and to append them to already existing records in EAMENA.
1. Export a GeoJSON file from EAMENA (see: [GeoJSON files](https://github.com/eamena-project/eamenaR#geojson-files)), for example **caravanserail.geojson** ([rendered](https://github.com/eamena-project/eamena-arches-dev/blob/main/data/geojson/caravanserail.geojson) | [raw](https://raw.githubusercontent.com/eamena-project/eamena-arches-dev/main/data/geojson/caravanserail.geojson)) Heritage Places.
931
+
932
+
<aname="geojson_kml"></a>
933
+
934
+
2. Convert **caravanserail.geojson** to a KML file named 'caravanserail_outKML.kml' with the [`geojson_kml()`](https://eamena-project.github.io/eamenaR/doc/geojson_kml) function, filtering on POINTS[^3]:
935
+
936
+
```
937
+
library(dplyr)
938
+
geojson_kml(geom.types = c("POINT"),
939
+
geojson.name = "caravanserail_outKML")
940
+
```
941
+
942
+

943
+
944
+
<aname="bulk_append_3"></a>
945
+
946
+
3. Open 'caravanserail_outKML' in Google Earth and draw POLYGONS. Name the newly created POLYGONS with the ResourceID of a given HP.
947
+
948
+

949
+
950
+
4. Export as KML ('caravanserail_outKML2.kml')
951
+
5. Convert 'caravanserail_outKML2.kml' into GeoJSON with the [`geojson_kml()`](https://eamena-project.github.io/eamenaR/doc/geojson_kml) function selecting only the POLYGONs (ie, the new geometries).
The result is new POLYGON geometries (eg. [caravanserail_outGeoJSON.geojson](https://raw.githubusercontent.com/eamena-project/eamenaR/main/results/caravanserail_outGeoJSON.geojson))
961
+
962
+
963
+
6. Convert the GeoJSON POLYGONs geometries to a format compliant with the EAMENA DB, using the [`geojson_csv()`](https://eamena-project.github.io/eamenaR/doc/geojson_csv) function
The result is a CSV file, [caravanserail_outCSV.csv](https://github.com/eamena-project/eamenaR/blob/main/inst/extdata/caravanserail_outCSV.csv), with the ResourceID and the geometry of each HP. The fields "Location Certainty" and "Geometry Extent Certainty" are filled with default values.
972
+
973
+
<aname="bulk_append_6"></a>
974
+
```
975
+
"resourceid","Geometric Place Expression","Location Certainty","Geometry Extent Certainty"
7. These new geometries will be uploaded into the EAMENA DB and append to existing HP. But it should be safe to first check that every ResourceID exist in the DB (maybe a newly created POLYGON has a typo in its name). Use the [`uuid_id()`](https://eamena-project.github.io/eamenaR/doc/uuid_id) function, in a loop to confirm the existence of the ResourceID
As there are no `NA` in front of the ResourceID, the HP listed in the CSV file exist in the DB.
1004
+
1005
+
8. To append these geometries to the DB, use the `-ow append` option in the `import_business_data` function (see the [Arches documentation](https://arches.readthedocs.io/en/5.1/command-line-reference/#import-business-data))
Now, each of these two HP has two different kind of geometries: POINT and POLYGON. See for example the whole dataset of caravanserails
1013
+
[caravanserail_polygon.geojson](https://github.com/eamena-project/eamenaR/blob/main/inst/extdata/caravanserail_polygon.geojson), one of the record rendered ([EAMENA-0192281.geojson](https://github.com/eamena-project/eamenaR/blob/main/inst/extdata/EAMENA-0192281.geojson)) or this latter record in the [EAMENA DB](https://database.eamena.org/en/report/8db560d5-d17d-40ff-8046-0157b1b698ab)[^4].
0 commit comments