plot_cultural_periods | R Documentation |
Read the 'cultural_periods.tsv' hosted on GitHub to find the tpq and taq dates.
plot_cultural_periods( d = NA, field = NA, plotly.plot = F, plot.type = c("by.eamenaid", "histogram"), bin.width = 50, export.plot = F, dirOut = paste0(system.file(package = "eamenaR"), "/results/"), y.label.size = 6, seg.size = 1, fig.width = 8, fig.height = 8 )
d |
a hash() object (a Python-like dictionary). |
field |
the field name where the periods, subperiods, etc. will be read in the a hash() object to plot it. It should be 'periods' or 'subperiods'. |
plotly.plot |
if FALSE create a static PNG, if TRUE create a plotly plot as a HTML widget. |
plot.type |
whether will create the graphic of durations by EAMENA ID ("by.eamenaid") or a cumulated histogram ("histogram"). By default, both of them. |
bin.width |
size of the bins, by default, 50 years. |
export.plot |
if TRUE, export the plot, if FALSE will only display it. |
dirOut |
the folder where the outputs will be saved. By default: '/results'. If it doesn't exist, it will be created. Only useful is export plot is TRUE. |
y.label.size, seg.size, fig.width, fig.height |
parameters for the gglpot output. |
A Plotly chart if 'dynamic', or a ggplot chart if 'static', to display or save.
d_sql <- hash::hash() d_sql <- uuid_from_eamenaid("eamena", "EAMENA-0187363", d_sql, "uuid") d_sql <- list_cultural_periods(db = "geojson", d = d_sql, uuid = d_sql[["uuid"]]) plot_cultural_periods(d = d_sql, field = "culturalper", export.plot = TRUE)