Update docs/source/r.rst
This commit is contained in:
parent
df905fd349
commit
ba5c4339ec
|
@ -201,22 +201,73 @@ An example of a Plotly app is included in the installation. Here, we add the RP
|
||||||
htmlwidgets::saveWidget(as_widget(p), file="index.html")
|
htmlwidgets::saveWidget(as_widget(p), file="index.html")
|
||||||
|
|
||||||
|
|
||||||
There are three options for creating a Map.
|
|
||||||
|
R Standard Plot (PNG)
|
||||||
|
===================================
|
||||||
|
|
||||||
|
To create an R Standard Plot (PNG) Map, click on "Add New" button.
|
||||||
|
|
||||||
|
.. image:: images/Add-Map.png
|
||||||
|
|
||||||
|
|
||||||
|
FTP, Upload, or Paste your code.
|
||||||
|
|
||||||
|
Give your R code a Name and Description.
|
||||||
|
|
||||||
|
|
||||||
|
Example
|
||||||
|
--------------
|
||||||
|
|
||||||
|
The three main components are the R3port and html_plot function.
|
||||||
|
|
||||||
|
.. code-block:: R
|
||||||
|
|
||||||
|
# Main libraries for Plotly
|
||||||
|
library(R3port)
|
||||||
|
|
||||||
|
# Your R Code Here
|
||||||
|
|
||||||
|
#output
|
||||||
|
html_plot(pl(), out="index.html")
|
||||||
|
|
||||||
|
|
||||||
|
An example of a Standard Plot (PNG) is included in the installation.
|
||||||
|
|
||||||
|
.. code-block:: R
|
||||||
|
|
||||||
|
library(R3port)
|
||||||
|
|
||||||
|
set.seed(1919) # Create example data
|
||||||
|
x1 <- rnorm(1000)
|
||||||
|
y1 <- x1 + rnorm(1000)
|
||||||
|
|
||||||
|
group <- rbinom(1000, 1, 0.3) + 1 # Create group variable
|
||||||
|
|
||||||
|
pl <- function() {
|
||||||
|
plot(x1, y1, # Create plot with groups
|
||||||
|
main = "This is my Plot",
|
||||||
|
xlab = "X-Values",
|
||||||
|
ylab = "Y-Values",
|
||||||
|
col = group,
|
||||||
|
pch = group)
|
||||||
|
|
||||||
|
legend("topleft", # Add legend to plot
|
||||||
|
legend = c("Group 1", "Group 2"),
|
||||||
|
col = 1:2,
|
||||||
|
pch = 1:2)
|
||||||
|
}
|
||||||
|
|
||||||
|
html_plot(pl(), out="index.html")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
R App Options
|
||||||
|
===================================
|
||||||
|
|
||||||
Name
|
Name
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Give your map a name. The name will appear as the map title on the dashboard.
|
Give your R app a name. The name will appear as the map title on the dashboard.
|
||||||
|
|
||||||
.. image:: images/Name-Desc.png
|
.. image:: images/Name-Desc.png
|
||||||
|
|
||||||
|
@ -230,46 +281,26 @@ The Description is the text that will appear at the bottom of the map link
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Data
|
Data Update (Cache)
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
The Data section is where you can connect your map layers to their Data Sources to make them dynamic.
|
For dynamic R apps that connect to a databases, you can set the update frequency
|
||||||
|
|
||||||
.. image:: images/PostGIS-Select.png
|
|
||||||
|
|
||||||
|
|
||||||
Layer Cache
|
.. image:: images/Update.png
|
||||||
--------------
|
|
||||||
|
|
||||||
When you connect your map to a PostGIS Data Source, you have the option of caching layers for better performance.
|
If you wish to set a custom interval, select custom:
|
||||||
|
|
||||||
By default, cache is disabled.
|
.. image:: images/Update-2.png
|
||||||
|
|
||||||
You can enable caching on a per Layer basis by specifying the cache interval.
|
|
||||||
|
|
||||||
When set, this is the interval at which your map will check the database for updates.
|
When Updates are selected, this is the interval at which your app will be recompiled against the database.
|
||||||
|
|
||||||
.. image:: images/cache.png
|
If you have enabled Updates, but wish to Update immediately, you can do so by clicking the Clear Cache icon on the Map page:
|
||||||
|
|
||||||
If you have enabled cache and wish to clear it, you can do so by clicking the Clear Cache icon on the Map page:
|
|
||||||
|
|
||||||
.. image:: images/clear-cache.png
|
.. image:: images/clear-cache.png
|
||||||
|
|
||||||
|
|
||||||
QGIS Project File:
|
|
||||||
--------------
|
|
||||||
|
|
||||||
You can upload your QGIS Project file in order to use WMS, WFS, and WMTS
|
|
||||||
|
|
||||||
.. image:: images/QGIS-Project-File.png
|
|
||||||
|
|
||||||
Map CSS:
|
|
||||||
--------------
|
|
||||||
|
|
||||||
Enter any custom CSS for your map that wish to.
|
|
||||||
|
|
||||||
.. image:: images/CSS.png
|
|
||||||
|
|
||||||
Thumbnail Image:
|
Thumbnail Image:
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
@ -277,13 +308,6 @@ Upload a thumbnail image for your map to be displayed on the home page.
|
||||||
|
|
||||||
.. image:: images/Thumbnail.png
|
.. image:: images/Thumbnail.png
|
||||||
|
|
||||||
Data Tables:
|
|
||||||
--------------
|
|
||||||
|
|
||||||
Check the "Show Data Tables" box in order to provide users with data in table format.
|
|
||||||
|
|
||||||
.. image:: images/Show-Data-Table.png
|
|
||||||
|
|
||||||
|
|
||||||
Info Box.
|
Info Box.
|
||||||
--------------
|
--------------
|
||||||
|
@ -304,23 +328,23 @@ Security is Group based, so any users belonging to the Group will be able to vie
|
||||||
|
|
||||||
.. image:: images/users-3.jpg
|
.. image:: images/users-3.jpg
|
||||||
|
|
||||||
1. Private Maps
|
1. Private
|
||||||
|
|
||||||
Private maps can be viewed by the user logging into your map portal or via Secure Share link (for temporary access)
|
Private apps can be viewed by the user logging into your map portal or via Secure Share link (for temporary access)
|
||||||
|
|
||||||
For example, since we gave access to the Group containing user Jane Doe, when she logs in she will see only the two maps she has permissions to
|
For example, since we gave access to the Group containing user Jane Doe, when she logs in she will see only the two maps she has permissions to
|
||||||
|
|
||||||
.. image:: images/users-2.jpg
|
.. image:: images/users-2.jpg
|
||||||
|
|
||||||
2. Public Maps
|
2. Public
|
||||||
|
|
||||||
You can also tick the “Public” box to make your map public.
|
You can also tick the “Public” box to make your app public.
|
||||||
|
|
||||||
.. image:: images/public-users.jpg
|
.. image:: images/public-users.jpg
|
||||||
|
|
||||||
If your map is “Public”, you can use the map url to display the map.
|
If your map is “Public”, you can use the map url to display the map.
|
||||||
|
|
||||||
By default, the map is full screen. You can also use an iframe like below:
|
By default, the app is full screen. You can also use an iframe like below:
|
||||||
|
|
||||||
.. image:: images/public-map.png
|
.. image:: images/public-map.png
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue