five

Supplementary Material for review——Revealing the co-occurrence patterns of the group emotions from social media data

收藏
Figshare2025-05-25 更新2026-04-08 收录
下载链接:
https://figshare.com/articles/dataset/Supplementary_Material_for_review_Revealing_the_co-occurrence_patterns_of_the_group_emotions_from_social_media_data/29145107/1
下载链接
链接失效反馈
官方服务:
资源简介:
论文标题:“Revealing the co-occurrence patterns of the group emotions from social media data”目标:本说明旨在详细描述如何使用共享数据和代码论文中各项实验结果,包括表 1–6、图 1–9,以及摘要相关指标,确保研究的完全可重复性。解压/克隆后的文件目录结构: ├── data/ # 存放原始和中间数据 ├── code/ # 数据处理和建模代码 ├── results/ # 输出结果 └── README.md # 简要说明二、数据准备 2.1 原始数据说明原始社交媒体数据文件位于:“data/wh_data.csv”数据来源与访问方式:“Liu, Z., et al., 2024. Shifting sentiments: analyzing public reaction to COVID-19 containment policies in Wuhan and Shanghai through Weibo data. Humanities and Social Sciences Communications, 11, 1104.”研究区域边界数据文件位于:“data/420000.geojson”<br>2.2 数据处理流程python code/clear_duplicate.py # 原始数据清洗;获得清洗后的数据,文件位置:“data/wh_data_cleaned.csv”三、结果复现说明请依次运行以下脚本以生成对应图表/表格。每个脚本已注释。The main.py file can be run directly to automate the computation and output of the model.表格部分1.Table 3:Model accuracy assessment脚本路径:’code/bert.py’输入数据:’data/wh_data_cleaned.csv’输出位置:’data/emotion_prediction_wh.csv’说明:Output Precision, Recall, F1 for each emotion, and calculate the weighted average of Precision, Recall, F12.Table 4: Examples of different types of emotional structures脚本路径:’code/countnum.py’输入数据:’data/emotion_prediction_wh.csv’输出位置:’data/emotion_prediction_wh.csv’说明:Determine whether an emotion is of a single type, a dominant subsidiary type, or one of the composite types by using emotion probabilities and entropy values3.Table 5-6: Examples of different types of emotional structures①脚本路径:’code/lat_lon.py’输入数据:’data/emotion_prediction_wh.csv’输出位置:’result/bert/wh/128/grid_lat_lon.csv’说明:The study area can be gridded by running the file.②脚本路径:’code/comments.py’输入数据:’data/emotion_prediction_wh.csv’ &amp; ’result/bert/wh/128/grid_lat_lon.csv’输出位置:’result/bert/wh/128/result/’说明:Running this file divides the comment data into grids corresponding to latitude and longitude.③脚本路径:’code/graph.py’输入数据:’result/bert/wh/128/result/’ &amp; ’result/bert/wh/128/grid_lat_lon.csv’输出位置:’result/bert/wh/128/graph/’&amp;’result/bert/wh/128/graphs.pkl’说明:Run this file to plot the mood of each grid, when the calculation is for a traditional sentiment classification, run the code ‘code/graph-posneg.py’. ④脚本路径:’code/cluster.py’输入数据:’result/bert/wh/128/graphs.pkl’ 输出位置:’result/bert/wh/128/clustering_results.pkl’说明:By running this file you can calculate the similarity of neighbouring grids, giving the corresponding clustering categories of the grids.⑤脚本路径:’code/tree_v2.py’ &amp; ’code/caculate.py’ 输入数据:’result/bert/wh/128/clustering_results.pkl’ 输出位置:’result/bert/wh/128/dark_before_13.html’说明:Run this file to plot the results of the bottom-up clustering of the quadtree and the associated metrics.
提供机构:
Hua, Yang
创建时间:
2025-05-25
二维码
社区交流群
二维码
科研交流群
商业服务