ITP-216 Applied PythonPython

Java Python ITP-216 Applied Python

Final Project

Definition/Description

In the era of Big Data, data analysis and visualization is the best approach for extracting useful information and making decisions.

For your Final Project, you are tasked with creating a web app which manipulates and visualizes a Big Data dataset.

Requirements

General

Your web app shall be written in Python using Flask, pandas, scikit-learn, and matplotlib.

Your web app shall allow clients to choose what subsets of the data they would like to see (via text input, radio buttons, et al.), and the app will serve them a visualization of that data.

Big Data

You may use any dataset of your choice for your Big Data; follow your heart! It must, however, meet the following criteria:

1.   It must contain at least 1000 datapoints.

2.   At least half of the data must be numeric.

Your Big Data shall be stored on your server. It may be stored as a csv. For extra credit, your Big Data shall be stored in a database which your web app accesses.

Endpoints

Your web app should implement a number of endpoints.

1.   At least 2 endpoints used for GET requests,i.e. directly accessible by browsers (e.g. '/').

a.   At least 1 of these should be a dynamic endpoint created from a client POST request (e.g. for a web app which makes predictions on amounts of insects in a given area,  '/projection/butterflies' ).

2.   At least 2 endpoints used for POST requests,i.e. not directly accessible by browsers (e.g. '/login'from the Web App Homework).

Scientific Computation

Your web app shall do some sort of computation with the Big Data dataset. This could be as straightforward as aggregating attributes, but it needs to compute something meaningful.

Machine Learning

Your web app shall make predictions based on the given Big Data dataset. As long as your web app is using ML to make predictions, you're good to go. These could be:

1.   Predictions of how a particular property will change over time.

2.   Label classifications of data with unknown labels.

Data Visualization

Your web app shall visualize the Big Data dataset in some meaningful way. At least two types of plots should be accessible:

1.   At least 1 plot should visualize the data without any ML processing.

2.   At least 1 plot should visualize ML-processed predictions. These plots do not all have to appear on the same webpage.

Provided Files/Data

Example project

An example of the Final Project from last semester can be found here: http://pohlner.pythonanywhere.com/

This project visualizes COVID-19 confirmed and recovered cases, and also visualizes ML predictions of future confirmed and recovered cases. It uses datasets from The Johns Hopkins University (JHU) Center for Systems Science and Engineering (CSSE), but only uses data up to mid-October.

*Example Project Usage Notes:

.    Make sure you’reusing Chrome or Firefox (not Safari or IE)

.    For Locale try “Mexico”  (case-sensitive)

.    For Date try “02/02/23” (format matters)

Reference material

1.   Flask documentation: https://flask.palletsprojects.com/en/1.1.x/

2.   Jinja documentation: https://jinja.palletsprojects.com/en/2.11.x/

3.   matplotlib documentation: https://matplotlib.org/contents.html

4.   Scikit-learn documentation: https://scikit-learn.org/stable/modules/classes.html

5.   Description of categories of machine learning models and different algorithms:

https://towardsdatascience.com/all-machine-learning-models-explained-in-6-minutes-9fe30ff6776a

6.   Matplotlib with Flask: https://stackoverflow.com/questions/20107414/passing-a-matplotlib-figure-to-html-flask 7.   https://stackoverflow.com/questions/65068073/error-while-showing-matplotlib-figure-in-flask

a.   https://stackoverflow.com/a/65068732

Big Data sources

You may use any dataset you'd prefer, as long as it meets the criteria for the Final Project. Below is a short, non exhaustive list of Big Data dataset options:

1.   Start here: Kaggle Open Source Data Sets for ML: https://www.kaggle.com/datasets

2.   80+ Free Data Sets: https://www.interviewquery.com/p/free-datasets

3.   Forbes list: https://www.forbes.com/sites/bernardmarr/2018/02/26/big-data-and-ai-30-amazing-and-free-public- data-sources-for-2018/?sh=5f4a369f5f8a

4.   Springboard list: https://www.springboard.com/blog/free-public-data-sets-data-science-project/

5.   Data from the City of Austin, TX: https://data.austintexas.gov/

Deliverables

