Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

\.idea/
1 change: 1 addition & 0 deletions your-project/.cache-nerken
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"access_token": "BQB7AOGkF_rTuD9FxFaM1KVIXvRefOXaK9uDkBCAsaK-AVv3HJqoZUPwk4yUtxTbTZFCY2s2LFA6Z3vlcp4QzR5biR5HzXVdrtSrPIb8-4rUaDVvKCKy3NziYPP4wuLBOOo685MUtwqPAH76oshuz9I4dWIXWHWgEZJFNchwiZWXq8Fydf7nePHwt7UwxWd1aGhfvmsCG-fNAG85SiB-N92s7uA1w8SdxPTDyiL-Zry7z_kHWXCtxObzt82ya6Y8fyTjJ5Sp6s8x", "token_type": "Bearer", "expires_in": 3600, "scope": "user-follow-read,user-follow-modify,user-read-recently-played,user-top-read,user-library-read,user-library-modify,user-read-playback-state,user-read-currently-playing,user-modify-playback-state,playlist-read-collaborative,playlist-modify-private,playlist-modify-public,playlist-read-private,app-remote-control,user-read-email,user-read-private", "expires_at": 1566476406, "refresh_token": "AQAu3CbpOSfWb-9E-tEdvNcy_4vJasheqs3fZGYdVkduHeqKlFHWQykzgNdnUl2f8qOftugElTW5uuW4h7OiPVQ0fBFwHwF3Bwy3kSd5rnK25We7oruDgMq5ZGHEGfh0F1qu1g"}
140 changes: 140 additions & 0 deletions your-project/Presentació EAE 2024.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<img src="https://www.eaebarcelona.com/sites/eae.bcn/themes/custom/eae_mad/logo.webp" alt="EAE Logo" width="100"/>

# Presentación EAE: GOING TO A MUSIC FESTIVAL

---

