Giter Site home page Giter Site logo

mcconville / lyrics Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 625 KB

Toolkit using Watson Personality Insights to analyze the changing psychology behind song lyrics. Node scripts to harvest lyrics from Genius Lyrics, and scripts to build data structures for use in my lyrics apps.

JavaScript 49.17% HTML 29.62% CSS 21.22%
nodejs nlp genius-lyrics

lyrics's Introduction

Analyzing The Psychology of Artist's Song Writing

This repository provides tools built around Genius Lyrics and Watson Personality Insights to create a template for analyzing the changes of an artist's song writing over the duration of their careers.

You can see examples of the product of these tools here:

The repo has two Node JS Scripts:

  • lyricsfinder.js
  • paperbackwriter.js

lyricsfinder will read a json data file containing album and song titles for an artist, and will build a text file of lyrics for each album.

paperbackwriter will use the same json data structure AND the generated lyrics files to run Watson Personality Insights on the lyrics, inserting the output of Watson PI to the datastructure.

In addition, the repo has a set of webcomponents that are capable of reading the complete json data file and presenting the data in a human readable way.

Data Structure

The foundation for the lyrics project is a data structure describing the timeline of the artist involved. The first step is to figure out the eras of the artist. I've done this in one of two ways:

  • each album represents an era of the artist
  • an era of the artist consists of one or more albums

Data Mapping

Here is how the JSON data maps to the responsive mobile view.

Practical Web Components

Web Components are an open standard approach for modularizing and reusing user interface pieces on a page.

In the past, web pages have been written with javascript, html and css code that divide related pieces in javascript, html or css files that are effecively long lists of DOM elements, style and function.

Web Components aim to collect related javascript, style and DOM elements for a related element, and then allow the components to be placed, as custom DOM elements in a building block approach.

In recent years, a range of JavaScript libraries have appeared that enable developers to make componentized pieces. Two notable technologies are React and Vue. These are more accepted and established approaches for teams to build with 'web components'.

For this lyrics project, I've chosen to work with the evolving world wide web open standard of Web Components, because I like that most browsers ship with the capability built in - I don't need to use an additional library, and for the most part, it is a minimal, yet powerful enough approach for me to achieve the solution I'm looking for.

lyrics's People

Contributors

antonmc avatar mcconville avatar

Stargazers

 avatar

Watchers

 avatar

lyrics's Issues

Harvest lyrics data

Watson Personality Insights is being deprecated at the end of the year. This issue lists the artists I want to use the service on before it disappears:

  • Mac Miller
  • Coldplay
  • Beatles
  • Bowie
  • U2
  • Weeknd
  • Oasis
  • Radiohead
  • Prince
  • Beyoncé
  • Snow Patrol
  • Adele
  • Frank Ocean
  • Joni Mitchell
  • Hamilton
  • Ariana Grande
  • Ed Sheeran
  • REM
  • Nirvana

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.