All Python files, in the same directory, and compressed in a zip file. The zip file should be named:

ITP_216_FP_YourLastName_YourFirstName.zip

Grading

Section

Points (Total: 30)

Functionality and User Interface

1.   The root endpointshall display an input section for client-supplied data.

2.   Clients shall be able to select a query of existing data, or a prediction based on existing data.

3.   Clients shall be able to submit query information, which will generate a POST request.

4.   Clients shall be able to see queried information on returned pages.

4 (1 point each)

General Code

1.   The codeshall contain no global objects other than those provided.

2.   View functions shall only contain code related to the view function itself; anything else

(e.g. querying the database, constructing a pandas object, et al.) shall be separated and held in its own function.

2 (1 point each)

Web App

1.   Flask shall be used to create the web framework routing using endpoints and associated view functions.

2.   The web app shall query and manipulate the dataset.

3.   The web app shall contain at least 2 GET endpoints. (2 points)

a.   At least 1 of these shall be a dynamic endpoint created by a client POST request.

4.   The web app shall contain at least 2 POST endpoints. (2 points)

6 (1 point each)

Scientific Computation

1.   Pandas shall be used for manipulation of the data.

2.   The app shall calculate some sort of meaningful aggregation.

2 (1 point each)

Machine Learning

1.   Scikit-learnshall be used for the Machine-Learning aspects.

2.   A projectionshall be created of at least one of the features of the dataset.

2 (1 point each)

Data Visualization

1.   Matplotlib shall be used to visualize the data once it has been loaded, prepared, and manipulated.

2.   Figures shall have a title.

3.   Plot axes shall be labelled.

4.   Plots shall contain a legend, and datasets plotted shall be named in the legend.

5.   Plot axes shall have values clearly visible (numbers, names, et al.).

6.   A distinctionshall be made for any plot as to whether it represents existing data or predictive data.

6 (1 point each)

Documentation and Formatting

1.   Concise and useful commenting in your codebase is a must. You will need a header with  your name, the semester, the section of the course you are in, and the assignment number.

2.   You need descriptions of any major sections in your code (functions, classes, methods, et al.).

3.   Your code must be generally clear and readable.

3 (1 point each)

Error Handling

1.   The web app shall run with no errors.

2.   The web app shall reroute appropriately when given a nonsensical request (e.g. an

endpoint that a client isn't meant to request directly, a POST with the wrong data, et al.)

2 (1 point each)

Extra points for free!

3

Extra Credit (database)

1.   All data is stored in the database accurately (i.e. appropriate tables, key relationships [if any], attributes, and constraints on attributes).

2.   The database is queried correctly given the client input, and returns appropriate data.

5 (2         

基于可靠性评估序贯蒙特卡洛模拟法的配电网可靠性评估研究(Matlab代码实现)内容概要:本文围绕“基于可靠性评估序贯蒙特卡洛模拟法的配电网可靠性评估研究”,介绍了利用Matlab代码实现配电网可靠性的仿真分析方法。重点采用序贯蒙特卡洛模拟法对配电网进行长时间段的状态抽样与统计,通过模拟系统元件的故障与修复过程,评估配电网的关键可靠性指标,如系统停电频率、停电持续时间、负荷点可靠性等。该方法能够有效处理复杂网络结构与设备时序特性,提升评估精度,适用于含分布式电源、电动汽车等新型负荷接入的现代配电网。文中提供了完整的Matlab实现代码与案例分析,便于复现和扩展应用。; 适合人群:具备电力系统基础知识和Matlab编程能力的高校研究生、科研人员及电力行业技术人员,尤其适合从事配电网规划、运行与可靠性分析相关工作的人员; 使用场景及目标:①掌握序贯蒙特卡洛模拟法在电力系统可靠性评估中的基本原理与实现流程;②学习如何通过Matlab构建配电网仿真模型并进行状态转移模拟;③应用于含新能源接入的复杂配电网可靠性定量评估与优化设计; 阅读建议:建议结合文中提供的Matlab代码逐段调试运行,理解状态抽样、故障判断、修复逻辑及指标统计的具体实现方式,同时可扩展至不同网络结构或加入更多不确定性因素进行深化研究。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值