answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DochEvi [55]
2 years ago
14

In Lab 7, we worked through a program that displayed the homeless shelter occupancy over time. The same approach can be used for

displaying any dataset where the date and time are stored. For this program, use the lab as a starting point to display public school attendance from NYC OpenData. If you would like to test your program on other data, you can filter for an individual school by viewing the data and filtering on the school number ("School DBN"). Export the file as CSV and save. There is a sample file for the high school on campus on github Modify the program from Lab 7 that displays shelter population over time to: Ask the user to specify the input file, Ask the user to specify the output file, Convert the date column (which is stored as 'YYYYMMDD') to a datetime format recognized by pandas, for example if your dataframe is df, overwrite the 'Date' column to be: df["Date"] = pd.to_datetime(df["Date"].apply(str)) Make a plot of the percent of absent students over time from the data in the input file, and Store the plot in the output file the user specified. A sample run of the program: Enter name of input file:

Engineering
1 answer:
Bezzdna [24]2 years ago
6 0

Answer:

Explanation:

The python code to generate this is quite simple to run.

i hope you understand everything written here, you can as well try out other problems to understand better.

First to begin, we import the package;

Code:

import pandas as pd

import matplotlib.pyplot as plt

name = input('Enter name of the file: ')

op = input('Enter name of output file: ')

df = pd.read_csv(name)

df['Date'] = pd.to_datetime(df["Date"].apply(str))

plt.plot(df['Date'],df['Absent']/(df['Present']+df['Absent']+df['Released']),label="% Absent")

plt.legend(loc="upper right")

plt.xticks(rotation=20)

plt.savefig(op)

plt.show()

This should generate the data(plot) as seen in the uploaded screenshot.

thanks i hope this helps!!!

You might be interested in
An ideal Diesel cycle has a compression ratio of 18 and a cutoff ratio of 1.5. Determine the maximum air temperature and the rat
defon

Answer:

A) Rate of heat addition = 228.53 Hp

B) Maximum Air temperature = 1109 °C

Explanation:

We are given;

Cut off ratio; r_c = 1.5

Compression ratio; r = 18

Power produced; W` = 150 Hp

cp = 1.005 kJ/kg·K

cv = 0.718 kJ/kg·K

R = 0.287 kJ/kg·K

k = 1.4

Temperature;T1 = 17°C = 17 + 273 K = 290K

I've attached the rest of the explanation below.

8 0
2 years ago
The following passage contains a fragment. Select the correct revision. Presley took the exuberance of gospel and added the freq
Semmy [17]

Answer:

A

Explanation:

Option A was the only option that did not have a sentence fragment. All the other choices were fragments because they interrupted the flow of the sentence. A sentence fragment means that if you started reading where the period is, you would understand everything about the sentence and it would be clear. You cannot have an incomplete sentence that does not have background information. An example would be: And that is how you install it. This leaves information unanswered, such as what the subject of the sentence is, or in other words, what you were installing. Another indicator that this was a sentence fragment was that the sentence began with the word "And." Sentence fragments very commonly start with the word and, because that word shows that it is a continuation of a topic.

7 0
2 years ago
Toeboards are usually ___ inches high and used on landings and balconies.
Ksju [112]

Answer:4 inches

Explanation:

Google told me

6 0
2 years ago
Identify the four engineering economy symbols and their values from the following problem statement. Use a question mark with th
Vilka [71]

Answer:

The company will have $311,424 in its investment set-aside account.

Explanation:

To determine the amount of money that the company will have after 7 years with an interest rate of 11% per year, we must calculate the price to start with an increase of 11%, and then repeat the operation until reaching seven years:

Year 0: 150,000

Year 1: 150,000 x 1.11 = 166,500

Year 2: 166,000 x 1.11 = 184,815

Year 3: 184,815 x 1.11 = 205,144.65

Year 4: 205,144.65 x 1.11 = 227,710.56

Year 5: 227,710.56 x 1.11 = 252,758.72

Year 6: 252,758.72 x 1.11 = 280,562.18

Year 7: 280,562.18 x 1.11 = 311,424

3 0
2 years ago
A center-point bending test was performed on a 2 in. x d in. wood lumber according to ASTM D198 procedure with a span of 4 ft an
Zigmanuir [339]

Answer:

3.03 INCHES

Explanation:

According to ASTM D198 ;

Modulus of rupture = ( M / I ) * y  ----- ( 1 )

M ( bending moment ) = R * length of span / 2

                                     = (120 * 10^3 ) * 48 / 2 = 288 * 10^4 Ib-in

I ( moment of inertia ) = bd^3 / 12

                                    = ( 2 )*( d )^3  / 12 =  2d^3 / 12

b = 2 in ,  d = ?

length of span = 4 * 12 = 48 inches

R = P  / 2 =  240 * 10^3 / 2 =   120 * 10^3 Ib

y ( centroid distance ) = d / 2  inches

back to equation ( 1 )

( M / I ) * y

940.3 ksi = ( 288 * 10^4 / 2d^3 / 12 ) * d / 2

                = ( 288 * 10^4 * 12 ) / 2d^3 )  * d / 2

940300  = 34560000* d / 4d^3

4d^3 ( 940300 ) = 34560000 d  ( divide both sides with d )

4d^2 = 34560000 / 940300

d^2 = 9.188   ∴ Value of d ≈ 3.03 in

8 0
2 years ago
Other questions:
  • Mary is interested in developing new machines that would increase the productivity of small scale farmers. After high school, wh
    8·1 answer
  • A square loop of wire surrounds a solenoid. The side of the square is 0.1 m, while the radius of the solenoid is 0.025 m. The sq
    6·1 answer
  • The basic barometer can be used to measure the height of a building. If the barometric readings at the top and the bottom of a b
    15·1 answer
  • An aircraft component is fabricated from an aluminum alloy that has a plane-strain fracture toughness of 40 MPa1m (36.4 ksi1in.)
    15·1 answer
  • . Were you able to observe ???? = 0 in the circuit you constructed during lab? Why or why not? Hint: What value of resistance wo
    6·1 answer
  • Compute the strain-hardening exponent (n) for an alloy in which a true stress of 415 MPa produces a true strain of 0.10; assume
    10·1 answer
  • Suggest how any sorting algorithm can be augmented in a way to make the best-case count of its key comparisons equal to just n−1
    6·1 answer
  • Sal has many options for how to spend her afternoon. She placed them in the order in which she values them: 1) go to a movie, 2)
    14·1 answer
  • The mass fractions of a mixture of gases are 15 percent nitrogen, 5 percent helium, 60 percent methane, and 20 percent ethane. T
    9·1 answer
  • Who can work on a fixed ladder that extends more than 24 feet?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!