## Contenido
- [Introducción](#introducción)
- [Descripción del proyecto](#descripción-del-proyecto)
- [Hipótesis](#hipótesis)
- [Conjunto de datos](#conjunto-de-datos)
- [Limpieza de datos](#limpieza-de-datos)
- [Entrenamiento y evaluación del modelo](#entrenamiento-y-evaluación-del-modelo)
- [Conclusiones](#conclusiones)
- [Trabajo futuro](#trabajo-futuro)
- [Historia: cómo la ia puede mejorar el análisis musical](#historia-cómo-la-ia-puede-mejorar-el-análisis-musical)
- [Futuro de las apis y la ia en el análisis musical](#futuro-de-las-apis-y-la-ia-en-el-análisis-musical)
- [Conclusión de la historia](#conclusión-de-la-historia)
- [Agradecimientos](#agradecimientos)


---

<a name="introducción"></a>
## Introducción: Te va a pasar:

**Contexto:**
Acabas de llegar a Barcelona para estudiar. La ciudad está llena de eventos musicales, pero no sabes a cuál asistir. Con tantas opciones, ¿cómo decides cuál es el concierto adecuado para ti?

**Inicio del Proyecto:**
Una variante de esta situación me llevó a crear un proyecto para analizar y recomendar música usando datos de Spotify. Quería asegurarme de que los eventos a los que asistía coincidieran con mis gustos musicales y no sólo eso quería TOMAR DECISIONES.

---

<a name="descripción-del-proyecto"></a>
## 1. Descripción del Proyecto

**Objetivos:**
- Obtener recomendaciones musicales de Spotify basadas en mis playlists.
- Comparar afinidad entre un festival de música, concierto o cualquier variante con mis playlist de cacnciones favoritas.

---

<a name="hipótesis"></a>
## 2. Hipótesis

**Preguntas Clave:**
- ¿Podemos agrupar las canciones de mi playlist en estilos musicales distintos?
- ¿Es posible solicitar recomendaciones específicas a Spotify?
- ¿Sería una buena idea asistir al próximo festival de música en Barcelona? Como escoger donde ir por la Mercé y el BAM??

---

<a name="conjunto-de-datos"></a>
## 3. Conjunto de Datos

**Fuente de Datos:**
- Usé la API de Spotify y la librería Spotipy para recolectar datos de mis playlists y de la playlist del evento.
- **Desafíos**: La función de recomendaciones en Spotipy tenía un BUG que necesitaba ser resuelto para manejar correctamente las solicitudes. Desconozco la situación actual.

---

<a name="limpieza-de-datos"></a>
## 4. Limpieza de Datos

**Proceso de Limpieza:**
- Wrangling y normalización de datos. Limpieza, estructuración y enriquecimiento de los datos. Organizar datos de manera lógica y eficiente
- Manejo de queries en formato JSON de múltiples niveles.

---

<a name="entrenamiento-y-evaluación-del-modelo"></a>
## 5. Entrenamiento y Evaluación del Modelo

**Modelo Utilizado:**
- K-Means clustering para agrupar canciones en géneros musicales. Dimensionar.
- **Resultados**: Capaz de diferenciar entre música clásica y ópera, pero menos efectivo para géneros similares como Pop, Indie, Rock y Folk.

**Análisis del Festival:**
- Aplicación del mismo modelo al festival, probando con 3 clusters (Pop, Indie y Rock). Dato recogido de su descripción.

---

<a name="conclusiones"></a>
## 6. Conclusiones

**Principal Conclusión:**
- Las características de las canciones en Spotify no son suficientemente detalladas para etiquetar canciones con precisión basándose solo en esos parámetros.

---

<a name="trabajo-futuro"></a>
## 7. Trabajo Futuro

**Mejoras Propuestas:**
- Contactar a Spotipy para informar sobre el bug que me encontré durante el tratamiento de datos.
- Mejorar la clusterización usando técnicas avanzadas de IA, como deep learning y análisis de segmentos de canciones.

---

<a name="historia-cómo-la-ia-puede-mejorar-el-análisis-musical"></a>
## Historia: Cómo la IA Puede Mejorar el Análisis Musical

**Un Concierto Perfecto:**
Al aplicar IA avanzada, como deep learning y análisis de audio, podemos mejorar significativamente la precisión de las recomendaciones musicales.

**Mejoras Propuestas:**
- Separación de pistas de canciones para analizar vocales, instrumentos y beats por separado.
- Redes neuronales profundas para capturar características complejas.
- Aprendizaje por refuerzo para ajustar recomendaciones basadas en el feedback del usuario. Utilizar APIs de otros proveedores sin encapsularse solo en Spotify

---

<a name="futuro-de-las-apis-y-la-ia-en-el-análisis-musical"></a>
## 11. Futuro de las APIs y la IA en el Análisis Musical

**Avances Recientes:**
- Las nuevas APIs de análisis musical están proporcionando datos más detallados y precisos sobre las características de las canciones.
- La rápida evolución de la IA está mejorando la capacidad de los algoritmos para entender y clasificar la música.

**Potencial de Mejora:**
- **Análisis Más Detallado:** Con las nuevas APIs, podemos obtener datos más granulares, como la separación de instrumentos, patrones rítmicos y estructuras armónicas.
- **Mejores Algoritmos:** Los avances en IA permitirán desarrollar algoritmos de recomendación más sofisticados, capaces de entender matices musicales más finos y proporcionar recomendaciones más precisas.
- **Scores de Análisis:** La combinación de datos más detallados y mejores algoritmos resultará en scores de análisis y coincidencia mucho más precisos, mejorando la experiencia del usuario al encontrar música que realmente disfrute.
- **Algoritmo de clusterización:** Todos estos cambios y futuras implementaciones deribaran en un cambio de algoritmo de clusterización como DBScan que permite más complejidad dimensional.
---

<a name="conclusión-de-la-historia"></a>
## Conclusión

Gracias a este proyecto, pude determinar si los festivales de música eran adecuados para mis gustos musicales. La IA no solo me ayudó a tomar una decisión informada, sino que también abrió nuevas posibilidades para personalizar y mejorar mi experiencia musical.

[Slides](https://slides.com/josepforadada/deck-6#/)

---

<a name="agradecimientos"></a>
## Agradecimientos

Espero que esta presentación os proporcione una visión clara de cómo la IA puede revolucionar el análisis musical y las recomendaciones, especialmente en una ciudad vibrante como Barcelona.
59 changes: 24 additions & 35 deletions your-project/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<img src="https://bit.ly/2VnXWr2" alt="Ironhack Logo" width="100"/>

# Title of My Project
*[Your Name]*
# GOING TO A MUSIC FESTIVAL
*Josep Foradada*

*[Your Cohort, Campus & Date]*
*Data Analytics June 2019*

## Content
- [Project Description](#project-description)
- [Hypotheses / Questions](#hypotheses-/-questions)
- [Dataset](#dataset)
- [Cleaning](#cleaning)
- [Analysis](#analysis)
- [Model Training and Evaluation](#model-training-and-evaluation)
- [Conclusion](#conclusion)
- [Future Work](#future-work)
Expand All @@ -21,71 +20,61 @@
<a name="project-description"></a>

## Project Description
Write a short description of your project: 3-5 sentences about what your project is about, why you chose this topic (if relevant), and what you are trying to show.
This project had 2 main objectives, first of all to get a recomendation from spotify based on all my playlist and at the same time, compare songs from a music festival and check if they match with the bigger cluster generated from mines.

<a name="hypotheses-/-questions"></a>

## Hypotheses / Questions
* What data/business/research/personal question you would like to answer?
* What is he context for the question and the scientific or business application?
* What are the hypotheses you would like to test in order to answer your question?
Frame your hypothesis with statistical/data languages (i.e. define Null and Alternative Hypothesis). You can use formulas if you want but that is not required.
* Will be able to clusterify the songs from my playlist into music styles?
* Is it possible to request specific recomendations to spotify?
* Would be a great idea to go to next music festival after the bootcamp?

<a name="dataset"></a>

## Dataset
* Where did you get your data? If you downloaded a dataset (either public or private), describe where you downloaded it and include the command to load the dataset.
* Did you build your own datset? If so, did you use an API? If so, provide the scripts in your repo.
* For all types of datasets, provide a description of the size, complexity, and data types included in your dataset, as well as a schema of the tables if necessary.
* If the question cannot be answered with the available data, why not? What data would you need to answer it better?
* For this project all data was request from SPOTIFY API using the library spotipy. Spotipy recommendations function has a bug that splits the variables of the request into characters joined by commas. This was really difficult to find due to cannot see the request url using python. Finally I had to modify the function inside the library to get the recommendations request.

<a name="cleaning"></a>

## Cleaning
Describe your full process of data wrangling and cleaning. Document why you chose to fill missing values, extract outliers, or create the variables you did, etc, as well as your thinking process.
The main step here is twrangle and normalize data from requests. The answers are huge json files, with several levels of jsons or list of dictionaries

<a name="analysis"></a>

## Analysis
* Overview the general steps you will go through to analyze your data in order to test your hypothesis.
* Document each step of your data exploration and analysis.
* Include charts to demonstrate the effect of your work.
* If you use ML in your final project, describe your feature selection process.

<a name="model-training-and-evaluation"></a>

## Model Training and Evaluation
*Include this section only if you chose to include ML in your project.*
* Describe how you trained your model, the results you obtained, and how you evaluated those results.

Model used is the K-Means clustering. I would prefer using DBScan because will be scalable to any user playlists. But was not able to find the correct epsilon, neither the min_samples. So I used K-Means and tested with diferent number of clusters since i was able to split classic music from opera. All other clusters are so similar, probably because there is no such a much difference between Pop, Indie, Rock or Folk.
The same model was used to analyze the Gigante Music Festival, here I decided to try 3 cluster because it sells that they do Pop, Indie and Rock
<a name="conclusion"></a>

## Conclusion
* Summarize your results. What do they mean?
* What can you say about your hypotheses?
* Interpret your findings in terms of the human-understandable question you try to answer.

The main conclusion is that spotify song features are not enough relevant to label songs just with that parameters

<a name="future-work"></a>

## Future Work
Address any questions you were unable to answer, or any next steps or future extensions to your project.
First of all I will contact to spotipy to inform for the bug. After this I would like to improve clustering using other methods or try to analyze the segments, beats,etc for each song to see if could be a more accurate clustering without using labels.

<a name="workflow"></a>

## Workflow
Outline the workflow you used in your project. What were the steps?
How will you test the success of our analysis or algorithm?
-Get the Data
-Wrangling data


<a name="organization"></a>

## Organization
How did you organize yourself? Did you use any tools?

Usually when I work alone I prefer to draw my schemas on paper using a pencil. I visualize it much better, than into any board. Probably because of my design and 3d background, I use to do sketches and storyboards. On the other hand I can handle all that information and structure also in my brain.

<a name="links"></a>

## Links
Include the links to your repository, slides and trello. Feel free to include any other links associated to your project.
I want to share this medium article where I get the idea for the polar plots:
https://towardsdatascience.com/profiling-my-favorite-songs-on-spotify-through-clustering-33fee591783d

[Repository](https://github.com/)
[Slides](https://slides.com/)
[Trello](https://trello.com/en)
[Repository](https://github.com/josepforadada/Project-Week-8-Final-Project)
[Slides](https://slides.com/josepforadada/deck-6#/)
[Trello](https://trello.com/b/qJ7IIpgt/final-project)
Loading