MIS3011S Project Specification

Pandas入门教程(二十二):股票数据分析实战——yfinance 获取数据、技术指标与收益率分析 把 Pandas 用在真实场景,才能体会它的价值。本文以茅台股票为例,用 yfinance 获取历史行情,完成缺失值处理与列筛选,绘制收盘价曲线,计算 SMA 移动平均线与 RSI 相对强弱指数,并通过日收益率、累计收益率和波动率完成完整的量化分析流程。 阅读详情

MIS3011S
Project Specification

1 Description

Design a computer program, written in Python 3, that reads world happiness index data from the provided csv file, and allows exploration of that data by the user.

2 Requirements

To be a successful project, your program must:

• Read sales data from a CSV (comma-separated values) file called “world_happiness_index_2013_2023.csv” and load it into an appropriate data structure(s):

– About Dataset

Originally Taken from http://worldhappiness.report/ (Collaborator: Joakim Arvidsson). This work is licensed under the Community Data License Agreement - Permissive - Version 1.0.

https://www.kaggle.com/datasets/joebeachcapital/world-happiness-report-2013-2023

• The user is presented with a menu that has the following options to perform his/her query:

  1. The top 3 to 10 happiest countries for a certain year. (eg. 2015), as well as an option for the 3 least happiest countries for that year. The latter is optional but should be provided to the user as a choice.
  2. The top 3 countries that have gotten 1st in the happiness index for all the data provided the most number of times, as well as the 3 unhappiest countries based on happiness index the most number of times.
  3. Choose a country and show for a period (based on user’s choice, last 3, 5 or 10 years) whether the country has been increasing its rank or decreasing its rank.
  4. List the countries by name sorted in alphabetical order in ascending order/descending order. The default is ascending order, the descending order is a choice.
  5. Choose countries with at least a certain index. The user can opt for a higher end, but it is optional. List these countries in descending order according to index.
  6. Group countries by rank ranges in multiples of 10 (1 to 10, 11 to 20…) for the last 5 years in ascending order by rank.
  7. List the countries that have at least 3 consecutive years of lower ranks for any frame of time. (Think about 2014, how do you handle that?)
  8. For all options stated above, the user can choose a specific country from the filtered list and drill into the details such as:

• the average rank, the range of its rank,

• the range of its indexes,

• the standard deviation of its indexes.

• the years which the country has gotten the lowest rank and the highest rank.

• Be easy to use, verbose.

• Use modular program design.

• Employ sensible naming of variables, functions, modules, etc;

• Employ extensive (but clear) use of comments.

• Use only the following packages (and only if required):

– math;

– sys;

– os.

• Use only data types seen in the lectures (no dictionaries, classes, etc).

2.1 Extra Functionality

To increase the quality of your project, several of the following extras can be attempted. This list is not definite, and any extra features (not listed here) that will add value to the program, and thus will improve the final evaluation of your work.

The program can also:

• Allow choice of input data file name;

• Be robust (should not crash with unexpected input data):

– type detection;

– wrong menu options;

– wrong filename;

– . . .

• Provide other statistical measures;

• Provide a way to save a data analysis overview as a separate text file;

• Provide a pleasant interface.

2.2 World Happiness Index Data

To download the original data file, you will have to sign up an account with kaggle.com and use the following URL

https://www.kaggle.com/datasets/joebeachcapital/world-happiness-report-2013-2023

The sample provided in the assignment is a snapshot of the original downloaded data. For this assignment, you would only need the file provided.

3 Deliverables

The following deliverables are required (2 PDF files and all Python code):

• A User Manual (PDF file), containing instructions on how to use the software;

• a Code Manual (PDF file), containing:

– An upper level UML Activity Diagram, describing the main functionality and flow control of the program;

– A full print-out of the commented code.

• Source code (one or more Python files).

All deliverables must be submitted through Brightspace.

4 Evaluation

