Giter VIP home page Giter VIP logo

musical_data_with_r's Introduction

Wrangling and Visualizing Musical Data

Description

Apply data-wrangling and visualization tools from the tidyverse to musical data. Find the most common chords and chord progressions in a sample of pop/rock music from the 1950s-1990s, and compare the styles of different artists. This project uses a parsed and cleaned version of the McGill Billboard Dataset, version 2.0 (CC0 license).

Usage

Clone this repository and open the Jupyter notebook file (*.ipynb) in a Jupyter environment with R kernel support. Make sure to install the required packages such as tidyverse. You can do this by running the following commands in a code cell within the notebook:

install.packages("tidyverse")

Once the packages are installed, run the code cells in the notebook to generate the plots and analyses.

If you don't have a Jupyter environment set up, you can install Jupyter Notebook and the R kernel using the following steps:

  1. Install Jupyter Notebook by following the instructions on the official Jupyter website.

  2. Install the R kernel for Jupyter Notebook by running the following commands in your R console:

install.packages("IRkernel")
IRkernel::installspec()

After completing the installation, launch Jupyter Notebook, navigate to the folder containing the notebook file, and open it to begin running the analysis.

Contents

  1. Introduction: This section covers the process of loading the McGill Billboard chord dataset and the required packages (dplyr, readr, and ggplot2). It demonstrates how to read in 'datasets/bb_chords.csv' using read_csv and assign it to bb, and displays the first rows of bb.

  2. The most common chords: In this section, we find the most common chords in the McGill Billboard Dataset by counting the occurrences of each raw chord type in the dataset and sorting them in descending order. The top 20 most common chords are displayed.

  3. Visualizing the most common chords: This section shows how to create a flipped bar plot of the top 20 chords, displaying the percentage of occurrences for each chord type.

  4. Chord "bigrams": This part explains how to create a count of chord bigrams by adding new columns to bb and counting the occurrences of each bigram type. The top 20 most common chord bigrams are displayed.

  5. Visualizing the most common chord progressions: This section demonstrates how to create a flipped bar plot for the 20 most common chord bigrams by modifying the code from Step 3 and adjusting the plot labels.

  6. Finding the most common artists: In this section, we find the 30 artists with the most songs in the McGill Billboard Dataset by isolating the artist and title columns, removing duplicates, and counting the number of songs per artist.

  7. Tagging the corpus: This part details how to add a new column 'instrument' to bb, including "piano" or "guitar" for piano- and guitar-driven songs, and displays the new data frame 'bb_tagged'.

  8. Comparing chords in piano-driven and guitar-driven songs: This section explains how to create a faceted plot comparing the frequency of the most common chords in songs by piano- and guitar-driven artists.

  9. Comparing chord bigrams in piano-driven and guitar-driven songs: In this section, we create a faceted plot comparing the frequency of the most common chord bigrams in songs by piano- and guitar-driven artists by modifying the code from Task 4 and Task 8.

  10. Conclusion: This final section focuses on determining the validity of the hypothesis that guitar-driven and piano-driven songs have different chord tendencies and whether further data analysis is needed to draw a conclusion.

musical_data_with_r's People

Contributors

jeremytallant avatar

Watchers

 avatar  avatar

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.