Las redes sociales, como Twitter (ahora X), se han convertido en un lugar clave donde la gente habla abiertamente sobre el consumo de drogas recreativas. Este proyecto se centra en el análisis de los efectos del consumo recreativo del éxtasis, el GHB y el 2C-B, a través del estudio de 6.755.394 de tweets, empleando técnicas de procesamiento de lenguaje natural y aprendizaje automático. Para lograr el objetivo, se aplicó la metodología CRISP-DM, estructurando el trabajo en seis fases. En la comprensión del negocio se revisaron estudios sobre el uso de redes sociales para analizar el consumo de sustancias y la aplicación de técnicas de procesamiento de lenguaje. La comprensión de los datos consistió en estudiar la estructura de los archivos JSON obtenidos desde la API de Twitter y recolectar algunos datos en tablas Excel, lo que permitió definir el esquema de la base de datos. En la fase de preparación se procesaron los datos para insertarlos en la base relacional y se generó el dataset final, incluyendo variables como el texto del tweet, métricas o la droga mencionada, entre otras. En la etapa de modelado se aplicaron distintos algoritmos de Machine Learning bajo cuatro enfoques, y en la fase de evaluación se analizaron los resultados obtenidos. Estos resultados demuestran que Twitter es una fuente útil para seguir de cerca el consumo de drogas. Se observó que aproximadamente el 95% de los tweets expresaban experiencias negativas, y para su detección se utilizaron términos MetaMap y expresiones coloquiales (slang) clasificados por anotadores según si reflejaban experiencias positivas o negativas relacionadas con el consumo de las sustancias. Además, los modelos de clasificación desarrollados alcanzaron un F1-Score superior al 80% en la detección de los efectos, siendo XGBoost el algoritmo que ofreció el mejor rendimiento. En definitiva, este estudio sugiere que las redes sociales son una fuente de datos valiosa para analizar percepciones y tendencias en el consumo de drogas, con aplicaciones relevantes en salud pública.
ABSTRACT
Social networks, such as Twitter (now X), have become a key place where people talk openly about recreational drug use. This project focuses on the analysis of the effects of recreational use of ecstasy, GHB and 2C-B, through the study of 6.755.394 tweets, using natural language processing (NLP) and machine learning techniques. To achieve the objective, the CRISP-DM methodology was applied, structuring the work in six phases. In business understanding, studies on the use of social networks to analyze substance use and the application of language processing techniques were reviewed. Data understanding consisted of studying the structure of the JSON files obtained from the Twitter API and collecting some data in Excel tables, which allowed the database schema to be defined. In the preparation phase, the data were processed to insert them into the relational database and the final dataset was generated, including variables such as the text of the tweet, metrics or the drug mentioned, among others. In the modelling stage, different Machine Learning algorithms were applied under four approaches, and in the evaluation phase, the results obtained were analyzed. These results demonstrate that Twitter is a useful source for monitoring drug use. It was observed that approximately 95% of the tweets expressed negative experiences, and MetaMap terms and colloquial expressions (slang) classified by annotators according to whether they reflected positive or negative experiences related to substance use were used for their detecting the effects, with XGBoost being the algorithm that provided the best performance. In short, this study suggests that social networks are a valuable data source for analyzing perceptions and trends in drug use, with relevant applications in public health.
Las redes sociales, como Twitter (ahora X), se han convertido en un lugar clave donde la gente habla abiertamente sobre el consumo de drogas recreativas. Este proyecto se centra en el análisis de los efectos del consumo recreativo del éxtasis, el GHB y el 2C-B, a través del estudio de 6.755.394 de tweets, empleando técnicas de procesamiento de lenguaje natural y aprendizaje automático. Para lograr el objetivo, se aplicó la metodología CRISP-DM, estructurando el trabajo en seis fases. En la comprensión del negocio se revisaron estudios sobre el uso de redes sociales para analizar el consumo de sustancias y la aplicación de técnicas de procesamiento de lenguaje. La comprensión de los datos consistió en estudiar la estructura de los archivos JSON obtenidos desde la API de Twitter y recolectar algunos datos en tablas Excel, lo que permitió definir el esquema de la base de datos. En la fase de preparación se procesaron los datos para insertarlos en la base relacional y se generó el dataset final, incluyendo variables como el texto del tweet, métricas o la droga mencionada, entre otras. En la etapa de modelado se aplicaron distintos algoritmos de Machine Learning bajo cuatro enfoques, y en la fase de evaluación se analizaron los resultados obtenidos. Estos resultados demuestran que Twitter es una fuente útil para seguir de cerca el consumo de drogas. Se observó que aproximadamente el 95% de los tweets expresaban experiencias negativas, y para su detección se utilizaron términos MetaMap y expresiones coloquiales (slang) clasificados por anotadores según si reflejaban experiencias positivas o negativas relacionadas con el consumo de las sustancias. Además, los modelos de clasificación desarrollados alcanzaron un F1-Score superior al 80% en la detección de los efectos, siendo XGBoost el algoritmo que ofreció el mejor rendimiento. En definitiva, este estudio sugiere que las redes sociales son una fuente de datos valiosa para analizar percepciones y tendencias en el consumo de drogas, con aplicaciones relevantes en salud pública.
ABSTRACT
Social networks, such as Twitter (now X), have become a key place where people talk openly about recreational drug use. This project focuses on the analysis of the effects of recreational use of ecstasy, GHB and 2C-B, through the study of 6.755.394 tweets, using natural language processing (NLP) and machine learning techniques. To achieve the objective, the CRISP-DM methodology was applied, structuring the work in six phases. In business understanding, studies on the use of social networks to analyze substance use and the application of language processing techniques were reviewed. Data understanding consisted of studying the structure of the JSON files obtained from the Twitter API and collecting some data in Excel tables, which allowed the database schema to be defined. In the preparation phase, the data were processed to insert them into the relational database and the final dataset was generated, including variables such as the text of the tweet, metrics or the drug mentioned, among others. In the modelling stage, different Machine Learning algorithms were applied under four approaches, and in the evaluation phase, the results obtained were analyzed. These results demonstrate that Twitter is a useful source for monitoring drug use. It was observed that approximately 95% of the tweets expressed negative experiences, and MetaMap terms and colloquial expressions (slang) classified by annotators according to whether they reflected positive or negative experiences related to substance use were used for their detecting the effects, with XGBoost being the algorithm that provided the best performance. In short, this study suggests that social networks are a valuable data source for analyzing perceptions and trends in drug use, with relevant applications in public health. Read More




