├── Gambia.gdb ├── gdb ├── timestamps ├── a00000009.spx ├── a0000000f.spx ├── a00000019.spx ├── a0000001b.spx ├── a00000001.freelist ├── a00000001.gdbtable ├── a00000001.gdbtablx ├── a00000002.gdbtable ├── a00000002.gdbtablx ├── a00000003.gdbtable ├── a00000003.gdbtablx ├── a00000004.freelist ├── a00000004.gdbtable ├── a00000004.gdbtablx ├── a00000005.gdbtable ├── a00000005.gdbtablx ├── a00000006.freelist ├── a00000006.gdbtable ├── a00000006.gdbtablx ├── a00000007.gdbtable ├── a00000007.gdbtablx ├── a00000009.freelist ├── a00000009.gdbtable ├── a00000009.gdbtablx ├── a0000000f.freelist ├── a0000000f.gdbtable ├── a0000000f.gdbtablx ├── a00000019.gdbtable ├── a00000019.gdbtablx ├── a0000001b.gdbtable ├── a0000001b.gdbtablx ├── a00000001.gdbindexes ├── a00000003.gdbindexes ├── a00000004.gdbindexes ├── a00000005.gdbindexes ├── a00000006.gdbindexes ├── a00000007.gdbindexes ├── a00000009.gdbindexes ├── a0000000f.gdbindexes ├── a00000019.gdbindexes ├── a0000001b.gdbindexes ├── a00000004.FDO_UUID.atx ├── a00000006.FDO_UUID.atx ├── a00000001.TablesByName.atx ├── a00000004.CatItemsByType.atx ├── a00000006.CatRelsByType.atx ├── a00000006.CatRelsByOriginID.atx ├── a00000007.CatRelTypesByName.atx ├── a00000005.CatItemTypesByName.atx ├── a00000004.CatItemsByPhysicalName.atx ├── a00000006.CatRelsByDestinationID.atx ├── a00000007.CatRelTypesByBackwardLabel.atx ├── a00000007.CatRelTypesByForwardLabel.atx ├── a00000005.CatItemTypesByUUID.atx ├── a00000007.CatRelTypesByUUID.atx ├── a00000005.CatItemTypesByParentTypeID.atx ├── a00000007.CatRelTypesByDestItemTypeID.atx ├── a00000007.CatRelTypesByOriginItemTypeID.atx └── a00000004.spx ├── data.gdb ├── gdb ├── timestamps ├── a00000004.spx ├── a00000009.spx ├── a0000000a.spx ├── a00000011.spx ├── a00000001.freelist ├── a00000001.gdbtable ├── a00000001.gdbtablx ├── a00000002.gdbtable ├── a00000002.gdbtablx ├── a00000003.gdbtable ├── a00000003.gdbtablx ├── a00000004.freelist ├── a00000004.gdbtable ├── a00000004.gdbtablx ├── a00000005.gdbtable ├── a00000005.gdbtablx ├── a00000006.freelist ├── a00000006.gdbtable ├── a00000006.gdbtablx ├── a00000007.gdbtable ├── a00000007.gdbtablx ├── a00000009.gdbtable ├── a0000000a.gdbtable ├── a0000000a.gdbtablx ├── a00000011.gdbtable ├── a00000011.gdbtablx ├── a00000001.gdbindexes ├── a00000003.gdbindexes ├── a00000004.gdbindexes ├── a00000005.gdbindexes ├── a00000006.gdbindexes ├── a00000007.gdbindexes ├── a00000009.gdbindexes ├── a0000000a.gdbindexes ├── a00000011.gdbindexes ├── a00000004.FDO_UUID.atx ├── a00000006.FDO_UUID.atx ├── a00000001.TablesByName.atx ├── a00000004.CatItemsByType.atx ├── a00000006.CatRelsByType.atx ├── a00000005.CatItemTypesByName.atx ├── a00000006.CatRelsByOriginID.atx ├── a00000007.CatRelTypesByName.atx ├── a00000004.CatItemsByPhysicalName.atx ├── a00000006.CatRelsByDestinationID.atx ├── a00000007.CatRelTypesByBackwardLabel.atx ├── a00000007.CatRelTypesByForwardLabel.atx ├── a00000005.CatItemTypesByUUID.atx ├── a00000007.CatRelTypesByUUID.atx ├── a00000005.CatItemTypesByParentTypeID.atx ├── a00000007.CatRelTypesByDestItemTypeID.atx ├── a00000007.CatRelTypesByOriginItemTypeID.atx └── a00000009.gdbtablx ├── Seagrass.gdb ├── gdb ├── timestamps ├── a00000009.spx ├── a00000001.gdbtable ├── a00000001.gdbtablx ├── a00000002.gdbtable ├── a00000002.gdbtablx ├── a00000003.gdbtable ├── a00000004.gdbtable ├── a00000004.gdbtablx ├── a00000005.gdbtable ├── a00000005.gdbtablx ├── a00000006.gdbtable ├── a00000006.gdbtablx ├── a00000007.gdbtable ├── a00000007.gdbtablx ├── a00000009.gdbtable ├── a00000009.gdbtablx ├── a00000001.gdbindexes ├── a00000003.gdbindexes ├── a00000004.gdbindexes ├── a00000005.gdbindexes ├── a00000006.gdbindexes ├── a00000007.gdbindexes ├── a00000009.gdbindexes ├── a00000001.TablesByName.atx ├── a00000007.CatRelTypesByName.atx ├── a00000005.CatItemTypesByName.atx ├── a00000004.CatItemsByPhysicalName.atx ├── a00000007.CatRelTypesByForwardLabel.atx ├── a00000007.CatRelTypesByBackwardLabel.atx ├── a00000004.spx ├── a00000004.FDO_UUID.atx ├── a00000006.FDO_UUID.atx ├── a00000006.CatRelsByType.atx ├── a00000004.CatItemsByType.atx ├── a00000006.CatRelsByOriginID.atx ├── a00000005.CatItemTypesByUUID.atx ├── a00000006.CatRelsByDestinationID.atx ├── a00000007.CatRelTypesByUUID.atx ├── a00000005.CatItemTypesByParentTypeID.atx ├── a00000007.CatRelTypesByDestItemTypeID.atx ├── a00000007.CatRelTypesByOriginItemTypeID.atx └── a00000003.gdbtablx ├── .gitignore ├── R Sample Tools.tbx ├── LogisticRegression.aprx ├── ModelBasedClustering.mxd ├── symbology ├── pred_symb.lyr ├── brcm_symbology.lyr ├── clusters_result_10.lyr ├── clusters_polygons_10.lyr ├── predictions_feature.lyr ├── DensityPoints_Symbology.lyr └── ellipses_symbology_10.lyr ├── ModelBasedClustering.aprx ├── SemiparametricRegression.aprx ├── SemiparametricRegression.mxd ├── R-ArcGIS Bridge Live Training Seminar.tbx ├── Documentation ├── Semiparametric regression.pdf ├── Model Based Cluster Analysis.pdf └── Live Training Seminar Materials - Logistic Regression.pdf ├── README.md └── scripts ├── semi_par_regression.R ├── clustering.R └── Logistic_Regression_Wrappings.R /Gambia.gdb/gdb: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /data.gdb/gdb: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Seagrass.gdb/gdb: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Thumbs.db 2 | -------------------------------------------------------------------------------- /R Sample Tools.tbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/R Sample Tools.tbx -------------------------------------------------------------------------------- /data.gdb/timestamps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/timestamps -------------------------------------------------------------------------------- /Gambia.gdb/timestamps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/timestamps -------------------------------------------------------------------------------- /data.gdb/a00000004.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000004.spx -------------------------------------------------------------------------------- /data.gdb/a00000009.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000009.spx -------------------------------------------------------------------------------- /data.gdb/a0000000a.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a0000000a.spx -------------------------------------------------------------------------------- /data.gdb/a00000011.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000011.spx -------------------------------------------------------------------------------- /Gambia.gdb/a00000009.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000009.spx -------------------------------------------------------------------------------- /Gambia.gdb/a0000000f.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a0000000f.spx -------------------------------------------------------------------------------- /Gambia.gdb/a00000019.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000019.spx -------------------------------------------------------------------------------- /Gambia.gdb/a0000001b.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a0000001b.spx -------------------------------------------------------------------------------- /LogisticRegression.aprx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/LogisticRegression.aprx -------------------------------------------------------------------------------- /ModelBasedClustering.mxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/ModelBasedClustering.mxd -------------------------------------------------------------------------------- /Seagrass.gdb/timestamps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/timestamps -------------------------------------------------------------------------------- /symbology/pred_symb.lyr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/symbology/pred_symb.lyr -------------------------------------------------------------------------------- /ModelBasedClustering.aprx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/ModelBasedClustering.aprx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000009.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000009.spx -------------------------------------------------------------------------------- /data.gdb/a00000001.freelist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000001.freelist -------------------------------------------------------------------------------- /data.gdb/a00000001.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000001.gdbtable -------------------------------------------------------------------------------- /data.gdb/a00000001.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000001.gdbtablx -------------------------------------------------------------------------------- /data.gdb/a00000002.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000002.gdbtable -------------------------------------------------------------------------------- /data.gdb/a00000002.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000002.gdbtablx -------------------------------------------------------------------------------- /data.gdb/a00000003.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000003.gdbtable -------------------------------------------------------------------------------- /data.gdb/a00000003.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000003.gdbtablx -------------------------------------------------------------------------------- /data.gdb/a00000004.freelist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000004.freelist -------------------------------------------------------------------------------- /data.gdb/a00000004.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000004.gdbtable -------------------------------------------------------------------------------- /data.gdb/a00000004.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000004.gdbtablx -------------------------------------------------------------------------------- /data.gdb/a00000005.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000005.gdbtable -------------------------------------------------------------------------------- /data.gdb/a00000005.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000005.gdbtablx -------------------------------------------------------------------------------- /data.gdb/a00000006.freelist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000006.freelist -------------------------------------------------------------------------------- /data.gdb/a00000006.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000006.gdbtable -------------------------------------------------------------------------------- /data.gdb/a00000006.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000006.gdbtablx -------------------------------------------------------------------------------- /data.gdb/a00000007.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000007.gdbtable -------------------------------------------------------------------------------- /data.gdb/a00000007.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000007.gdbtablx -------------------------------------------------------------------------------- /data.gdb/a00000009.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000009.gdbtable -------------------------------------------------------------------------------- /data.gdb/a0000000a.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a0000000a.gdbtable -------------------------------------------------------------------------------- /data.gdb/a0000000a.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a0000000a.gdbtablx -------------------------------------------------------------------------------- /data.gdb/a00000011.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000011.gdbtable -------------------------------------------------------------------------------- /data.gdb/a00000011.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000011.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a00000001.freelist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000001.freelist -------------------------------------------------------------------------------- /Gambia.gdb/a00000001.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000001.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a00000001.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000001.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a00000002.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000002.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a00000002.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000002.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a00000003.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000003.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a00000003.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000003.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a00000004.freelist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000004.freelist -------------------------------------------------------------------------------- /Gambia.gdb/a00000004.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000004.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a00000004.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000004.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a00000005.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000005.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a00000005.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000005.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a00000006.freelist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000006.freelist -------------------------------------------------------------------------------- /Gambia.gdb/a00000006.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000006.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a00000006.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000006.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a00000007.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000007.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a00000007.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000007.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a00000009.freelist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000009.freelist -------------------------------------------------------------------------------- /Gambia.gdb/a00000009.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000009.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a00000009.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000009.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a0000000f.freelist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a0000000f.freelist -------------------------------------------------------------------------------- /Gambia.gdb/a0000000f.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a0000000f.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a0000000f.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a0000000f.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a00000019.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000019.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a00000019.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000019.gdbtablx -------------------------------------------------------------------------------- /Gambia.gdb/a0000001b.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a0000001b.gdbtable -------------------------------------------------------------------------------- /Gambia.gdb/a0000001b.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a0000001b.gdbtablx -------------------------------------------------------------------------------- /SemiparametricRegression.aprx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/SemiparametricRegression.aprx -------------------------------------------------------------------------------- /SemiparametricRegression.mxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/SemiparametricRegression.mxd -------------------------------------------------------------------------------- /data.gdb/a00000001.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000001.gdbindexes -------------------------------------------------------------------------------- /data.gdb/a00000003.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000003.gdbindexes -------------------------------------------------------------------------------- /data.gdb/a00000004.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000004.gdbindexes -------------------------------------------------------------------------------- /data.gdb/a00000005.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000005.gdbindexes -------------------------------------------------------------------------------- /data.gdb/a00000006.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000006.gdbindexes -------------------------------------------------------------------------------- /data.gdb/a00000007.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000007.gdbindexes -------------------------------------------------------------------------------- /data.gdb/a00000009.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000009.gdbindexes -------------------------------------------------------------------------------- /data.gdb/a0000000a.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a0000000a.gdbindexes -------------------------------------------------------------------------------- /data.gdb/a00000011.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000011.gdbindexes -------------------------------------------------------------------------------- /symbology/brcm_symbology.lyr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/symbology/brcm_symbology.lyr -------------------------------------------------------------------------------- /Gambia.gdb/a00000001.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000001.gdbindexes -------------------------------------------------------------------------------- /Gambia.gdb/a00000003.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000003.gdbindexes -------------------------------------------------------------------------------- /Gambia.gdb/a00000004.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000004.gdbindexes -------------------------------------------------------------------------------- /Gambia.gdb/a00000005.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000005.gdbindexes -------------------------------------------------------------------------------- /Gambia.gdb/a00000006.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000006.gdbindexes -------------------------------------------------------------------------------- /Gambia.gdb/a00000007.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000007.gdbindexes -------------------------------------------------------------------------------- /Gambia.gdb/a00000009.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000009.gdbindexes -------------------------------------------------------------------------------- /Gambia.gdb/a0000000f.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a0000000f.gdbindexes -------------------------------------------------------------------------------- /Gambia.gdb/a00000019.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000019.gdbindexes -------------------------------------------------------------------------------- /Gambia.gdb/a0000001b.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a0000001b.gdbindexes -------------------------------------------------------------------------------- /Seagrass.gdb/a00000001.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000001.gdbtable -------------------------------------------------------------------------------- /Seagrass.gdb/a00000001.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000001.gdbtablx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000002.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000002.gdbtable -------------------------------------------------------------------------------- /Seagrass.gdb/a00000002.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000002.gdbtablx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000003.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000003.gdbtable -------------------------------------------------------------------------------- /Seagrass.gdb/a00000004.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000004.gdbtable -------------------------------------------------------------------------------- /Seagrass.gdb/a00000004.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000004.gdbtablx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000005.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000005.gdbtable -------------------------------------------------------------------------------- /Seagrass.gdb/a00000005.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000005.gdbtablx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000006.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000006.gdbtable -------------------------------------------------------------------------------- /Seagrass.gdb/a00000006.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000006.gdbtablx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000007.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000007.gdbtable -------------------------------------------------------------------------------- /Seagrass.gdb/a00000007.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000007.gdbtablx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000009.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000009.gdbtable -------------------------------------------------------------------------------- /Seagrass.gdb/a00000009.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000009.gdbtablx -------------------------------------------------------------------------------- /data.gdb/a00000004.FDO_UUID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000004.FDO_UUID.atx -------------------------------------------------------------------------------- /data.gdb/a00000006.FDO_UUID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000006.FDO_UUID.atx -------------------------------------------------------------------------------- /symbology/clusters_result_10.lyr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/symbology/clusters_result_10.lyr -------------------------------------------------------------------------------- /Gambia.gdb/a00000004.FDO_UUID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000004.FDO_UUID.atx -------------------------------------------------------------------------------- /Gambia.gdb/a00000006.FDO_UUID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000006.FDO_UUID.atx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000001.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000001.gdbindexes -------------------------------------------------------------------------------- /Seagrass.gdb/a00000003.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000003.gdbindexes -------------------------------------------------------------------------------- /Seagrass.gdb/a00000004.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000004.gdbindexes -------------------------------------------------------------------------------- /Seagrass.gdb/a00000005.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000005.gdbindexes -------------------------------------------------------------------------------- /Seagrass.gdb/a00000006.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000006.gdbindexes -------------------------------------------------------------------------------- /Seagrass.gdb/a00000007.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000007.gdbindexes -------------------------------------------------------------------------------- /Seagrass.gdb/a00000009.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000009.gdbindexes -------------------------------------------------------------------------------- /symbology/clusters_polygons_10.lyr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/symbology/clusters_polygons_10.lyr -------------------------------------------------------------------------------- /symbology/predictions_feature.lyr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/symbology/predictions_feature.lyr -------------------------------------------------------------------------------- /Gambia.gdb/a00000001.TablesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000001.TablesByName.atx -------------------------------------------------------------------------------- /data.gdb/a00000001.TablesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000001.TablesByName.atx -------------------------------------------------------------------------------- /data.gdb/a00000004.CatItemsByType.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000004.CatItemsByType.atx -------------------------------------------------------------------------------- /data.gdb/a00000006.CatRelsByType.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000006.CatRelsByType.atx -------------------------------------------------------------------------------- /symbology/DensityPoints_Symbology.lyr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/symbology/DensityPoints_Symbology.lyr -------------------------------------------------------------------------------- /symbology/ellipses_symbology_10.lyr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/symbology/ellipses_symbology_10.lyr -------------------------------------------------------------------------------- /Gambia.gdb/a00000004.CatItemsByType.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000004.CatItemsByType.atx -------------------------------------------------------------------------------- /Gambia.gdb/a00000006.CatRelsByType.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000006.CatRelsByType.atx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000001.TablesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000001.TablesByName.atx -------------------------------------------------------------------------------- /Gambia.gdb/a00000006.CatRelsByOriginID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000006.CatRelsByOriginID.atx -------------------------------------------------------------------------------- /Gambia.gdb/a00000007.CatRelTypesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000007.CatRelTypesByName.atx -------------------------------------------------------------------------------- /R-ArcGIS Bridge Live Training Seminar.tbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/R-ArcGIS Bridge Live Training Seminar.tbx -------------------------------------------------------------------------------- /data.gdb/a00000005.CatItemTypesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000005.CatItemTypesByName.atx -------------------------------------------------------------------------------- /data.gdb/a00000006.CatRelsByOriginID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000006.CatRelsByOriginID.atx -------------------------------------------------------------------------------- /data.gdb/a00000007.CatRelTypesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000007.CatRelTypesByName.atx -------------------------------------------------------------------------------- /Documentation/Semiparametric regression.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Documentation/Semiparametric regression.pdf -------------------------------------------------------------------------------- /Gambia.gdb/a00000005.CatItemTypesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000005.CatItemTypesByName.atx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000007.CatRelTypesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000007.CatRelTypesByName.atx -------------------------------------------------------------------------------- /Documentation/Model Based Cluster Analysis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Documentation/Model Based Cluster Analysis.pdf -------------------------------------------------------------------------------- /Gambia.gdb/a00000004.CatItemsByPhysicalName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000004.CatItemsByPhysicalName.atx -------------------------------------------------------------------------------- /Gambia.gdb/a00000006.CatRelsByDestinationID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000006.CatRelsByDestinationID.atx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000005.CatItemTypesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000005.CatItemTypesByName.atx -------------------------------------------------------------------------------- /data.gdb/a00000004.CatItemsByPhysicalName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000004.CatItemsByPhysicalName.atx -------------------------------------------------------------------------------- /data.gdb/a00000006.CatRelsByDestinationID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000006.CatRelsByDestinationID.atx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000004.CatItemsByPhysicalName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000004.CatItemsByPhysicalName.atx -------------------------------------------------------------------------------- /data.gdb/a00000007.CatRelTypesByBackwardLabel.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000007.CatRelTypesByBackwardLabel.atx -------------------------------------------------------------------------------- /data.gdb/a00000007.CatRelTypesByForwardLabel.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/data.gdb/a00000007.CatRelTypesByForwardLabel.atx -------------------------------------------------------------------------------- /Gambia.gdb/a00000007.CatRelTypesByBackwardLabel.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000007.CatRelTypesByBackwardLabel.atx -------------------------------------------------------------------------------- /Gambia.gdb/a00000007.CatRelTypesByForwardLabel.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Gambia.gdb/a00000007.CatRelTypesByForwardLabel.atx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000007.CatRelTypesByForwardLabel.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000007.CatRelTypesByForwardLabel.atx -------------------------------------------------------------------------------- /Seagrass.gdb/a00000007.CatRelTypesByBackwardLabel.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Seagrass.gdb/a00000007.CatRelTypesByBackwardLabel.atx -------------------------------------------------------------------------------- /Documentation/Live Training Seminar Materials - Logistic Regression.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-ArcGIS/r-sample-tools/HEAD/Documentation/Live Training Seminar Materials - Logistic Regression.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | R Sample Tools 2 | ============== 3 | 4 | [](mailto:R_bridge@esri.com) 5 | 6 | Sample ArcMap MXD and ArcGIS Pro Project 7 | 8 | Add .tbx files 9 | 10 | Look at R code to see how it works. 11 | 12 | 13 | Requirements 14 | ------------ 15 | 16 | - [ArcGIS R bridge](https://github.com/R-ArcGIS/r-bridge-install) 17 | - [R Statistical Computing Software](http://www.r-project.org) 18 | 19 | ###optional 20 | 21 | - Geostatistical Analyst Extension for ArcGIS 22 | 23 | ## Credits 24 | 25 | Model Based Clustering uses the [mclust package](http://www.stat.washington.edu/mclust/) for R: 26 | 27 | > `mclust`: Normal Mixture Modeling for Model-Based Clustering, Classification, and Density Estimation 28 | > By Chris Fraley, Adrian E. Raftery, T. Brendan Murphy, and Luca Scrucca 29 | > Licensed under the GPLv2 30 | 31 | All tools depend on the R Statistical Computing Software: 32 | 33 | > Copyright (C) 2019 The R Foundation for Statistical Computing 34 | > R is free software and comes with ABSOLUTELY NO WARRANTY. 35 | -------------------------------------------------------------------------------- /scripts/semi_par_regression.R: -------------------------------------------------------------------------------- 1 | 2 | make_knots <-function (x1, x2, num.knots) 3 | { 4 | if (missing(num.knots)) 5 | num.knots <- max(10, min(50, round(length(x1)/4))) 6 | X <- cbind(x1, x2) 7 | dup.inds <- (1:nrow(X))[dup.matrix(X) == T] 8 | if (length(dup.inds) > 0) 9 | X <- X[-dup.inds, ] 10 | knots <- cluster::clara(X, num.knots)$medoids 11 | return(knots) 12 | } 13 | 14 | tool_exec <- function(in_params, out_params) 15 | { 16 | #### Load Library for Analysis #### 17 | if (!requireNamespace("SemiPar", quietly = TRUE)) 18 | install.packages("SemiPar") 19 | require(SemiPar) 20 | 21 | #### Get Input Parameters #### 22 | input_features <- in_params[[1]] 23 | input_predictions <- in_params[[2]] 24 | dep_variable <- in_params[[3]] 25 | lin_variables <- in_params[[4]] 26 | nonlin_variables <- in_params[[5]] 27 | input_knots <- in_params[[6]] 28 | output_features <- out_params[[1]] 29 | output_graph_pdf <- out_params[[2]] 30 | 31 | 32 | #### Import Dataset to Dataframe #### 33 | fc <- arc.open(input_features) 34 | df <- arc.select(fc, c(dep_variable, nonlin_variables, lin_variables)) 35 | df['x'] <- arc.shape(df)$x 36 | df['y'] <- arc.shape(df)$y 37 | #### Import Knots to DataFrame #### 38 | if (is.null(input_knots)) 39 | { 40 | message("Creating default knots") 41 | knots.est <- make_knots(df$x, df$y) 42 | } 43 | else 44 | { 45 | knots_df <- arc.select(arc.open(input_knots)) 46 | knots.est <- make_knots(arc.shape(knots_df)$x, arc.shape(knots_df)$y) 47 | } 48 | 49 | #### Create Spatial Effect #### 50 | fxy <- "f(x,y,knots=knots.est)" 51 | 52 | #### Create Formula and Fit SemiPar #### 53 | e <- as.list(df) 54 | e$knots.est <- knots.est 55 | all_params <- paste0(dep_variable, "~", fxy) 56 | 57 | #### Create Non-Linear Params #### 58 | if (!is.null(lin_variables)) 59 | { 60 | nonlin_params <- paste(paste0("f(", nonlin_variables, ")"), collapse = "+") 61 | all_params <- paste0(all_params, "+", nonlin_params) 62 | } 63 | #### Create Linear Params #### 64 | if (!is.null(nonlin_variables )) 65 | all_params <- paste0(all_params, "+", paste(lin_variables , collapse = "+")) 66 | 67 | message(paste0("formula = ", all_params)) 68 | tryCatch( 69 | { 70 | attach(e) 71 | form <- as.formula(all_params) 72 | fit <- spm(form, family="binomial") 73 | },finally = detach(e)) 74 | 75 | summary(fit) 76 | #### Prediction #### 77 | pred_fc <- arc.open(input_predictions) 78 | oid_field <- pred_fc@fields 79 | oid_field <- names(oid_field[oid_field == 'OID'])[[1]] 80 | pred_df = arc.select(pred_fc, c(oid_field, nonlin_variables, lin_variables)) 81 | 82 | if (!is.null(output_graph_pdf)) 83 | { 84 | tryCatch( 85 | { 86 | pdf(output_graph_pdf) 87 | #nn <- (length(lin_variables) + length(nonlin_variables) + 2)/2 88 | #par(mfrow=c(ceiling(nn), 2)) 89 | suppressWarnings( 90 | plot(fit, bdry=default.bdry(bdry = knots.est)) 91 | ) 92 | }, finally = { dev.off() }) 93 | } 94 | 95 | pred_df_xy <- data.frame( 96 | x = arc.shape(pred_df)$x, 97 | y = arc.shape(pred_df)$y, 98 | pred_df) 99 | pred = with(pred_df_xy, predict.spm(fit, newdata = pred_df_xy, se = TRUE)) 100 | 101 | #### Write Output #### 102 | pred_df['prediction'] = 1 / (1+exp(-pred$fit)) 103 | #pred_df['std_error'] = pred$se 104 | pred_df['LCL_95'] = 1 / (1+exp(-pred$fit+1.96*pred$se)) 105 | pred_df['UCL_95'] = 1/(1+exp(-pred$fit-1.96*pred$se)) 106 | 107 | arc.write(output_features, pred_df) 108 | 109 | return(out_params) 110 | } 111 | 112 | -------------------------------------------------------------------------------- /Seagrass.gdb/a00000004.spx: -------------------------------------------------------------------------------- 1 | @ -------------------------------------------------------------------------------- /Seagrass.gdb/a00000004.FDO_UUID.atx: -------------------------------------------------------------------------------- 1 | {1D5E08FA-0D9A-4DBA-96B5-A0FA6920E7BB}{9C524899-DB61-4AE6-AB45-1B19DAE5472E}{ACA72279-2C06-41FF-B6B5-60B2B2F5B2E8}& -------------------------------------------------------------------------------- /Seagrass.gdb/a00000006.FDO_UUID.atx: -------------------------------------------------------------------------------- 1 | {CA46BD49-C47C-4101-96D0-B2D3C5F63970}& -------------------------------------------------------------------------------- /Seagrass.gdb/a00000006.CatRelsByType.atx: -------------------------------------------------------------------------------- 1 | {DC78F1AB-34E4-43AC-BA47-1C4EABD0E7C7}& -------------------------------------------------------------------------------- /Seagrass.gdb/a00000004.CatItemsByType.atx: -------------------------------------------------------------------------------- 1 | {70737809-852C-4A03-9E22-2CECEA5B9BFA}{C673FE0F-7280-404F-8532-20755DD8FC06}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}& -------------------------------------------------------------------------------- /Seagrass.gdb/a00000006.CatRelsByOriginID.atx: -------------------------------------------------------------------------------- 1 | {9C524899-DB61-4AE6-AB45-1B19DAE5472E}& -------------------------------------------------------------------------------- /data.gdb/a00000005.CatItemTypesByUUID.atx: -------------------------------------------------------------------------------- 1 | ##   2 |  !"{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{35B601F7-45CE-4AFF-ADB7-7702D3839B12}{37672BD2-B9F3-48C1-89B5-8C43BBBB6D57}{4ED4A58E-621F-4043-95ED-850FBA45FCBC}{5B966567-FB87-4DDE-938B-B4B37423539D}{5ED667A3-9CA9-44A2-8029-D95BF23704B9}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{73718A66-AFB9-4B88-A551-CFFA0AE12620}{74737149-DCB5-4257-8904-B9724E32A530}{76357537-3364-48AF-A4BE-783C7C28B5CB}{767152D3-ED66-4325-8774-420D46674E07}{77292603-930F-475D-AE4F-B8970F42F394}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{787BEA35-4A86-494F-BB48-500B96145B58}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{8C368B12-A12E-4C7E-9638-C9C64E69E98F}{A300008D-0CEA-4F6A-9DFA-46AF829A3DF2}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{B606A7E1-FA5B-439C-849C-6E9C2481537B}{C29DA988-8C3E-45F7-8B5C-18E51EE7BEB4}{C673FE0F-7280-404F-8532-20755DD8FC06}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D5A40288-029E-4766-8C81-DE3F61129371}{D86502F9-9758-45C6-9D23-6DD1A0107B47}{D98421EB-D582-4713-9484-43304D0810F6}{DB1B697A-3BB6-426A-98A2-6EE7A4C6AED3}{DC64B6E4-DC0F-43BD-B4F5-F22385DCF055}{DC9EF677-1AA3-45A7-8ACD-303A5202D0DC}{E6302665-416B-44FA-BE33-4E15916BA101}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F8413DCB-2248-4935-BFE9-315F397E5110}{FBDD7DD6-4A25-40B7-9A1A-ECC3D1172447}{FFD09C28-FE70-4E25-907C-AF8E8A5EC5F3}&" -------------------------------------------------------------------------------- /data.gdb/a00000007.CatRelTypesByUUID.atx: -------------------------------------------------------------------------------- 1 |  2 |   {0D10B3A7-2F64-45E6-B7AC-2FC27BF2133C}{17E08ADB-2B31-4DCD-8FDD-DF529E88F843}{55D2F4DC-CB17-4E32-A8C7-47591E8C71DE}{583A5BAA-3551-41AE-8AA8-1185719F3889}{5DD0C1AF-CB3D-4FEA-8C51-CB3BA8D77CDB}{5F9085E0-788F-4354-AE3C-34C83A7EA784}{725BADAB-3452-491B-A795-55F32D67229C}{79CC71C8-B7D9-4141-9014-B6373E236ABB}{8DB31AF1-DF7C-4632-AA10-3CC44B0C6914}{908A4670-1111-48C6-8269-134FDD3FE617}{95C22AFD-AA36-431D-B195-1779A256C6B2}{A1633A59-46BA-4448-8706-D8ABE2B2B02E}{B32B8563-0B96-4D32-92C4-086423AE9962}{CC28387C-441F-4D7C-A802-41A160317FE0}{CCD6E1C9-9238-40D4-843F-C5DAFD3D2BDE}{D022DE33-45BD-424C-88BF-5B1B6B957BD3}{D088B110-190B-4229-BDF7-89FDDD14D1EA}{DC739A70-9B71-41E8-868C-008CF46F16D7}{DC78F1AB-34E4-43AC-BA47-1C4EABD0E7C7}{E79B44E3-F833-4B12-90A1-364EC4DDC43E}& -------------------------------------------------------------------------------- /Gambia.gdb/a00000005.CatItemTypesByUUID.atx: -------------------------------------------------------------------------------- 1 | ##"  2 |  !  {28DA9E89-FF80-4D6D-8926-4EE2B161677D}{35B601F7-45CE-4AFF-ADB7-7702D3839B12}{37672BD2-B9F3-48C1-89B5-8C43BBBB6D57}{4ED4A58E-621F-4043-95ED-850FBA45FCBC}{5B966567-FB87-4DDE-938B-B4B37423539D}{5ED667A3-9CA9-44A2-8029-D95BF23704B9}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{73718A66-AFB9-4B88-A551-CFFA0AE12620}{74737149-DCB5-4257-8904-B9724E32A530}{76357537-3364-48AF-A4BE-783C7C28B5CB}{767152D3-ED66-4325-8774-420D46674E07}{77292603-930F-475D-AE4F-B8970F42F394}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{787BEA35-4A86-494F-BB48-500B96145B58}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{8C368B12-A12E-4C7E-9638-C9C64E69E98F}{A300008D-0CEA-4F6A-9DFA-46AF829A3DF2}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{B606A7E1-FA5B-439C-849C-6E9C2481537B}{C29DA988-8C3E-45F7-8B5C-18E51EE7BEB4}{C673FE0F-7280-404F-8532-20755DD8FC06}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D5A40288-029E-4766-8C81-DE3F61129371}{D86502F9-9758-45C6-9D23-6DD1A0107B47}{D98421EB-D582-4713-9484-43304D0810F6}{DB1B697A-3BB6-426A-98A2-6EE7A4C6AED3}{DC64B6E4-DC0F-43BD-B4F5-F22385DCF055}{DC9EF677-1AA3-45A7-8ACD-303A5202D0DC}{E6302665-416B-44FA-BE33-4E15916BA101}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F8413DCB-2248-4935-BFE9-315F397E5110}{FBDD7DD6-4A25-40B7-9A1A-ECC3D1172447}{FFD09C28-FE70-4E25-907C-AF8E8A5EC5F3}&" -------------------------------------------------------------------------------- /Gambia.gdb/a00000007.CatRelTypesByUUID.atx: -------------------------------------------------------------------------------- 1 |  2 |   {0D10B3A7-2F64-45E6-B7AC-2FC27BF2133C}{17E08ADB-2B31-4DCD-8FDD-DF529E88F843}{55D2F4DC-CB17-4E32-A8C7-47591E8C71DE}{583A5BAA-3551-41AE-8AA8-1185719F3889}{5DD0C1AF-CB3D-4FEA-8C51-CB3BA8D77CDB}{5F9085E0-788F-4354-AE3C-34C83A7EA784}{725BADAB-3452-491B-A795-55F32D67229C}{79CC71C8-B7D9-4141-9014-B6373E236ABB}{8DB31AF1-DF7C-4632-AA10-3CC44B0C6914}{908A4670-1111-48C6-8269-134FDD3FE617}{95C22AFD-AA36-431D-B195-1779A256C6B2}{A1633A59-46BA-4448-8706-D8ABE2B2B02E}{B32B8563-0B96-4D32-92C4-086423AE9962}{CC28387C-441F-4D7C-A802-41A160317FE0}{CCD6E1C9-9238-40D4-843F-C5DAFD3D2BDE}{D022DE33-45BD-424C-88BF-5B1B6B957BD3}{D088B110-190B-4229-BDF7-89FDDD14D1EA}{DC739A70-9B71-41E8-868C-008CF46F16D7}{DC78F1AB-34E4-43AC-BA47-1C4EABD0E7C7}{E79B44E3-F833-4B12-90A1-364EC4DDC43E}& -------------------------------------------------------------------------------- /Seagrass.gdb/a00000005.CatItemTypesByUUID.atx: -------------------------------------------------------------------------------- 1 | ' & 2 | "% '  $# !{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{2D0BFE5D-66C0-4536-8534-B9C50771AAE4}{35B601F7-45CE-4AFF-ADB7-7702D3839B12}{37672BD2-B9F3-48C1-89B5-8C43BBBB6D57}{4945A015-D612-448D-AE82-24CEB89508AE}{4ED4A58E-621F-4043-95ED-850FBA45FCBC}{5B966567-FB87-4DDE-938B-B4B37423539D}{5ED667A3-9CA9-44A2-8029-D95BF23704B9}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{73718A66-AFB9-4B88-A551-CFFA0AE12620}{74737149-DCB5-4257-8904-B9724E32A530}{76357537-3364-48AF-A4BE-783C7C28B5CB}{767152D3-ED66-4325-8774-420D46674E07}{77292603-930F-475D-AE4F-B8970F42F394}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{787BEA35-4A86-494F-BB48-500B96145B58}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{8C368B12-A12E-4C7E-9638-C9C64E69E98F}{A300008D-0CEA-4F6A-9DFA-46AF829A3DF2}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{B606A7E1-FA5B-439C-849C-6E9C2481537B}{C29DA988-8C3E-45F7-8B5C-18E51EE7BEB4}{C673FE0F-7280-404F-8532-20755DD8FC06}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D5A40288-029E-4766-8C81-DE3F61129371}{D86502F9-9758-45C6-9D23-6DD1A0107B47}{D98421EB-D582-4713-9484-43304D0810F6}{DB1B697A-3BB6-426A-98A2-6EE7A4C6AED3}{DC64B6E4-DC0F-43BD-B4F5-F22385DCF055}{DC9EF677-1AA3-45A7-8ACD-303A5202D0DC}{E6302665-416B-44FA-BE33-4E15916BA101}{EBEEE2C9-FA73-4BED-AC7D-AEE7D68AFC80}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F51F4BF9-B699-4F7F-BF6A-62BB16B2ECC8}{F8413DCB-2248-4935-BFE9-315F397E5110}{FBDD7DD6-4A25-40B7-9A1A-ECC3D1172447}{FFD09C28-FE70-4E25-907C-AF8E8A5EC5F3}&' -------------------------------------------------------------------------------- /Seagrass.gdb/a00000006.CatRelsByDestinationID.atx: -------------------------------------------------------------------------------- 1 | {ACA72279-2C06-41FF-B6B5-60B2B2F5B2E8}& -------------------------------------------------------------------------------- /Seagrass.gdb/a00000007.CatRelTypesByUUID.atx: -------------------------------------------------------------------------------- 1 |  2 |     {0D10B3A7-2F64-45E6-B7AC-2FC27BF2133C}{17E08ADB-2B31-4DCD-8FDD-DF529E88F843}{1BDF1154-1521-4B7D-98D0-73559F0EF3FB}{55D2F4DC-CB17-4E32-A8C7-47591E8C71DE}{583A5BAA-3551-41AE-8AA8-1185719F3889}{5DD0C1AF-CB3D-4FEA-8C51-CB3BA8D77CDB}{5F9085E0-788F-4354-AE3C-34C83A7EA784}{725BADAB-3452-491B-A795-55F32D67229C}{74DAC6C1-A6F2-4603-88A8-D09BCCFDCF21}{79CC71C8-B7D9-4141-9014-B6373E236ABB}{7D2A7A69-ABD8-4AA7-AC08-9E4DDB86289E}{8DB31AF1-DF7C-4632-AA10-3CC44B0C6914}{908A4670-1111-48C6-8269-134FDD3FE617}{95C22AFD-AA36-431D-B195-1779A256C6B2}{A1633A59-46BA-4448-8706-D8ABE2B2B02E}{B32B8563-0B96-4D32-92C4-086423AE9962}{CC28387C-441F-4D7C-A802-41A160317FE0}{CCD6E1C9-9238-40D4-843F-C5DAFD3D2BDE}{D022DE33-45BD-424C-88BF-5B1B6B957BD3}{D088B110-190B-4229-BDF7-89FDDD14D1EA}{DC739A70-9B71-41E8-868C-008CF46F16D7}{DC78F1AB-34E4-43AC-BA47-1C4EABD0E7C7}{E79B44E3-F833-4B12-90A1-364EC4DDC43E}& -------------------------------------------------------------------------------- /Gambia.gdb/a00000005.CatItemTypesByParentTypeID.atx: -------------------------------------------------------------------------------- 1 | #  " 2 | !#{00000000-0000-0000-0000-000000000000}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{FFD09C28-FE70-4E25-907C-AF8E8A5EC5F3}&" -------------------------------------------------------------------------------- /data.gdb/a00000005.CatItemTypesByParentTypeID.atx: -------------------------------------------------------------------------------- 1 | #   !" 2 | # {00000000-0000-0000-0000-000000000000}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{FFD09C28-FE70-4E25-907C-AF8E8A5EC5F3}&" -------------------------------------------------------------------------------- /data.gdb/a00000007.CatRelTypesByDestItemTypeID.atx: -------------------------------------------------------------------------------- 1 |   2 |  {28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{A300008D-0CEA-4F6A-9DFA-46AF829A3DF2}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{D86502F9-9758-45C6-9D23-6DD1A0107B47}{D98421EB-D582-4713-9484-43304D0810F6}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}& -------------------------------------------------------------------------------- /Gambia.gdb/a00000007.CatRelTypesByDestItemTypeID.atx: -------------------------------------------------------------------------------- 1 |   2 |    {28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{A300008D-0CEA-4F6A-9DFA-46AF829A3DF2}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{D86502F9-9758-45C6-9D23-6DD1A0107B47}{D98421EB-D582-4713-9484-43304D0810F6}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}& -------------------------------------------------------------------------------- /Gambia.gdb/a00000007.CatRelTypesByOriginItemTypeID.atx: -------------------------------------------------------------------------------- 1 |    2 |  {28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{37672BD2-B9F3-48C1-89B5-8C43BBBB6D57}{37672BD2-B9F3-48C1-89B5-8C43BBBB6D57}{4ED4A58E-621F-4043-95ED-850FBA45FCBC}{5B966567-FB87-4DDE-938B-B4B37423539D}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{73718A66-AFB9-4B88-A551-CFFA0AE12620}{74737149-DCB5-4257-8904-B9724E32A530}{76357537-3364-48AF-A4BE-783C7C28B5CB}{767152D3-ED66-4325-8774-420D46674E07}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{D86502F9-9758-45C6-9D23-6DD1A0107B47}{D98421EB-D582-4713-9484-43304D0810F6}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}& -------------------------------------------------------------------------------- /Seagrass.gdb/a00000005.CatItemTypesByParentTypeID.atx: -------------------------------------------------------------------------------- 1 | ' 2 |  "%!$'# & {00000000-0000-0000-0000-000000000000}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{FFD09C28-FE70-4E25-907C-AF8E8A5EC5F3}&' -------------------------------------------------------------------------------- /Seagrass.gdb/a00000007.CatRelTypesByDestItemTypeID.atx: -------------------------------------------------------------------------------- 1 |   2 |   {28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{A300008D-0CEA-4F6A-9DFA-46AF829A3DF2}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{D86502F9-9758-45C6-9D23-6DD1A0107B47}{D98421EB-D582-4713-9484-43304D0810F6}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F51F4BF9-B699-4F7F-BF6A-62BB16B2ECC8}& -------------------------------------------------------------------------------- /Seagrass.gdb/a00000007.CatRelTypesByOriginItemTypeID.atx: -------------------------------------------------------------------------------- 1 |  2 |     {28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{37672BD2-B9F3-48C1-89B5-8C43BBBB6D57}{37672BD2-B9F3-48C1-89B5-8C43BBBB6D57}{4ED4A58E-621F-4043-95ED-850FBA45FCBC}{5B966567-FB87-4DDE-938B-B4B37423539D}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{73718A66-AFB9-4B88-A551-CFFA0AE12620}{74737149-DCB5-4257-8904-B9724E32A530}{76357537-3364-48AF-A4BE-783C7C28B5CB}{767152D3-ED66-4325-8774-420D46674E07}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{D86502F9-9758-45C6-9D23-6DD1A0107B47}{D98421EB-D582-4713-9484-43304D0810F6}{EBEEE2C9-FA73-4BED-AC7D-AEE7D68AFC80}{EBEEE2C9-FA73-4BED-AC7D-AEE7D68AFC80}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}& -------------------------------------------------------------------------------- /data.gdb/a00000007.CatRelTypesByOriginItemTypeID.atx: -------------------------------------------------------------------------------- 1 |  2 |    {28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{37672BD2-B9F3-48C1-89B5-8C43BBBB6D57}{37672BD2-B9F3-48C1-89B5-8C43BBBB6D57}{4ED4A58E-621F-4043-95ED-850FBA45FCBC}{5B966567-FB87-4DDE-938B-B4B37423539D}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{73718A66-AFB9-4B88-A551-CFFA0AE12620}{74737149-DCB5-4257-8904-B9724E32A530}{76357537-3364-48AF-A4BE-783C7C28B5CB}{767152D3-ED66-4325-8774-420D46674E07}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{D86502F9-9758-45C6-9D23-6DD1A0107B47}{D98421EB-D582-4713-9484-43304D0810F6}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}& -------------------------------------------------------------------------------- /Seagrass.gdb/a00000003.gdbtablx: -------------------------------------------------------------------------------- 1 | $  -------------------------------------------------------------------------------- /data.gdb/a00000009.gdbtablx: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /scripts/clustering.R: -------------------------------------------------------------------------------- 1 | # case study using mclust package 2 | tool_exec <- function(in_params, out_params) 3 | { 4 | if (!requireNamespace("sp", quietly = TRUE)) 5 | install.packages("sp") 6 | if (!requireNamespace("mclust", quietly = TRUE)) 7 | install.packages("mclust") 8 | require(mclust) 9 | require(sp) 10 | 11 | source_dataset = in_params[[1]] 12 | #nclust = in_params[[2]] 13 | out_table = out_params[[1]] 14 | out_ellipses = out_params[[2]] 15 | out_dens = out_params[[3]] 16 | out_sim = out_params[[4]] 17 | ### read data 18 | arc.progress_label("Loading Dataset") 19 | d <- arc.open(source_dataset) 20 | # read only OID field 21 | data <- arc.select(d, names(d@fields[d@fields == "OID"])) 22 | data_shp <- arc.shape(data) 23 | 24 | data.xy <- cbind(data_shp$x, data_shp$y) # or data.frame(x=data_shp$x, y=data_shp$y) 25 | 26 | ######### 27 | arc.progress_label("Bayesian Information Criterion for Model-Based Clustering...") 28 | patternBIC <- mclustBIC(data.xy) # G = nclust) 29 | 30 | patternModel <- summary(patternBIC, data.xy) 31 | print(patternModel) 32 | 33 | ### save to shapefile 34 | # patternModel$classification # cluster number 35 | # patternModel$uncertainty # uncertainty of classification 36 | # patternModel$z # conditional probabilities 37 | n <- patternModel$G 38 | cond_probs <- lapply(1:n, function(i) patternModel$z[,i]) 39 | names(cond_probs) <- paste0("cond_prob", 1:n) 40 | 41 | q <- quantile(patternModel$uncertainty, probs = c(0.75, 0.95)) 42 | q7595 <- sapply(patternModel$uncertainty, function(u){ 43 | r <- if (u <= q[1]) 1 else 0 44 | if(u <= q[2] && r == 0) r <- 2 45 | if(u > q[2] && r == 0) r <- 3 46 | stopifnot(r != 0) 47 | r - 1 48 | }) 49 | 50 | result <- data.frame(data, 51 | cluster = patternModel$classification, 52 | class_uncert = patternModel$uncertainty, 53 | sym_ucert=q7595, 54 | cond_probs) 55 | 56 | #print(head(result)) 57 | arc.progress_label("Writing result dataset...") 58 | if (!is.null(out_table) && out_table != "NA") 59 | arc.write(out_table, result, coords = data_shp) 60 | 61 | ### automatic mapping 62 | arc.progress_label("Best model based on Bayesian Information Criterion...") 63 | bestModel <- mclustModel(data.xy, patternBIC) 64 | 65 | ### create ellipses 66 | if (!is.null(out_ellipses) && out_ellipses != "NA") 67 | { 68 | arc.progress_label("Writing ellipses dataset...") 69 | polygons <- create.ellipses(bestModel) 70 | mu <- bestModel$parameters$mean 71 | sp.df <- SpatialPolygonsDataFrame(polygons, data=data.frame(clast_n=1:n, mu_x=mu[1,1:n], mu_y=mu[2,1:n]), match.ID = F) 72 | ## keep original SpatialReference 73 | ## following is not always correct WKT -> P4 -> WKT' == WKT 74 | shape_info <- list(type="Polygon", WKT=arc.shapeinfo(data_shp)$WKT) 75 | #shape_info <- arc.shapeinfo(sp.df) 76 | #shape_info$WKT <- arc.shapeinfo(data_shp)$WKT 77 | arc.write(out_ellipses, sp.df, shape_info=shape_info) 78 | } 79 | 80 | ### create density grid 81 | if (!is.null(out_dens) && out_dens != "NA") 82 | { 83 | arc.progress_label("Calculating density...") 84 | tmp_file = tempfile("density", fileext = ".pdf") 85 | options(onefile=FALSE) 86 | pdf(tmp_file) 87 | 88 | grid.n <- 100 89 | grid <- surfacePlot(verbose=T, data.xy, parameters = bestModel$parameters, type = "image", what = "density", grid=grid.n, nlevels = 8, transformation = "none", ask=F) 90 | dev.off() 91 | options(device="windows") 92 | options(onefile=NULL) 93 | #file.remove(tmp_file) 94 | xy <-list(x = unlist(lapply(grid$x, function(x) rep(x, grid.n))), 95 | y = rep(grid$y, grid.n)) 96 | arc.progress_label("Writing density dataset...") 97 | arc.write(out_dens, data=list(density = as.vector(grid$z)), xy, list(type='Point', WKT=arc.shapeinfo(data_shp)$WKT)) 98 | } 99 | 100 | ### simulation, fitting model 101 | if (!is.null(out_sim) && out_sim != "NA") 102 | { 103 | sim.xy = simulation(bestModel, nrow(data)) 104 | #print(length(sim.xy$x)) 105 | arc.progress_label("Saving simulated dataset...") 106 | arc.write(out_sim, data=list(id=1:length(sim.xy$x)), sim.xy, list(type='Point', WKT=arc.shapeinfo(data_shp)$WKT)) 107 | } 108 | arc.progress_label("Done") 109 | return(out_params) 110 | } 111 | 112 | simulation <- function(bestModel, n) 113 | { 114 | n <- round(round(rnorm(1, mean=n, sd=sqrt(n)))) 115 | sim <- sim(modelName = bestModel$modelName, parameters = bestModel$parameters, n, seed = round(sqrt(n+1))) 116 | list(x=sim[,2], y=sim[,3]) 117 | } 118 | 119 | create.ellipses <- function(bestModel) 120 | { 121 | n <- bestModel$G 122 | mu <- bestModel$parameters$mean 123 | sigma <- bestModel$parameters$variance$sigma 124 | cls.polygons <- lapply(1:n, function(i) 125 | { 126 | xy <- make.ellipse(mu = mu[, i], sigma = sigma[, , i]) 127 | name<-paste0("ellipse", i) 128 | Polygons(list(Polygon(xy)), name) 129 | }) 130 | #SpatialPolygons(cls.polygons, 1:n, proj4string=sp::CRS(p4str)) 131 | SpatialPolygons(cls.polygons, 1:n, proj4string=sp::CRS()) 132 | } 133 | 134 | make.ellipse <- function(mu, sigma, k = 60) 135 | { 136 | p <- length(mu) 137 | if (p != 2) 138 | stop("only two-dimensional case is available") 139 | if (any(unique(dim(sigma)) != p)) 140 | stop("mu and sigma are incompatible") 141 | ev <- eigen(sigma, symmetric = TRUE) 142 | s <- sqrt(rev(sort(ev$values))) 143 | V <- t(ev$vectors[, rev(order(ev$values))]) 144 | theta <- (0:k) * (2*pi/k) 145 | x <- s[1] * cos(theta) 146 | y <- s[2] * sin(theta) 147 | xy <- cbind(x, y) 148 | xy <- xy %*% V 149 | cbind(xy[,1] + mu[1], xy[,2] + mu[2]) 150 | } 151 | 152 | ## standalone R testing 153 | foo <- function() 154 | { 155 | library(arcgisbinding) 156 | arc.check_product() 157 | tool_exec( 158 | list("d:\\Data\\R-staff\\samps\\data.gdb\\spruce_trees", NULL), 159 | list(NULL, NULL, NULL, "in_memory\\sim") 160 | ) 161 | } 162 | -------------------------------------------------------------------------------- /scripts/Logistic_Regression_Wrappings.R: -------------------------------------------------------------------------------- 1 | #Live Training Seminar: Go Deeper with Data Analytics Using ArcGIS Pro and R 2 | #Logistic Regression R Script Wrappings 3 | tool_exec<- function(in_params, out_params){ 4 | 5 | ##################################################################################################### 6 | ### Check/Load Required Packages 7 | ##################################################################################################### 8 | arc.progress_label("Loading packages...") 9 | arc.progress_pos(20) 10 | 11 | if(!requireNamespace("MKmisc", quietly = TRUE)) 12 | install.packages("MKmisc", quiet = TRUE) 13 | if(!requireNamespace("ROCR", quietly = TRUE)) 14 | install.packages("ROCR", quiet = TRUE) 15 | if(!requireNamespace("survey", quietly = TRUE)) 16 | install.packages("survey", quiet = TRUE) 17 | if(!requireNamespace("pROC", quietly = TRUE)) 18 | install.packages("pROC", quiet = TRUE) 19 | if(!requireNamespace("ROCR", quietly = TRUE)) 20 | install.packages("ROCR", quiet = TRUE) 21 | if(!requireNamespace("caret", quietly = TRUE)) 22 | install.packages("caret", quiet = TRUE) 23 | 24 | require(MKmisc) 25 | require(ROCR) 26 | require(survey) 27 | require(pROC) 28 | require(ROCR) 29 | require(caret) 30 | 31 | ##################################################################################################### 32 | ### Define input/output parameters 33 | ##################################################################################################### 34 | input_data <- in_params[[1]] 35 | train_percentage_size <- (in_params[[2]])/100 36 | dependent_variable <- in_params[[3]] 37 | independent_variables <- in_params[[4]] 38 | 39 | output_prediction_data <- out_params[[1]] 40 | 41 | ##################################################################################################### 42 | ### Load Data and Create Dataframe R Object 43 | ##################################################################################################### 44 | arc.progress_label("Loading data...") 45 | arc.progress_pos(40) 46 | 47 | d <- arc.open(input_data) 48 | fields_list <- append(c(dependent_variable), independent_variables) 49 | d_df_full <- arc.select(d) 50 | d_df <- arc.select(d, fields = fields_list) 51 | 52 | ##################################################################################################### 53 | ### Create Training and Testing Datasets 54 | ##################################################################################################### 55 | arc.progress_label("Creating training and testing datasets...") 56 | arc.progress_pos(60) 57 | smp_size <- floor(train_percentage_size * nrow(d_df)) 58 | 59 | set.seed(1234) 60 | train_ind <- sample(seq_len(nrow(d_df)), size = smp_size) 61 | 62 | d_df_train <- d_df[train_ind, ] 63 | d_df_test <- d_df[-train_ind, ] 64 | 65 | ##################################################################################################### 66 | ### Fit Logistic Regression Model 67 | ##################################################################################################### 68 | arc.progress_label("Creating training and testing datasets...") 69 | arc.progress_pos(80) 70 | 71 | response <- d_df_train[, 1] 72 | predictors <- d_df_train[, -1] 73 | 74 | d_df_train.log <- glm(response ~ ., family = binomial(link = 'logit'), data = predictors) 75 | 76 | d_df_full$Seagrass_Prediction <- predict(d_df_train.log, newdata = d_df_full, type = "response") 77 | 78 | ##################################################################################################### 79 | ### Run Diagnostics on Logistic Regression Model 80 | ##################################################################################################### 81 | arc.progress_label("Running diagnostics on fitted model...") 82 | arc.progress_pos(80) 83 | 84 | #Summary of model fit 85 | cat(paste0("\n", "............................................", "\n")) 86 | cat(paste0("\n", "............................................", "\n")) 87 | cat(paste0("\n")) 88 | cat(paste0("\n", "Summary of Fitted Logistic Regression Model", "\n")) 89 | cat(paste0("\n", "............................................", "\n")) 90 | cat(paste0("\n")) 91 | print(summary(d_df_train.log)) 92 | 93 | #Hosmer-Lemeshow Test 94 | cat(paste0("\n", "............................................", "\n")) 95 | cat(paste0("\n", "............................................", "\n")) 96 | cat(paste0("\n")) 97 | cat(paste0("\n", "Hosmer-Lemeshow Goodness of Fit Test Results", "\n")) 98 | cat(paste0("\n", "............................................", "\n")) 99 | cat(paste0("\n")) 100 | HL <- HLgof.test(fit = fitted(d_df_train.log), obs = d_df_train$Seagrass) 101 | print(HL) 102 | 103 | #Prediction Accuracy 104 | d_df_test.log.pred <- predict(d_df_train.log, newdata = d_df_test, type = 'response') 105 | d_df_test.log.pred <- ifelse(d_df_test.log.pred > 0.5, 1, 0) 106 | misClassificError <- mean(d_df_test.log.pred != d_df_test$Seagrass) 107 | cat(paste0("\n", "............................................", "\n")) 108 | cat(paste0("\n", "............................................", "\n")) 109 | cat(paste0("\n")) 110 | cat(paste0("\n", "Prediction Accuracy for Test Dataset", "\n")) 111 | cat(paste0("\n", "............................................", "\n")) 112 | cat(paste0("\n")) 113 | print(paste('Accuracy Percentage:', round((1-misClassificError)*100, 2))) 114 | cat(paste0("\n")) 115 | 116 | #ROC Curve 117 | d_df_test.log.pred <- predict(d_df_train.log, newdata = d_df_test, type = 'response') 118 | pred <- prediction(d_df_test.log.pred, d_df_test$Seagrass) 119 | perf <- performance(pred, measure = "tpr", x.measure = "fpr") 120 | plot(perf) 121 | auc <- performance(pred, measure = "auc") 122 | auc <- auc@y.values[[1]] 123 | cat(paste0("\n", "............................................", "\n")) 124 | cat(paste0("\n", "............................................", "\n")) 125 | cat(paste0("\n")) 126 | cat(paste0("\n", "Area Under the ROC Curve", "\n")) 127 | cat(paste0("\n", "............................................", "\n")) 128 | cat(paste0("\n")) 129 | print(paste('Area:', auc)) 130 | cat(paste0("\n")) 131 | cat(paste0("\n", "............................................", "\n")) 132 | cat(paste0("\n")) 133 | 134 | ##################################################################################################### 135 | ### Write Output 136 | ##################################################################################################### 137 | arc.progress_label("Writing output...") 138 | arc.progress_pos(80) 139 | 140 | if(!is.null(output_prediction_data) && output_prediction_data != "NA") 141 | arc.write(output_prediction_data, d_df_full, shape_info = arc.shapeinfo(d)) 142 | 143 | arc.progress_pos(100) 144 | } 145 | -------------------------------------------------------------------------------- /Gambia.gdb/a00000004.spx: -------------------------------------------------------------------------------- 1 | @ --------------------------------------------------------------------------------