🗒️HCI作业-数据可视化
00 分钟
2023-5-14
2023-5-22
type
status
date
slug
summary
tags
category
icon
password

HCI Lab3:Data Visualization

效果图
效果图

Learning Process

  1. 通过这个视频对dash与plotly有大致印象
  1. 参考教程
  1. 数据特征
      • salaries-by-region.csv
        • 学校
          地区
          起薪中位数
          薪资中位数
          前90%
          前75%
          前25%
          前10%
          Stanford University
          California
          $70,400.00
          $129,000.00
          $68,400.00
          $93,100.00
          $184,000.00
          $257,000.00
      • salaries-by-college-type.csv
        • 学校
          学校类型
          起薪中位数
          薪资中位数
          前90%
          前75%
          前25%
          前10%
          MIT
          Engineering
          $72,200.00
          $126,000.00
          $76,800.00
          $99,200.00
          $168,000.00
          $220,000.00
      • degrees-that-pay-back.csv
        • 毕业专业
          起薪中位数
          薪资中位数
          变化率%
          前90%
          前75%
          前25%
          前10%
          Accounting
          $46,000.00
          $77,100.00
          67.6
          $42,200.00
          $56,100.00
          $108,000.00
          $152,000.00
  1. 回调函数的编写 @app.callback(output,input): output对应这后面函数的返回值指向对应的图表; input对应的输入值传入到后面的函数的形参中。

    Design

    The dashboard designed for this task consists of a total of four sections, each displaying a different type of visualization.
    Dashboard Overview
    Dashboard Overview
    1. Choropleth Map: The first part of the dashboard displays a choropleth map of the United States, with each state's color indicating the median salary level of that region. The darker the color, the higher the salary. A slider is provided to select different career stages, and the map will update accordingly. This map provides a geographical overview of salary distribution across the U.S.
      1. notion image
    1. Scatter Plot: The second part of the dashboard displays a scatter plot showing the salaries of all colleges in the selected state from the choropleth map. This plot updates based on the selected state in the map and the career stage from the slider. It allows users to compare salary levels among different colleges in a specific region.
      1. notion image
    1. Box Plot: The third part of the dashboard presents a box plot that illustrates the salary distribution of different college types. It also updates according to the chosen career stage (on the slider). It's a useful tool to compare salary distributions among different types of colleges, such as Engineering, Liberal Arts, etc.
      1. notion image
    1. Bar Plot: The fourth and final part of the dashboard displays a bar plot of different undergraduate majors and their corresponding salaries. This plot also updates based on the selected career stage(on the slider). This visualization provides a clear comparison of salary levels across different majors.
      1. notion image
    Of course the dashboard also includes a header and a slider used to select the salary type.
    Through these visualizations, users can gain insights into how region, college type, and major affect salary levels at different career stages.

    Problems and Solutions

    • 需要进行数据清洗
      • 原因是数据是以"$70,400.00"的方式存储的,应该需要使用清洗数据,才可以用color_continuous_scale来进行染色,色彩对应链接
        notion image
      • 此外还需要注意将查到的学校位置与state_code相对应,以便对其染色

      评论
      Loading...