The projects will be evaluated after submission. Evaluation will consist of a short interview with all team members, to demonstrate the final software, and discuss and justify the design and programming choices made. Each student will be asked questions in turn, concerning both the functionality of the program, and the Python source code.# MIS3011S_Group2
USER MANUAL
Introduction
The Happiness Index Analyzer is a Python program designed to analyse data from a CSV file
containing information about the happiness index of countries over the years. The program
provides various functionalities to explore and understand the data, including identifying
top and least happiest countries, analysing trends, and obtaining detailed information about
specific countries.
To install and run the program, follow these instructions:

  1. Ensure you have Python installed on your system.
  2. Download the program files (CSV file and Programming script)
  3. Open a terminal or command prompt.
  4. Navigate to the directory containing the program files.
  5. Run the program and ensure both the programming script and CSV files are in the
    same folder.
    Input Requirements:
    The input CSV file should follow the format – Country, Year, Index, Rank.
    Example: Country 1, 2019, 7.6, 4
    Ensure that the CSV file is correctly formatted and contains necessary columns. During
    program execution, follow on-screen prompts for additional input.
    Menu Options:
  6. Happiest/Unhappiest Countries in Selected Year
    • Displays top 3 & 10 happiest countries and top 3 unhappiest countries.
  7. Most Frequent Happiest/Unhappiest Countries of all time
    • Displays top 3 happiest & unhappiest of all time
  8. Rank Trend for Selected Country
    • Display the trend of the country that was inputted by user, over the span of
    selected years.
  9. List Countries Alphabetically
    • Display the list of countries arranged alphabetically and selected order of
    either ascending or descending.
  10. Show Countries above Index 5 in Descending Order
    • Display countries with an index that is above the threshold which is
    determined by user.
  11. Show countries by Rank Ranges in multiples of 10 (Last 5 Years)
    • Display countries in groups of 10, grouping based on their ranks for the
    past 5 years. (starting from 2019, 2020, 2021, 2022, 2023)
  12. Consecutive 3 Years in Lower Ranks
    • Display list of countries that is ranked bottom for 3 consecutive years.
  13. Drill into Details of Selected Country
    • Display list of information on the country which the user inputs,
    information such as the rank range, average rank, index ranges etc.
    Troubleshooting:
    Ø Error: The file ‘data.csv’ does not exist.
    • Resolution: Ensure the file path is correct and the file exists.
    Ø Invalid choice. Please enter a number between 0 and 8.
    • Resolution: Make sure to enter a valid menu option
    Exiting the program:
    To exit the program, enter ‘0’when prompted for a choice. The program will display a
    goodbye message
如何处理动态语言(Python / JS)的“隐形”调用链? 本文揭示动态语言(Python/JS)中静态AST解析导致调用链“断链”的核心问题,提出通过运行时追踪补全图谱的解决方案。基于Code-Graph-RAG的cgr trace机制,分别利用pytest插件与V8 Profiler捕获真实调用路径,将动态边合并至静态图谱,并在权重体系中提升动态边优先级。实践表明,该方法可显著提升图谱覆盖率,实现“结构+行为”双视角理解代码,为MCP与Rerank系统提供可靠支持。 阅读详情

相关推荐

C#粘包和分包问题及解决方法

一:通过图解法来描述一下分包和粘包,这样客户更清晰直观的了解:  下面对上面的图进行解释:  1.正常情况:如果Socket Client 发送的数据包,在Socket Server端也是一个一个完整接收的,那个就不会出现粘包和分包情况,数据正常读取。  2.粘包情况:Socket Client发送的数据包,在客户端发送和服务器接收的情况下都有可能发送,因为客户端发送的数据都是发送的一个缓冲...

weixin_42033401的博客 7767

AI全栈实战 | 3.9-01 爬虫入门:requests 加 BeautifulSoup 三分钟跑通,但 90% 的人栽在这 4 个“礼貌“问题上

⚠️:本文内容仅用于。请遵守目标站点的服务条款与相关法律法规,不得对目标服务造成负担,不得采集、传播个人隐私数据。技术是中性的,边界在你手里。爬虫的入门技术(requests 发请求 + BeautifulSoup 解析)三分钟就能学会。真正区分"会用爬虫"和"会做爬虫的人"的,是这篇我们跑通"请求→解析→存储"的最小闭环,然后重点把"合规与礼貌"这根弦给你绷上。

源码获取 | 运行部署 | 定制二开修改,如果回复不及时请耐心等待,请见谅。 406

逆变器技术解析:DDSRF双解耦在正负序分离中的关键作用

本文深入解析了DDSRF双解耦技术在逆变器正负序分离中的关键作用。通过建立正反旋转坐标系并利用交叉反馈解耦网络,DDSRF能快速、精准地分离电网电压中的正负序分量,从而显著提升锁相环在电网不平衡条件下的精度与系统稳定性,是现代高性能并网逆变器的核心算法之一。

m3n5b7v8c9x的博客 410

从一段视频到可漫游的 4D 有声场景:思路拆解与最小复现手记

只需一段手机视频,你就能生成可"走进去"的 4D 有声场景:转头时狗叫声方向随之变化,走近时声音更清晰。本文拆解 Video-to-4DAVScene 的核心思路,手把手带你用几十行 Python 搭出最小管线,把视频中的运动物体变成带空间位置的声源,并附上三个真实踩坑的排障经验,代码可直接跑。🎧

helloagent的博客 235

深入解析UE5内存分析:从Memreport到Unreal Insights

本文深入解析了UE5内存分析的两大核心工具:Memreport与Unreal Insights。Memreport提供详细的内存快照,帮助定位UObject等资源的内存占用;而Unreal Insights则能进行实时监控与历史回溯,精准追踪内存泄漏。掌握这两款工具是优化UE5项目性能、确保大型项目稳定运行的必备技能。

lg888的博客 1007

深入解析DMR协议中的4-CPFSK调制技术与实现

本文深入解析了DMR协议中采用的4-CPFSK调制技术。该技术凭借其连续相位、恒包络的特性,在有限的12.5kHz信道带宽内实现了稳健的通信,有效对抗干扰并提升功放效率,是DMR数字对讲机清晰、稳定通信的核心保障。文章详细阐述了其原理、实现细节及在协议栈中的协同作用。

weixin_29306875的博客 229

【每天一个 Python 小案例30】Python 基础知识综合小项目:我的工具盒

作为系列收官,本篇把前 29 篇的知识点合成一个能直接用的命令行工具"我的工具盒":计算器(用 ast 解析表达式,不碰 eval)、单位换算与温度转换(一张换算表 + 特例分支)、记账与分类统计(Decimal + JSON 持久化)、以及用"字典当命令表"把菜单和业务逻辑解耦的主循环。文中对比了 eval 的安全隐患与 ast 白名单的做法,解释了 lambda 闭包在字典里的写法与晚绑定陷阱,并在最后给出整个系列的知识地图,把变量、数据结构、控制流、函数、类、异常、文件、标准库八块内容对应到具体篇目。

xinjiyaya的博客 426

GEE:基于 Landsat 数据集生成(1986-2024)月度合成地表温度(LST)时间序列数据

优快云@_养乐多_本文将介绍使用 Landsat 时间序列计算(1986-2024)月度合成地表温度(LST)时间序列数据集的代码。

养乐多的博客 1713

详解Python条件语句

在 Python 中,if...else 是一种条件语句,可以根据给定的条件执行不同的操作。这个语句通常用于控制程序的流程。

2601_96798737的博客 207

SAP Joule for Consultants 与 Joule for Developers 全面解读

SAP推出面向不同用户群体的Joule AI助手:开发者版(Joule for Developers)专注于编码提效,嵌入开发工具链辅助生成、重构和测试代码;顾问版(Joule for Consultants)聚焦业务场景,集成SAP云应用知识库,为咨询项目提供方案设计、差距分析和实施指引。两者共享AI底座但功能侧重点不同:开发者版优化技术开发流程,顾问版加速项目交付周期。典型应用场景包括制造业云转型方案制定和ABAP代码迁移,分别展示了两版本在业务决策支持和技术实施中的价值。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 542

