1answer.
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]
3 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]3 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
What is the hardest part of engineering?
Vikki [24]

ANSWER:

Aerospace Engineering. ...

Chemical Engineering. ...

Biomedical Engineering.

EXPLANATION:

This is all i know but ... I hope this helps~

7 0
2 years ago
Select three types of lines that engineers use to help represent the shape of a design in a sketch.
Vikki [24]

Hidden lines

  • Used to describe the in shown lines (like diagonals inside cubes)

Extension lines:-

  • Used to explain the expansion of structures like building

Object lines

  • Used to describe the structure of objects and the lining to show borders
7 0
3 years ago
If my friend have the corona what do I do
nordsb [41]
(E. Call the hospital to take them away
5 0
3 years ago
Read 2 more answers
Component(s) that only allow(s) electrons to flow in one direction. Mark all that apply
Korolek [52]

Answer:

A,D, and E

Explanation:

6 0
3 years ago
The period of a pendulum T is assumed to depend only on the mass m, the length of the pendulum `, the acceleration due to gravit
zzz [600]

Answer:

The expression is shown in the explanation below:

Explanation:

Thinking process:

Let the time period of a simple pendulum be given by the expression:

T = \pi \sqrt{\frac{l}{g} }

Let the fundamental units be mass= M, time = t, length = L

Then the equation will be in the form

T = M^{a}l^{b}g^{c}

T = KM^{a}l^{b}g^{c}

where k is the constant of proportionality.

Now putting the dimensional formula:

T = KM^{a}L^{b}  [LT^{-} ^{2}]^{c}

M^{0}L^{0}T^{1} = KM^{a}L^{b+c}

Equating the powers gives:

a = 0

b + c = 0

2c = 1, c = -1/2

b = 1/2

so;

a = 0 , b = 1/2 , c = -1/2

Therefore:

T = KM^{0}l^{\frac{1}{2} } g^{\frac{1}{2} }

T = 2\pi \sqrt{\frac{l}{g} }

where k = 2\pi

8 0
3 years ago
Other questions:
  • System grounding on a power system means electrically connecting the __?__ of every wye-connected transformer or generator to ea
    12·1 answer
  • Indicate on a tensile curve such quantities as yield stress, Young's modulus, UTS, toughness, point of necking, point of fractur
    7·1 answer
  • Type a statement using srand() to seed random number generation using variable seedVal. Then type two statements using rand() to
    5·1 answer
  • The water in a large lake is to be used to generate electricity by the installation of a hydraulic turbine-generator at a locati
    7·1 answer
  • Consider a system with two tasks, Task1 and Task2. Task1 has a period of 200 ms, and Task2 has a period of 300 ms. All tasks ini
    5·1 answer
  • What is temperature coefficient of resistance
    12·1 answer
  • The motion of a particle is defined by the relation x = t3 – 6t2 + 9t + 3, where x and t are expressed in feet and seconds, resp
    12·1 answer
  • What are the different branches of engineering involved in manufacturing a general-purpose elevator?
    6·1 answer
  • Acoke can with inner diameter(di) of 75 mm, and wall thickness (t) of 0.1 mm, has internal pressure (pi) of 150 KPa and is suffe
    9·1 answer
  • Why is it important to always be wearing a personal flotation device (PFD) when in or around the water?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!