Advanced Panel Data Analysis in R workshop

Join our workshop on Advanced Panel Data Analysis in R, which is a part of our workshops for Ukraine series! 

Here’s some more info: 

Title: Advanced Panel Data Analysis in R

Date: Thursday, September 19th, 18:00 – 20:00 CEST (Rome, Berlin, Paris timezone)

Speaker: Tobias Rüttenauer is an Assistant Professor of Quantitative Social Science at University College London. His research focuses on the social aspects of climate change and environmental pollution, as well as quantitative research methods, particularly in spatial and panel data methods.

Description: This course provides a hands-on introduction to advanced panel data methods. It briefly covers the basic concepts of random effects (RE) and fixed effects (FE) estimators. Moving beyond the fundamentals, the workshop offers insights into recent developments and advances in panel data methods, such as the inclusion of individual or group-specific slopes and the identification of time-varying treatment effects via impact functions and novel Diff-in-Diff estimators.


Minimal registration fee: 20 euro (or 20 USD or 800 UAH)



How can I register?



  • Save your donation receipt (after the donation is processed, there is an option to enter your email address on the website to which the donation receipt is sent)

  • Fill in the registration form, attaching a screenshot of a donation receipt (please attach the screenshot of the donation receipt that was emailed to you rather than the page you see after donation).

If you are not personally interested in attending, you can also contribute by sponsoring a participation of a student, who will then be able to participate for free. If you choose to sponsor a student, all proceeds will also go directly to organisations working in Ukraine. You can either sponsor a particular student or you can leave it up to us so that we can allocate the sponsored place to students who have signed up for the waiting list.


How can I sponsor a student?


  • Save your donation receipt (after the donation is processed, there is an option to enter your email address on the website to which the donation receipt is sent)

  • Fill in the sponsorship form, attaching the screenshot of the donation receipt (please attach the screenshot of the donation receipt that was emailed to you rather than the page you see after the donation). You can indicate whether you want to sponsor a particular student or we can allocate this spot ourselves to the students from the waiting list. You can also indicate whether you prefer us to prioritize students from developing countries when assigning place(s) that you sponsored.


If you are a university student and cannot afford the registration fee, you can also sign up for the waiting list here. (Note that you are not guaranteed to participate by signing up for the waiting list).



You can also find more information about this workshop series,  a schedule of our future workshops as well as a list of our past workshops which you can get the recordings & materials here.


Looking forward to seeing you during the workshop!

Getting creative with ggplot2 workshop

Join our workshop on Getting creative with ggplot2, which is a part of our workshops for Ukraine series! 

Here’s some more info: 

Title: Getting creative with ggplot2

Date: Thursday, September 12th, 18:00 – 20:00 CEST (Rome, Berlin, Paris timezone) 

Speaker: Georgios Karamanis is a data visualization designer, psychiatrist and researcher, based in Uppsala, Sweden. With a strong background in visual arts and design, he uses almost exclusively R and ggplot2 to make elegant and creative data visualizations.

Description: Creative data visualizations stand out and can help get your message across more easily. But how do you achieve this? In this hands-on workshop, we will look at examples and explore ways to use ggplot2 and related packages to make your visualizations more eye-catching and personal.


Minimal registration fee: 20 euro (or 20 USD or 800 UAH)



How can I register?



  • Save your donation receipt (after the donation is processed, there is an option to enter your email address on the website to which the donation receipt is sent)

  • Fill in the registration form, attaching a screenshot of a donation receipt (please attach the screenshot of the donation receipt that was emailed to you rather than the page you see after donation).

If you are not personally interested in attending, you can also contribute by sponsoring a participation of a student, who will then be able to participate for free. If you choose to sponsor a student, all proceeds will also go directly to organisations working in Ukraine. You can either sponsor a particular student or you can leave it up to us so that we can allocate the sponsored place to students who have signed up for the waiting list.


How can I sponsor a student?


  • Save your donation receipt (after the donation is processed, there is an option to enter your email address on the website to which the donation receipt is sent)

  • Fill in the sponsorship form, attaching the screenshot of the donation receipt (please attach the screenshot of the donation receipt that was emailed to you rather than the page you see after the donation). You can indicate whether you want to sponsor a particular student or we can allocate this spot ourselves to the students from the waiting list. You can also indicate whether you prefer us to prioritize students from developing countries when assigning place(s) that you sponsored.


If you are a university student and cannot afford the registration fee, you can also sign up for the waiting list here. (Note that you are not guaranteed to participate by signing up for the waiting list).



You can also find more information about this workshop series,  a schedule of our future workshops as well as a list of our past workshops which you can get the recordings & materials here.


Looking forward to seeing you during the workshop!


Introduction to Bayesian Structural Equation Modeling in R workshop

Join our workshop on Introduction to Bayesian Structural Equation Modeling in R, which is a part of our workshops for Ukraine series! 

Here’s some more info: 

Title: Introduction to Bayesian Structural Equation Modeling in R

Date:  Thursday, August 29th, 18:00 – 20:00 CEST (Rome, Berlin, Paris timezone)

Speaker: Esteban Montenegro-Montenegro serves as a professor and researcher at California State University, Stanislaus. He holds a doctoral degree in Educational Psychology with a concentration in Research, Methods, Statistics, and Evaluation from Texas Tech University. Currently, Dr. Montenegro devotes his time to teaching foundational topics in statistics using R. Moreover, he is actively engaged in learning and instructing advanced concepts in Bayesian inference and latent variable models.

Description: The workshop is designed to offer an introductory overview of Structural Equation Modeling (SEM) in R, followed by a simplified explanation of Bayesian inference through various examples. In the latter part of the workshop, participants will learn to estimate a Bayesian SEM model using the blavaan package in R. This workshop is ideal for those seeking a user-friendly introduction to SEM and Bayesian inference in R. Basic skills in R, such as opening datasets, understanding objects, functions, and loops, are assumed due to time constraints. Comprehensive materials and additional examples will be provided for further practice at home.

Minimal registration fee: 20 euro (or 20 USD or 800 UAH)



How can I register?



  • Save your donation receipt (after the donation is processed, there is an option to enter your email address on the website to which the donation receipt is sent)

  • Fill in the registration form, attaching a screenshot of a donation receipt (please attach the screenshot of the donation receipt that was emailed to you rather than the page you see after donation).

If you are not personally interested in attending, you can also contribute by sponsoring a participation of a student, who will then be able to participate for free. If you choose to sponsor a student, all proceeds will also go directly to organisations working in Ukraine. You can either sponsor a particular student or you can leave it up to us so that we can allocate the sponsored place to students who have signed up for the waiting list.


How can I sponsor a student?


  • Save your donation receipt (after the donation is processed, there is an option to enter your email address on the website to which the donation receipt is sent)

  • Fill in the sponsorship form, attaching the screenshot of the donation receipt (please attach the screenshot of the donation receipt that was emailed to you rather than the page you see after the donation). You can indicate whether you want to sponsor a particular student or we can allocate this spot ourselves to the students from the waiting list. You can also indicate whether you prefer us to prioritize students from developing countries when assigning place(s) that you sponsored.


If you are a university student and cannot afford the registration fee, you can also sign up for the waiting list here. (Note that you are not guaranteed to participate by signing up for the waiting list).



You can also find more information about this workshop series,  a schedule of our future workshops as well as a list of our past workshops which you can get the recordings & materials here.


Looking forward to seeing you during the workshop!

Introducing latent2likert v1.2.1: Converting Latent Variables into Likert Scale Responses

Introduction Package logo


In social sciences, variables of interest are often conceptualized as latent variables—hidden continuous variables measured through Likert scale questions, typically categorized as Strongly disagree, Disagree, Neutral, Agree, and Strongly agree. Researchers frequently aim to uncover these latent variables using various statistical techniques.

Accurate modeling of survey data is crucial for comparative analysis through simulation, especially when applying statistical techniques that require metric data. The latent2likert package addresses this need by providing an effective algorithm to simulate Likert response variables from hypothetical latent variables. This post introduces the features of the latent2likert package.

Simulating Likert Scale Responses

Using the rlikert function, you can generate random responses to Likert scale questions based on specified means and standard deviations of latent variables, with optional settings for skewness and correlations.

Reproducing Rating-Scale Data

From existing survey data, you can estimate the values of latent parameters using the estimate_params function. You can then generate new responses using the estimated parameters to create a new dataset with very similar properties.

Further Reading

For more detailed information and practical examples, please refer to the package website and vignette. The implemented algorithms are described in the function reference.

Related R Packages

To simulate Likert scale responses, the draw_likert function from the fabricatr package can recode a latent variable into a Likert response variable by specifying intervals that subdivide the continuous range. However, the latent2likert package offers an advantage by automatically calculating optimal intervals that minimize distortion between the latent variable and the Likert response variable for both normal and skew normal latent distributions, eliminating the need to manually specify the intervals.

There are also alternative approaches that do not rely on latent distributions. One method involves directly defining a discrete probability distribution and sampling from it using the sample function in R or the likert function from the wakefield package. Another approach is to specify the means, standard deviations, and correlations among Likert response variables. For this, you can use LikertMakeR or SimCorMultRes to generate correlated multinomial responses.

Additionally, you can define a data-generating process. For those familiar with item response theory, the mirt package allows users to specify discrimination and difficulty parameters for each response category.

Structural and Predictive Macro Analyses using the R Package bsvars workshop

Join our workshop on Structural and Predictive Macro Analyses using the R Package bsvars, which is a part of our workshops for Ukraine series! 

Here’s some more info: 

Title: Structural and Predictive Macro Analyses using the R Package bsvars

Date: Thursday, August 1st, 18:00 – 20:00 CEST (Rome, Berlin, Paris timezone) 

Speaker: Tomasz Wozniak, Tomasz is an econometrician who is developing new methods for empirical macroeconomic analyses. He codes these algorithms in C++ for R applications using Rcpp and authors the R package bsvars for Bayesian estimation of structural vector autoregressions. He is a senior lecturer at the University of Melbourne and co-organises the annual Melbourne Bayesian Econometrics Workshop.

Description: Quantifying the dynamic effects of well-isolated shocks on macro and financial aggregates is essential for governing institutions, academia, and business. This workshop presents a complete workflow for such analyses and focuses on various methods that facilitate interpretations and visualisations of data insights. It briefly introduces the necessary background on Bayesian Structural VARs. All this is complemented by a series of exercises, ensuring a hands-on learning experience. Please make sure to install the package following the instructions at https://bsvars.github.io/bsvars/#installation 

Minimal registration fee: 20 euro (or 20 USD or 800 UAH)



How can I register?



  • Save your donation receipt (after the donation is processed, there is an option to enter your email address on the website to which the donation receipt is sent)

  • Fill in the registration form, attaching a screenshot of a donation receipt (please attach the screenshot of the donation receipt that was emailed to you rather than the page you see after donation).

If you are not personally interested in attending, you can also contribute by sponsoring a participation of a student, who will then be able to participate for free. If you choose to sponsor a student, all proceeds will also go directly to organisations working in Ukraine. You can either sponsor a particular student or you can leave it up to us so that we can allocate the sponsored place to students who have signed up for the waiting list.


How can I sponsor a student?


  • Save your donation receipt (after the donation is processed, there is an option to enter your email address on the website to which the donation receipt is sent)

  • Fill in the sponsorship form, attaching the screenshot of the donation receipt (please attach the screenshot of the donation receipt that was emailed to you rather than the page you see after the donation). You can indicate whether you want to sponsor a particular student or we can allocate this spot ourselves to the students from the waiting list. You can also indicate whether you prefer us to prioritize students from developing countries when assigning place(s) that you sponsored.


If you are a university student and cannot afford the registration fee, you can also sign up for the waiting list here. (Note that you are not guaranteed to participate by signing up for the waiting list).



You can also find more information about this workshop series,  a schedule of our future workshops as well as a list of our past workshops which you can get the recordings & materials here.


Looking forward to seeing you during the workshop!

Celebrating a Decade of EARL: Join us in Brighton, UK for EARL 2024!

See the full agenda and book your tickets today for EARL 2024 and key in RBTBZO at the checkout for a limited (while stocks last) 10% saving on your tickets as a special for R bloggers readers.


The Enterprise Applications of the R Language (EARL) Conference is a cross-sector tech conference focusing on the commercial use of the R programming language. Join us on 3rd – 5th September 2024 in Brighton for its 10th year as we hear from some of the world’s leading practitioners, consultants and industry experts in R, Python and data science.

Yes, you read that correctly! EARL has long been a cornerstone for professionals across industries who leverage R for real-world data challenges, but this year, we’re expanding our horizons by integrating Python. This convergence promises a more comprehensive view of modern data science, bridging statistical expertise with advanced computational capabilities.

New city, new languages – and new hosts too, with Brighton based data and analytics consultancy Datacove and Brighton’s tech sector hosts, Silicon Brighton taking over from the wonderful team at Ascent who have made EARL the event it is today.

As if that wasn’t enough to get you excited, our line-up of speakers includes the one and only Hadley Wickham! Joining him are Christel Swift from the BBC, Steph Locke from Microsoft, and renowned statistician and author Andy Field from the University of Sussex, each offering their unique insights on the industry today – and where we are headed tomorrow!

The conference agenda spans three days of workshops, keynotes, and talks featuring 40+ speakers from a diverse range of diverse and markets. It’s an unparalleled opportunity to learn, network, and engage with leading minds in both R and Python.

EARL 2024 wouldn’t be possible without the generous support of sponsors Posit, Ascent, and the R Consortium – and maybe you too! If you would like to showcase your brand in front of more than 200 of the world’s leading tech professionals, there are still sponsorship and advertising opportunities available. More details can be found on the EARL website, below.

We are excited to bring EARL 2024 to Brighton, a vibrant hub of culture, technology and innovation, and can’t wait to welcome you to what promises to be the most dynamic conference yet. Join us at The Grand Hotel, an elegant and historic venue located on the city’s picturesque seafront, blending classic charm with modern comforts. You’ll be treated to a delicious buffet lunch on both days of the conference, prepared by some of the city’s finest chefs – with tea and coffee also available throughout. Then cross the road for a memorable evening event at the British Airways i360, with stunning panoramic views of the city and coastline from the world’s tallest moving observation tower.

See the full agenda and book your tickets today for EARL 2024 and key in RBTBZO at the checkout for a limited (while stocks last) 10% saving on your tickets as a special for R bloggers readers.

See you in Brighton!

Academic and Personal Website Creation: A Quarto Tutorial workshop

Join our workshop on Academic and Personal Website Creation: A Quarto Tutorial, which is a part of our workshops for Ukraine series! 

Here’s some more info: 

Title: Academic and Personal Website Creation: A Quarto Tutorial

Date: Thursday, July 18th, 18:00 – 20:00 CEST (Rome, Berlin, Paris timezone) 

Speaker: Brier Gallihugh is an incoming fifth year doctoral candidate in social psychology at Ohio University. Broadly speaking, research interests involve prejudice and discrimination of minoritized groups. An advocate for all things open science and statistical, Brier spends countless time inside of RStudio and using R for statistical analyses and document/manuscript generation. Post PhD (likely Spring 2025), Brier hopes to gain employment as either a data analyst or data scientist.

Description: In the digital world having an online presence is at worst a strong suggestion and at best a firm requirement for anyone who wishes to advertise what they do. This is true both in academic circles (i.e., lab websites) and industry circles (i.e., portfolios) alike. However, creating websites can often require a vast knowledge in CSS and HTML coding in order to put together a professional product. Thankfully this is where Quarto comes in handy. This workshop will show participants how to get going quickly on creating and hosting a website for professional or personal use tailored to each participants individual needs using Quarto. Participants will need to have the latest versions of both R and RStudio installed prior to the workshop. Further, a GitHub and Netlify account (used to host the website) is also advised.


Minimal registration fee: 20 euro (or 20 USD or 800 UAH)


How can I register?



  • Save your donation receipt (after the donation is processed, there is an option to enter your email address on the website to which the donation receipt is sent)

  • Fill in the registration form, attaching a screenshot of a donation receipt (please attach the screenshot of the donation receipt that was emailed to you rather than the page you see after donation).

If you are not personally interested in attending, you can also contribute by sponsoring a participation of a student, who will then be able to participate for free. If you choose to sponsor a student, all proceeds will also go directly to organisations working in Ukraine. You can either sponsor a particular student or you can leave it up to us so that we can allocate the sponsored place to students who have signed up for the waiting list.


How can I sponsor a student?


  • Save your donation receipt (after the donation is processed, there is an option to enter your email address on the website to which the donation receipt is sent)

  • Fill in the sponsorship form, attaching the screenshot of the donation receipt (please attach the screenshot of the donation receipt that was emailed to you rather than the page you see after the donation). You can indicate whether you want to sponsor a particular student or we can allocate this spot ourselves to the students from the waiting list. You can also indicate whether you prefer us to prioritize students from developing countries when assigning place(s) that you sponsored.


If you are a university student and cannot afford the registration fee, you can also sign up for the waiting list here. (Note that you are not guaranteed to participate by signing up for the waiting list).



You can also find more information about this workshop series,  a schedule of our future workshops as well as a list of our past workshops which you can get the recordings & materials here.


Looking forward to seeing you during the workshop!




Get Hired Faster with a DataCamp Certification

Turn online learning into career-advancing Certifications on DataCamp.

Are you looking to kickstart your data career without breaking the bank?

This article is for you.

DataCamp is a world-leading data and AI education platform. It’s known for its interactive learning and extensive collaboration with industry experts to prepare learners for the data-driven workforce.

What are DataCamp Certifications?

Ranked the #1 data certification by Forbes, DataCamp Certifications offer a direct path for turning online learning into a successful data career.

Positioned as the final piece of their tailored learning paths, Certifications sit at the end of their ‘Career Tracks’. In many cases, you start from scratch and build your way up to gaining an industry-leading certification in your chosen field.

Or, you can dive straight into a Certification if you have pre-existing knowledge. There’s no blocker on which certification you can take or how many you are allowed to complete.

If you’re starting, pivoting, or accelerating your career, Certifications are a fast route into in-demand data roles. No longer are these roles kept behind University Degrees and expensive qualifications, you can learn and prove job-ready skills all on DataCamp.

What Certifications are on offer?

DataCamp Certifications have been created in collaboration with industry experts and hiring managers. They reflect the most sought-after roles and the rigorous exam process ensures all certified learners are job-ready for that specific role.

Here’s a peek at what DataCamp offers. For the full list, head to their Certification Hub.

Career Certifications

Designed to show you’re 100% job-ready, career certifications test the skills you need to get your first data role.

  • Data Analyst
    Showcase your ability to answer business-critical questions, effectively visualize data, and communicate insights.

  • Data Scientist
    Demonstrate that you can collect, analyze, and interpret large amounts of data using machine learning and AI.

  • Data Engineer
    Show you can make data usable and valuable for others by collecting, processing, and publishing large datasets.

Technology Certifications

Aimed at individuals working with data in any role, our technology certifications show that you can use specific technologies to work with data.

  • SQL Associate Certification
    Demonstrate that you are capable of using SQL to extract appropriate data from a database, and use it to answer common data questions.

  • Exam PL-300: Microsoft Power BI Data Analyst
    Created in partnership with Microsoft, the PL-300 exam tests all core Power BI skills. You get a 50% discount on the official certification through Microsoft and DataCamp.

Fundamentals Certification

Perfect if you’re just getting started and want to boost your CV. Fundamentals Certifications demonstrate you have the core skills to make data-driven decisions and enhance your productivity with AI.

  • AI Fundamentals
    For individuals new to AI or seeking to enhance their knowledge. It covers essential AI concepts including the difference between different AI domains and understanding Generative AI ethics.

  • Data Literacy
    A great place to start if you’re new to data! Show you know about different types of data and common analytic techniques. You will also demonstrate you can interpret a visualization and obtain vital information.

How do I start?

Anyone with a free DataCamp account can access the first chapter of each course. So, before spending anything, you can test the platform and see if it’s the right fit for you.

After that, DataCamp offers a single Premium subscription which offers unlimited access to all learning materials; including all courses, certifications, projects, and more.


All certifications are graded in partnership with industry experts through a series of timed and practical tests. More advanced certifications offer a window to complete all tasks, while fundamental options can be taken there and then.

Unsure about your level? No problem. Take a five-minute self-assessment to determine the best fit and learning plan for you.

Once you’re certified, you’ll get access to DataCamp’s exclusive certification community. You’ll be able to connect with other certified professionals and explore content curated just for you by our community team.

Your DataCamp subscription can be paid monthly or yearly to fit all budgets.

Build skills. Get hired.
Discover more.

Free Report: DataCamp’s The State of Data & AI Literacy Report 2024

Free Report: DataCamp’s The State of Data & AI Literacy Report 2024

DataCamp has commissioned a free report surveying 550+ business leaders on the rising demand for data and AI skills. Download now to uncover which skills employers are hiring for in the era of generative AI.

Keep reading for a peek at the report’s key findings or download it for free now.

Demand for data and AI skills is rising. What skills should you prioritize to make you more employable?

DataCamp’s report explores the skills landscape for some of the world’s leading organizations, focusing on the skills leaders value most and their current skills gaps.

Spoiler: data and AI rank high across the board.

Specifically, 86% of leaders believe data literacy is now vital for day-to-day tasks and 72% are prepared to pay a salary premium for employees with data literacy skills.

Going deeper, DataCamp sought to understand which specific data and AI skills leaders are looking for in their teams, uncovering:

  • 84% consider data-driven decision-making a critical skill
  • 83% look for employees who can interpret data visualizations and dashboards
  • 80% value data analysis and manipulation

For AI skills:

    • 70% consider the basic understanding of AI concepts the most crucial AI skill
    • 69% emphasize AI ethics and responsible AI practices as a vital part of their team function
    • 65% recognize the application of AI in a business context as crucial

    And much more. Download the report for the complete insights.

    How are leaders building data and AI skills? Five lessons leaders are using to create best-in-class teams

    Leaders with mature programs report a notable increase in benefits across several areas: decision-making efficiency jumps to 90%, innovation to 87%, and employee retention to 81%.

    Moreover, drawing on first-hand experiences from DataCamp’s B2B clients like Colgate-Palmolive, Rolls Royce, and Specsavers—dive into the best practices for effectively implementing successful data and AI upskilling and reskilling programs:

    • Expand existing programs to include AI literacy: Broaden data upskilling initiatives to encompass AI literacy as an integral extension of data skills

    • Widen the reach of upskilling initiatives: Extend the scope of training to include non-technical roles, enhancing organizational-wide AI literacy

    • Focus on interactivity and personalization: Center learning programs around interactive and personalized training for effective skill development

    • Leverage AI as a force multiplier: Utilize AI to enhance and accelerate the application of data skills across the organization

    • Proactive change management: Emphasize positive reinforcement and change management to address workforce concerns about new technologies

    For more detailed insights and recommendations, read the full report.

    Beyond the workplace: Data and AI literacy as social safeguards

    The report also explores how data and AI literacy serve as critical societal safeguards against humanity’s most pressing challenges—including online misinformation, bias from AI systems, and job automation.

    What DataCamp found for each challenge:

    • Online misinformation and disinformation: 73% acknowledge that AI literacy is pivotal in mitigating online misinformation and disinformation

    • Bias from AI systems: 75% agree every employee should be trained in ethical AI practices to prevent biases that can fuel social injustices and distort data-driven decisions

    • Job automation: 57% suggest that well-trained individuals are less likely to be affected by automation. Additionally, 75% believe that nations and organizations have a responsibility to prepare their workforce for these changes.

    Download the Full Free Report

    This article touches on a fraction of the findings. 

    Download the full report to learn more about the present and future of data and AI literacy and how they might impact your career and organization.

    {cryptoQuotes}: Open access to cryptocurrency market data in R (Update)

    The {cryptoQuotes}-package have been updated to version 1.3.0. With this update comes many new features,  and breaking changes. Prior to version 1.3.0 the package were using camelCase (See for example this post), with no particular style guide. The package now uses the tidyverse style guide which, in return, have deprecated a few core functions.

    Note: Only the styling is affected, the returned market data is still xts/zoo-objects
    Of the many new features and enhancements includes dark and light themed charting, and  a wide array of new sentiment indicators. The full documentation can be found on pkgdown.

    In this blog post the new charting features will be showcased using hourly Bitcoin OHLC-V and long-short ratios from the last two days (From writing this draft).

    Cryptocurrency market data in R

    # 0) load library
    library(cryptoQuotes)
    To extract the Bitcoin OHLC-V,  the get_quote()-function [previously getQuote()]  is used as  shown below,

    # 1) extract last two
    # days of Bitcoin on the
    # hourly chart
    tail(
      BTC <- get_quote(
        ticker   = "BTCUSDT",
        source   = "binance",
        interval = "1h",
        from     = Sys.Date() - 2
      )
    )
    #>                        open    high     low   close    volume
    #> 2024-06-05 02:00:00 70580.0 70954.1 70462.8 70820.1  7593.081
    #> 2024-06-05 03:00:00 70820.2 71389.8 70685.9 71020.7 11466.934
    #> 2024-06-05 04:00:00 71020.7 71216.0 70700.0 70892.1  7824.993
    #> 2024-06-05 05:00:00 70892.2 71057.0 70819.1 70994.0  5420.481
    #> 2024-06-05 06:00:00 70994.0 71327.9 70875.9 71220.2  7955.595
    #> 2024-06-05 07:00:00 71220.2 71245.0 70922.0 70988.8  3500.795
    The long-short ratios on Bitcoin in the same hourly interval is retrieved using the get_lsratio()-function [previously getLSRatio()] as shown below,

    # 2) extract last two days
    # of long-short ratio on
    # Bitcoin
    tail(
      BTC_LS <- get_lsratio(
        ticker   = "BTCUSDT",
        source   = "binance",
        interval = "1h",
        from     = Sys.Date() - 2
      )
    )
    #>                       long  short  ls_ratio
    #> 2024-06-05 02:00:00 0.4925 0.5075 0.9704433
    #> 2024-06-05 03:00:00 0.4938 0.5062 0.9755038
    #> 2024-06-05 04:00:00 0.4942 0.5058 0.9770660
    #> 2024-06-05 05:00:00 0.4901 0.5099 0.9611689
    #> 2024-06-05 06:00:00 0.4884 0.5116 0.9546521
    #> 2024-06-05 07:00:00 0.4823 0.5177 0.9316206
    Prior to version 1.3.0 all charting with indicators were done with the magrittr-pipe operator, both internally and externally. This came with a overhead on both efficiency and readability (Opinionated, I know). The charting has been reworked in terms of layout and syntax.

    Below is an example of a dark-themed chart with the long-short ratio alongside simple moving averages, bollinger bands and volume indicators,

    # 3) dark-themed
    # chart
    chart(
      ticker = BTC,
      main   = kline(),
      indicator = list(
        bollinger_bands(),
        sma(n = 7),
        sma(n = 14)
    
      ),
      sub = list(
        volume(),
        lsr(ratio = BTC_LS)
      )
    )

    The light-themed chart have been reworked, and have received some extra love, such that its different from the default colors provided by the {plotly}-package,

    # 4) light-themed
    # chart
    chart(
      ticker = BTC,
      main   = kline(),
      indicator = list(
        bollinger_bands(),
        sma(n = 7),
        sma(n = 14)
      ),
      sub = list(
        volume(),
        lsr(ratio = BTC_LS)
      ),
      options = list(
        dark = FALSE
      )
    )

    About the {cryptoQuotes}-package

    The {cryptoQuotes}-package is a high-level API-client that interacts with public market data endpoints from major cryptocurrency exchanges using the {curl}-package.

    The endpoints, which are publicly accessible and maintained by the exchanges themselves, ensure a consistent and reliable access to high-quality cryptocurrency market data with R.

    Installing {cryptoQuotes}
    The {cryptoQuotes}-package can be installed via CRAN,

    # installing {cryptoQuotes}
    install.packages(
      pkgs ="cryptoQuotes",
      dependencies = TRUE
    )

    Created on 2024-06-05 with reprex v2.1.0