【即插即用模块】卷积篇 | TGRS 2025 | HLKConv:小核+空洞=大核,感受野一致,但更轻更准!

本文介绍了分层大核卷积模块HLKConv,该模块通过动态大核+空洞卷积实现高效感受野扩展,将超大核卷积分解为小核+空洞卷积(如53×53核用17×17+dilation=3实现),计算量仅为普通大核的1/10。模块采用双分支设计:基础卷积分支捕捉局部细节,大核空洞分支捕捉长距离关联,通过1×1卷积融合。实验表明HLKConv在红外小目标检测中优于传统大核卷积,适用于高分辨率视觉任务。代码实现了不同核尺寸的配置,输入输出特征维度保持不变,计算效率显著提升。

主要更新底层视觉(去噪、超分等)相关的科研内容,形式为【论文精读】+【论文复现】 346

Python3 协程:异步编程的核心机制与实战

协程是解决I/O密集型任务等待瓶颈的高效机制,相比线程更轻量、无锁开销。从yield到async/await的演进,使异步编程语义清晰、易于理解。通过async/await可实现并发执行多个任务(如gather、create_task),显著提升网络请求、爬虫等场景性能。关键在于使用异步库(如aiohttp)替代同步库,避免阻塞事件循环。合理控制超时与并发数,才能发挥协程最大优势。

Lxn2zh的博客 159

【ESP 保姆级教程】玩转emqx数据集成篇④ ——数据桥接之HTTP服务

主要是学习数据桥接功能以及构建自己的http服务器,这是一个非常有用的功能。包括各种传感器上报基本上都需要数据桥接功能支持,所以还是希望认真学习这一块开发,然后结合数据库存储等等知识点进行进一步学习。

单片机菜鸟哥的博客 1307

torch.compile 差异仅 1e-6,边界样本预测为何翻转

torch.compile 加速后输出与 eager 不一致,部分预测翻转。逐层对比与 graph break 分析定位到动态分支翻转根因。容差回归仅适用于无分支翻转场景,零容忍场景应禁用编译。

昨日种种,皆成今我。今日种种,皆成新我。 159

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

二进制木马免杀-Python 分离免杀与 Web 挂马

二进制木马免杀-Python 分离免杀与 Web 挂马

2503_94637398的博客 268

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

蓝桥杯·全国青少年信息素养大赛·电子学会Python/C++考级 备考:莫队算法离线区间查询详解

备赛进行时:第十八届蓝桥杯软件赛报名已于 2026-10-08 10:00 开启、12-18 14:00 截止,省赛定在 2027-04-10(C/C++·Python 程序设计 9:00–13:00);中国电子学会 2026 年 12 月软件编程(C/C++ 一级至十级、Python 一级至六级)考级报名 9/23–12/2 16:00、统考 12-12;全国青少年信息素养大赛 2026—2027 赛季算法应用主题赛也已进入复盘练兵窗口。

IT_Scratch的博客 137

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

【Python】国家中小学智慧教育平台电子教材批量下载与 PDF 合成实战

成果:两本语文电子课本(一年级上册 118 页 / 23MB、三年级上册 130 页 / 30.3MB),合计 248 页、约 54MB,单本下载加合成 40~60 秒,PDF 页数校验全部通过。经验教训SPA 站点的数据接口优先从 bundle 里挖,比抓页面稳得多;资源链接要按 private/public 分组看待,只取平台公开部分;页数、目录名这类“可推断”的信息,永远用实际响应验证一次;受限环境里“能不能跑浏览器”要在方案定稿前确认。后续计划:这版 PDF 是图片版,没有文字层;

木头大左的博客 137

魔塔社区微调训练Qwen2-1.5B-Instruct模型并烧录到‌RK3568开发板教程

本文基于Ubuntu 22.04 + CUDA 13.0.3环境,使用LLaMA-Factory框架对Qwen2-1.5B-Instruct模型进行LoRA微调,训练儿童故事生成专用模型。通过配置qwen模板、制作alpaca格式数据集、执行sft训练并合并LoRA权重,最终将模型转换为GGUF格式,并量化为Q4_K_M以适配RK3568嵌入式平台。全程支持国产镜像加速下载与显存优化,实现高效轻量化部署。

浅清秋慕夏的博客 186

【回眸】DeepSeek V4.1 Flash 快速上手与实战

本文介绍如何高效本地部署开源大模型,通过现代化工具链实现分钟级环境搭建。聚焦显存优化、一键安装、代码调用与多轮对话实现,解决“显存不足”“连接超时”等痛点,提供参数调优与结构化输出技巧,助力开发者在离线场景下快速构建稳定、高效的本地推理系统。

啤酒鸭的物联网开发记录博客 223

智叟云集-手机证据抓取系统的工程结构与应用入口

本文系统阐述手机证据抓取系统的工程结构与应用入口,涵盖四大层面:工程目录划分(Android、Python服务、Web页面、测试与构建工具);Android组件通过Manifest声明可启动页面,主界面由MainActivity管理;Python服务通过run.py解析参数并启动FastAPI应用,支持远程访问;浏览器页面采用HTML/CSS/JS分离架构,静态资源通过路径关联,实现动态交互。各模块分工明确,协同构建可运行的采集系统。

2301_77178996的博客 232

Java Arrays.asList 常见坑详解|UnsupportedOperationException、数组联动、基本类型 bug

解析 Arrays.asList 常见开发陷阱,演示 UnsupportedOperationException、底层数组引用共享、基本类型数组问题,区分 Arrays 内部 ArrayList 与 java.util.ArrayList,给出数组转 List 的各种场景正确代码。

weixin_42617033的博客 473

利用python中matplotlib.pyplot库绘制图

plt.plot(x,y) # x,y是每个点的坐标,plot()把每个点按顺序画折线。plt.subplots(2,2)表示绘制2*2的子图布局,axs[0,0]表示在第0行第0列绘制子图...coordinates_i[:,0]表示获取每一行(每一个spot)的第0列(x坐标)coordinates_i[:,1]表示获取每一行(每一个spot)的第0列(y坐标)plot.subplot(2,2,1) 表示子图布局是2*2的,开始绘制第一个。也可以导入数据绘制。可以设置color属性,设置颜色。

qq_46147236的博客 102

Spring Boot 自动配置原理

Spring Boot 自动配置由 @EnableAutoConfiguration 导入选择器,读取 jar 中 .imports 候选清单,经去重、排序、排除后逐类做条件判断,通过才注册 Bean。延迟导入让用户 Bean 优先,@ConditionalOnMissingBean 使默认配置让位。失效时查清单和 Negative matches。

2401_89855466的博客 377

【随笔】KV缓存量化:省下的显存,要付出多少数值误差

用可运行量化器解释位宽、比例信息、分组和离群值的关系,核算KV缓存实际载荷,并给出Transformers配置与容量、延迟、质量验收方法。

code2cat的博客 454

【每天一个 Python 小案例29】Python 实现商品购物车

本篇实现一个购物车:商品目录、加入商品、修改数量、移除商品、查看小计、计算满减与 VIP 折扣、结算扣库存。核心设计是"目录与购物车分离"——目录存商品主数据,购物车只存 {商品编号: 数量};金额一律用 Decimal 并做 ROUND_HALF_UP 舍入。折扣部分讲清阶梯满减的匹配顺序(阈值从高到低、命中即停)与叠加顺序(先满减、后打折),并用一次完整结算演示 706 元如何变成 613.70 元。

xinjiyaya的博客 212

Python的字典

Python字典是存储键值对的数据结构,通过键(key)快速查找对应的值(value)。可使用{}定义,支持增删改查操作:通过dict[key]查询或修改值,get()方法安全获取并设置默认值,del dict[key]删除键值对,keys()、values()和items()用于遍历。items()结合双变量循环可高效遍历所有键值对,提升代码可读性与灵活性。

qq_43010954的博客 197
上一篇: Translation Schema
下一篇: King Triton‘s Ocean
todcode
博客等级 码龄7年 359粉丝 108原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值