Giter VIP home page Giter VIP logo

embedr's Introduction

Michael McCarthy

R Python

Hi, I’m Michael, an R programmer and data scientist. My background is in psychology research, where I’ve studied topics ranging from attitude formation, to decision-making, to individual differences in brain function. Studying how people think and act has given me a deep appreciation for the human elements of data science. Much of our data is about humans. All of our data is communicated to humans. Understanding these relationships has been key to successfully navigating my role as a data scientist.

When I’m not pushing new commits to GitHub you can find me writing music in my studio, riding my bike on the local trails, or spending time with my friends and family.

Repository Overview

Community Contributions

Sites

Contact

embedr's People

Contributors

mccarthy-m-g avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

filipezabala

embedr's Issues

Windows GitHub Actions build failing

During the vignette build in R CMD check, the Windows build throws the following error:

"The URL: https://michaelmccarthy.netlify.app/files/embedr/audio-vignette.mp3 does not exist. Please use a valid URL."

This error message is built into the is.hosted() utility function in the package. It occurs if RCurl::url.exists() returns FALSE. However, since the URL I'm using does exist (and both the OSX and Linux builds run without errors), this must be an issue with Windows or with RCurl in Windows.

See this Actions build for verification of this issue.

I should try installing embedr on a Windows machine to see if I can replicate this behaviour.

Update: I've opened an issue in the RCurl repository.

Move error messages to utility functions

Some of the error messages would be more appropriately placed within utility functions, rather than within embed_audio() and embed_video(). Those error messages should be moved into the utility functions, and then I can just call the utility functions within embed_audio() and embed_video() instead of having the if statements for errors there.

Add testing with testthat

I should add testing to prepare for a CRAN submission. The only catch to adding testing with my embed_media() functions is their dependence on knitr::is_html_output() to determine the value they return. I need to find a way to have knitr::is_html_output() evaluate to TRUE within a .R script file, otherwise I can’t test whether the HTML output is correct (I can only test the placeholder string).

Add Howler.js support via htmlwidgets

As discussed in issue #2, Javascript is needed to style the audio element. howler.js paired with the htmlwidgets package seems like a good way to accomplish this.

This enhancement should be started as an enhancement in a new development branch.

When adding this enhancement I should decide whether to create a unique function for it (e.g., embed_howlerjs()) or to integrate it into the embed_audio() function through an additional argument (e.g., embed_audio(src, ..., style = c("modern", "retro", "etc"))).

Add id argument to embed_media() functions

The HTML5 <audio> tag does not have many options for CSS styling (its appearance is pretty much restricted to the browser defaults for the tag), however, JavaScript can be used to give audio elements a customized appearance. This can be done by adding an id argument to the tag and not specifying any attributes (e.g., <audio id=‘player’>), along with JS code to handle the styling.

Adding this is desirable, as users may want to customize the player’s appearance.

how to play flac extension file?

I've go the following error;

> embed_audio(audio_file)
Error in is.audio(src) : 
  data/LibriSpeech/dev-clean/1993/147149/1993-147149-0011.flac does not end with a valid audio file extension; valid extensions are .mp3, .ogg, and .wav.

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.