Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program in Python 2.7 that performs the following using the matplotlib and pandas packages: Loads the ss13hil.csv file that contains the PUMS dataset

Create a program in Python 2.7 that performs the following using the matplotlib and pandas packages: Loads the ss13hil.csv file that contains the PUMS dataset (assume it's in the current directory) and create a DataFrame object from it. Create a figure with 2x2 subplots. The required subplots are as follows: Upper Left Subplot - Pie chart containing the number of household records for different values of the HHL (household language) attribute. The plot should have no wedge labels, but should have a legend in the upper left corner. The pie needs to be rotated appropriately (see example figure on last page). Upper Right Subplot - Histogram of HINCP (household income) with KDE plot superimposed (see pg 236-238 of textbook). You should use a log scale on the x-axis with log-spaced bins (HINT: use np.logspace). Lower Left Subplot - Bar chart of Thousands of Households for each VEH (vehicles available) value (exclude NaN). Make sure to use the WGTP value to count how many households are represented by each household record and divide the sum by 1000. Lower Right Subplot - Scatter plot of TAXP (property taxes) vs. VALP (property value). Make sure to convert TAXP into the appropriate numeric value, using the lower bound of the interval (e.g. 2 -> $1, 16 -> $700, ). Use WGTP as the size of each marker, o as the marker type, and MRGP (first mortgage payment) as the color value. Add a colorbar.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Real Time Analytics In Big Data A Comprehensive Guide For Everyone

Authors: Lennox Mark

1st Edition

B0CPTC9LY9, 979-8869045706

Students also viewed these Databases questions