Code Monkey home page Code Monkey logo

khroma's Introduction

tesselle

R-CMD-check codecov CodeFactor Dependencies

r-universe CRAN Version CRAN checks CRAN Downloads

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

DOI

Overview

The tesselle suite is a collection of packages for research and teaching in archaeology. These packages focus on quantitative analysis methods developed for archaeology. The tesselle packages are designed to work seamlessly together and to complement general-purpose and other specialized statistical packages. These packages can be used to explore and analyze common data types in archaeology: count data, compositional data and chronological data.

The tesselle package is designed to make it easy to install and load key packages from the tesselle suite in a single step.

To cite tesselle in publications use:

  Frerebeau N (2024). _tesselle: Easily Install and Load 'tesselle'
  Packages_. Université Bordeaux Montaigne, Pessac, France.
  doi:10.5281/zenodo.6500491 <https://doi.org/10.5281/zenodo.6500491>,
  R package version 1.5.0, <https://packages.tesselle.org/tesselle/>.

This package is a part of the tesselle project
<https://www.tesselle.org>.

Installation

You can install the released version of tesselle from CRAN with:

install.packages("tesselle")

And the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("tesselle/tesselle")

Usage

library(tesselle) will load the core packages:

  • tabula: analysis and visualization of archaeological count data;
  • kairos: analysis of chronological patterns from archaeological count data;
  • nexus: analysis of compositional data;

And two companion packages:

library(tesselle)
#> --- Attaching packages -------------------------------------- tesselle 1.5.0 ---
#> * dimensio    0.6.0
#> * isopleuros  1.2.0
#> * kairos      2.1.0
#> * nexus       0.2.0
#> * tabula      3.0.1

Contributing

Please note that the tesselle project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

khroma's People

Contributors

hadley avatar harmveer avatar nfrerebeau avatar ustervbo avatar vincentarelbundock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

khroma's Issues

Allow to adjust the rainbow colour scheme

From Paul Tol's technical note:

If the lowest data value occurs often, start at off-white instead of purple. If the highest data value occurs often, end at red instead of brown. For colour-blind people, the light purples and light blues should not be mixed much.

Reduce dependencies

ggplot2, scales and spacesXYZ should be suggested packages, so that khroma only imports grDevices and grid.

We need to check if a suggested package is available before using it:

if (!requireNamespace("pkg", quietly = TRUE)) {
  stop("Package \"pkg\" needed for this function to work. Please install it.", call. = FALSE)
}

An alternative would be to create a new package without dependencies (such as viridis and viridisLite) containing only the colour() function.

`scale_name` argument of `discrete_scale()` is deprecated in ggplot2

Describe the bug

The scale_name argument of discrete_scale() is deprecated as of ggplot2 3.5.0.

To Reproduce

library(ggplot2)
options("lifecycle_verbosity"="warning")

plot_df <- data.frame(
fill_col = c("A", "A", "B", "B"),
pattern_col = c("a", "b", "a", "b"),
value = c(1, 2, 3, 4)
)

options(
list(
ggplot2.discrete.fill = function() {
khroma::scale_fill_picker(palette = "light")
}
))

ggplot(plot_df) +
aes(x = fill_col, y = value, fill = pattern_col) +
geom_col(position = "dodge")

Expected behavior

No warning is raised.

Typo in light palette, "light cyant"

With a recent khroma from CTAN:

light <- colour("light")
light(6)
light blue orange pink light cyant pear pale grey
"#77AADD" "#EE8866" "#FFAABB" "#99DDFF" "#BBCC33" "#DDDDDD"

Use sequential colour schemes with discrete data

I get the error message in the title when using sequential and diverging scale_fills with a data set that requires 33 values. I've tried scale_fill_sunset(), scale_fill_iridescent(), and scale_fill_smoothrainbow().

The default ggplot2 scale_fill works fine, as does scale_fill_grey(), so I am expecting the khroma scale_fill functions that are capable of yielding more than the default number of colors to work as well.

User error?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.