Giter Site home page Giter Site logo

ishihara's Introduction

ishihara

Lifecycle: experimental

The goal of ishihara is to create an Ishihara test, which can help assess colourblindness.

There are a few implementations of this test around the web, but I haven’t seen one that worked for R, so here is my crack at implementing it.

Note that this is a work in progress, don’t use it for proper testing.

Installation

The development version from GitHub with:

# install.packages("devtools")
devtools::install_github("njtierney/ishihara")

Proof of Concept

I had an idea on how I could maybe create this kind of figure in R, using spatial tools. The general process is:

  1. Create a bunch of circles with packcircles
  2. Convert that to an SF object
  3. Pull in a vector font from gridfont
  4. Convert that font into an SF object
  5. Overlay the two SF objects and see where they intersect
  6. Plot the circles that are intersected by the text
  7. Change the colour palette in ggplot2 to see the impact of colourblindness
library(ishihara)
## basic example code
library(ggplot2)

I’m still working through the details of the implementation and usability, but the general idea is to create something like this:

set.seed(2020-05-10)
cb_1 <- ishihara_data("1")
gg_ishihara <- gg_ishihara(cb_1)
gg_ishihara
gg_ishihara + scale_fill_brewer(palette = "Dark2")
gg_ishihara + scale_fill_viridis_d()
gg_ishihara + scale_fill_manual(values = c("black", "grey90"))
gg_ishihara + scale_fill_manual(values = c("red", "green"))

ishihara's People

Contributors

njtierney avatar

Stargazers

 avatar Lai Hao Ran avatar Don van den Bergh avatar Juha Pyykkö | PYYXXO avatar Antoine Bichat avatar Romain Lesur avatar Hongyuan Jia avatar Shinya Uryu avatar Ben Marwick avatar Alison Presmanes Hill avatar Adam H. Sparks avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

paudelnabin

ishihara's Issues

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.