Question

blockpy python review 16 processing json files

second pic is the report.json file data

BlockPy: Review 16) Process JSON The given file contains JSON data. Use the data associated with the Employees key (a listfTitle: Business Report, Generated: 11/20/2017 at 1: 09pm, Authors [Ada Lovelace, Alan Turing, Guido von Rossum

BlockPy: Review 16) Process JSON The given file contains JSON data. Use the data associated with the "Employees" key (a list inside of a dictionary inside of a dictionary inside of a dictionary) to plot the distribution of employees. Note: You cannot embed the contents of the file directly in your program. Use the appropriate file handling style to access the data in the file. Note: You do not need to title and label your graph. Files Available: report.jsonじ
f"Title": "Business Report", "Generated": "11/20/2017 at 1: 09pm", "Authors" ["Ada Lovelace, "Alan Turing", "Guido von Rossum"], "Records": "Number of Records": 4, "Span": "8-11-2017", "12-20-2017" "Data": "Sales": [46, 50, 47, 56, 54, 45, 55, 37, 54, 46, 64, 55, 56, 55, 52, 53, 39, 68, "Revenue" [66, 52, 53, 42, 49, 57, 55, 49, 54, 55, 51, 50, 57, 50, 46, 64, 43, 6 "Emp loyees" [11, 8, 10, 3, 11, 14, 6, 17, 7, 7, 6, 14, 9, 8, 10, 6, 9, 7, 12, 8, "Dogs": [20, 19, 16, 19, 19, 15, 16, 16, 21, 23, 24, 14, 19, 16, 21, 14, 23, 17, 55, 55, 44, 39, 62, 56, 53, 42, 35, 43, 42, 51], 4, 45, 52, 30, 55, 38, 64, 40, 49, 59, 38, 63, 54], 11, 18, 14, 9, 11, 11, 14, 8, 11, 4], 24, 25, 21, 17, 16, 17, 20, 19, 15, 21, 19, 22]
0 0
Add a comment Improve this question Transcribed image text
Answer #1
import json
import matplotlib.pyplot as plt

data = open("report.json").read()

data = json.loads(data)
plt.plot(data["Records"]["Data"]["Employees"])
plt.show()

18 16 14 12 10 8 4 10 20 0 15 25 30

Add a comment
Know the answer?
Add Answer to:
blockpy python review 16 processing json files second pic is the report.json file data BlockPy: Review 16) Process JSON The given file contains JSON data. Use the data associated with the "Employ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Suppose a binary tree data (in tiny written size) is stored in an array (A) as...

    Suppose a binary tree data (in tiny written size) is stored in an array (A) as given below and root is placed at “0”index. Note the array indices are in larger written size (0 to 74). Show the traversal data of the given tree for a)      In-Order Traversal b)     Post Order Traversal A 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 28 13 36 15 9 22 44 7 10 75 33 19 15...

  • RANGES FREQUENCY RELATIVE FREQUENCY CUMULATIVE REL. FREQ. 1 - 10 11 - 20 21 - 30 31 - 40...

    RANGES FREQUENCY RELATIVE FREQUENCY CUMULATIVE REL. FREQ. 1 - 10 11 - 20 21 - 30 31 - 40 41 - 50 51 - 60 61 - 70 71 - 80 81 - 90 91 - 100 '= 100 DATA VALUES?? SO, WHAT DOES A FREQUENCY TABLE TELL US? If you wrote each of the above data values on a ping pong ball,, put them in a jar and blindly pulled one out: What is the probability that this ball...

  • The following data consist of the revenue growth rates (in percent) for a group of 20...

    The following data consist of the revenue growth rates (in percent) for a group of 20 firms 56 42 28 83 49 53 51 43 32 65 63 91 70 42 36 59 30 55 Click here for the Excel Data File Construct a stem-and-leaf display for the above data Stem Unit Leaf Unit Frequenc Stem Leaf 1Growth Rates (in percent) 3 GrowRate 36 30 59 4 6 8 42 65 63 91 70 32 10 12 13 14 15...

  • Assignment 3-1 (3) - Protected View - AutoSave File Home Insert Page Layout Formulas Data Review...

    Assignment 3-1 (3) - Protected View - AutoSave File Home Insert Page Layout Formulas Data Review View Help PROTECTED VIEW Be careful-files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View f D62 G H D E с А 40 42 5 points 43 3 When market price is $5 per pound, the consumer surplus is: 44 45 Pisilb) $10! A S8 B $5 46 47 48 49 50 51 52...

  • Calculate the mean, median, and standard deviation for the total number of candies (per bag). Construct...

    Calculate the mean, median, and standard deviation for the total number of candies (per bag). Construct a histogram of the total number of candies (per bag). Use the z-score method to identify any potential outliers and outliers. Assume the total number of candies is normally distributed, calculate the probability that a randomly sampled bag has at least 55 candies in a bag. If a random sample of 50 bags is selected, find the probability that the mean number of candies...

  • python program do not use dictionary, list only Complete the program found in assignment4.py. You may...

    python program do not use dictionary, list only Complete the program found in assignment4.py. You may not change any provided code. You may only complete the sections labeled: #YOUR CODE HERE Write a program that does the following. Reads the contents of Text from the include file, input.txt Create a dictionary of key-value pairs called index.txt Key: This represents the individual word Value: This is a list of the line number from Text where Key appeared Example: If the word...

  • can you upload the answer in excel 7. Following are ages of 30 students in an...

    can you upload the answer in excel 7. Following are ages of 30 students in an ARC Boot Camp class: 18 30 20 21 28 26 20 21 19 22 26 38 18 19 23 25 19 20 18 21 29 35 17 22 19 24 23 21 20 25 Construct an expanded stem-and-leaf display for the given data. Stem Leaves 2. The following data values are the actual low temperatures recorded near the author's home. Construct a frequency distribution...

  • Write a python nested for loop that prints out the following pattern 100 99 98 97...

    Write a python nested for loop that prints out the following pattern 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33...

  • 2. After building a scientific way for demand forecasting, Mary hoped Jason can propose the optimal...

    2. After building a scientific way for demand forecasting, Mary hoped Jason can propose the optimal inventory/ordering policies for these 4 products for the first week of 2018. The sale price/unit for each product is listed below: Product A =$230 Product B=$50 Product C=$5 Product D=$3 Jason decided to use ABC rule to classify these 4 products. ‘A’ category product(s) will have the target service level 95%. ‘B’ product(s) will have the target service level 90% and ‘C’ products(s) will...

  • Data were collected on the amount spent by 64 customers for lunch at a major Houston...

    Data were collected on the amount spent by 64 customers for lunch at a major Houston restaurant. These data are contained in the file named Houston. Based upon past studies the population standard deviation is known with = $8. Click on the datafile logo to reference the data. DATA file Round your answers to two decimal places. If needed, use the critical value with three decimal places. a. At 99% confidence, what is the margin of error? b. Develop a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT