02-Week-2-Assignment
.Rmd
keyboard_arrow_up
School
Rutgers University *
*We aren’t endorsed by this school
Course
198:142
Subject
Mechanical Engineering
Date
Dec 6, 2023
Type
Rmd
Pages
2
Uploaded by m.m02
---
title: "Week 2 Main Assignment"
output: html_notebook
---
## Instructions
You may use whatever resources you like for the following assignment, including
working with others. The work submitted must be your own, however, and not simply
copied.
## Set up
First load the tidyverse packages and load some data. You can run the entire chunk
by clicking on the green triangle below.
```{r setup, include=FALSE}
library(tidyverse)
yellow_cab <- read_csv("yellow_tripdata_2021_01_26.csv")
restaurants <- read_csv("restaurant_inspections_2021.csv.gz",
guess_max = 10000)
```
## Problem 1
The data for this problem is in the tibble `yellow_cab`, which consists of all
yellow taxi cab trips in New York City on January 26, 2021.
```{r}
yellow_cab %>%
glimpse()
```
* Please combine the following steps into a series of pipes:
+ Calculate a new variable `fare` as `total_amount` - `tip_amount`
+ Calculate a new variable `tip_percentage` as `tip_amount`/`fare` * 100
+ Drop any row for which the fare is less than $10
+ Drop all columns except `fare`, `tip_amount`, and `tip_percentage`
+ Sort by *decreasing* amounts of `tip_percentage`
```{r problem 1}
yellow_cab %>%
mutate(fare = total_amount - tip_amount, tip_percentage = tip_amount/fare*100) %>
%
filter(fare > 10) %>%
select(fare, tip_amount, tip_percentage) %>%
arrange(desc(tip_percentage))
```
## Problem 2
The data for this problem is in the tibble `restaurants`, which contains data on
New York City restaurant inspections in 2021. Each row in the data corresponds to
one violation at one restaurant.
```{r}
restaurants %>%
glimpse()
```
* Please combine the following steps into a series of pipes:
+ Include only observations for which `BORO` is Manhattan
+ Group the observations by `CAMIS`, which is a unique identifier of each
establishment, and `DBA`, which is the name of the restaurant
+ Summarize the data by creating a new variable `total_violations` equal to the
total number of violations at each restaurant
+ Sort the data by the decreasing number of violations
+ Show the 10 restaurants with the most violations by using `head()
```{r problem 2}
restaurants %>%
filter(BORO == 'Manhattan') %>%
group_by(CAMIS, DBA) %>%
summarize(total_violations = n()) %>%
arrange(desc(total_violations)) %>%
head(total_violations, n=10)
```
## Finishing up
When you are done, be sure to select "Run All" from the "Run" menu (top right of
the source code pane) to confirm that your code runs start to finish without
errors. Besides modifying the two code chunks, make sure you have replaced YOUR
NAME HERE and YOUR ANSWER HERE appropriately. Be sure to sign the honor pledge
below.
Finally, be sure that you have saved you file in RStudio Cloud (under the File menu
of RStudio Cloud, not the File menu of your browser). Then, in the Files pane,
click the checkbox by the file named `02-Week-2-Assignment.Rmd` and choose "More"
from the pane's menu, followed by "Export", to download the file to your own
computer. From there, upload the file to Canvas. There is no need to rename it---
Canvas will add your name to it when I download it.
On my honor, I have neither received nor given any unauthorized assistance on this
quiz.
Meghna Mehta
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Can someone please help to solve all of the following problem showing all work and include a load chart. Thank you!
arrow_forward
AutoSave
STATICS - Protected View• Saved to this PC -
O Search (Alt+Q)
Off
ERIKA JOY DAILEG
EJ
File
Home
Insert
Draw
Design
Layout
References
Mailings
Review
View
Help
Acrobat
O Comments
E Share
PROTECTED VIEW Be careful-files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View.
Enable Editing
Situation 9 - A 6-m long ladder weighing 600 N is shown in the Figure. It is required to determine
the horizontal for P that must be exerted at point C to prevent the ladder from sliding. The
coefficient of friction between the ladder and the surface at A and B is 0.20.
25. Determine the reaction at A.
26. Determine the reaction at B.
27. Determine the required force P.
4.5 m
1.5 m
H=0.2
30°
Page 5 of 5
671 words
D. Focus
100%
C
ЕPIC
GAMES
ENG
7:24 pm
w
US
16/02/2022
IZ
arrow_forward
reful-files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View.
Your Full Name
Enable Editing
ID:
Sec:
Q1: Which one is stronger; undeformed copper or
copper that has been plastically deformed?
Q2: Which one is stronger; unannealed copper or
copper annealed (heated) at 750° C?
Q3: Why?
101.
O
Focus
arrow_forward
I want the answer of part c
arrow_forward
Choose the correct answer, please, I need the solution as soon as possible
arrow_forward
Draw it on the graph provided please!
arrow_forward
REC
M Gmail
x4 BIT203 - Google x
Gmail: Free. Pria x
Dashboard
BIT203-Study W x
docs.google.com/document/d/1unVPvr_GhUFhrQuNdGICLqFle1ZB51_BICKagvoXoSU/edite
BIT203-Study WorkShop * D e
a Share
File Edit View insert Format Tools Add-ons Help Lastedit was made minutes ngoby Seri ECT
150 -
Nomal tet
Times Ne
12 • BIU
Discuss the tools and technologies for collaboration and social business that are available and
how they provide value to an organization.
I
arrow_forward
The following tools / resources may be useful for you to complete the assignment:a. Chatgpt (You may use it to learn Matlab coding or any other computer language. An example is given here: https://shareg.pt/mXHGne9 ). Please take note that code generated by chatgpt can be directly copied and pasted.b. Matlabi) Useful cheat sheet (https://n.ethz.ch/~marcokre/download/ML-CheatSheet.pdf)ii) Getting started with Matlab (https://matlabacademy.mathworks.com/en/details/gettingstarted )iii) Getting 30-day Matlab trial license (https://www.mathworks.com/campaigns/products/trials.html ) iv) Polyfit (https://www.mathworks.com/help/matlab/ref/polyfit.html )v) Exponential Fit (https://www.mathworks.com/matlabcentral/answers/91159-how-do-i-fit-an-exponential-curve-to-my-data)c. PlotDigitizer (https://plotdigitizer.sourceforge.net/ ) or a free online app that does not requires installation (https://plotdigitizer.com/app )You may use your own engineering judgement to make any assumptions on any…
arrow_forward
In a hypothetical scenario respond to the following email to reasuure the owner and in an informative and professional way.
Dear Project Manager-
I am so excited to have broken ground on the new mixed use space. As I watch the underground utilities such as water, storm drain, and sewer get installed I find myself worrying about failures. What steps are you taking to ensure those systems will not have to be dug up and repaired later in the construction process? We cannot afford a delay of any kind. Could you please explain how you plan to prevent any delays and ensure that the systems are functional and leak free.
The other concern that has come up that I would like to address now is the comfort of the office staff. Our current building is not comfortable. I am wondering why. We have the temperature appropriately set and it is easily maintained, but people still complain. What can we do to ensure they will be comfortable in the new building? A few months ago I asked one of our…
arrow_forward
Manufacturing processes
arrow_forward
(a) Summarize the following G and M code
a. G41, G81, 691, G01, GOO
b. M08, M30, M01, M06, M03
(b) Document three phases of writing a CNC program in the form of a block diagram. You don't have to write the actual CNC program.
arrow_forward
Don't copy paste someone else answer if I get to know I'll report and downvote too do on your own and only handwritten with proper steps not that handwritten only
arrow_forward
In the automotive industry, supercars are highly accredited with how they are manufacture; from the
type of car chassis used to the type of materials employed. Often enough, companies like BMW,
Mercedes & Audi produces supercars that exemplifies a better reliability compared to other automotive
manufacturing companies. This is because they pay close attention to the details on how the car is
manufactured; right from raw materials to a finished supercar. The task given to you is to watch the
video link provided below & explain the electrostatic process acquired for the two different models of
BMW vehicles.
https://www.youtube.com/watch?v=sUqKUbmdOr0
Pls watch the video before answering
arrow_forward
W
Document1 - Microsoft Word (Product Activation Failed)
File
Home
Insert
Page Layout
References
Mailings
Review
View
a ?
A Find -
A
% Cut
-
=。 青
Calibri (Body) - 11
A A
Aa
Aal
AaBbCcDc AaBbCcDc AaBbC AaBbCc AaB AaBbCcL
E Copy
ae Replace
Paste
BI U
abe x, x*
A
ab
A
I Normal
I No Spaci. Heading 1
Change
Styles
.
Heading 2
Title
Subtitle
W
A Select -
Format Painter
Clipboard
Font
Paragraph
Styles
Editing
• 2. 1:.
I' 2: 1 : 3:1
• 4.I 5.1' 6.1'7
I'8: 1 9 ' 10.L· 11: 1 ' 12.'13 · L 14: 1· 15.1A L'17:1 18
PARTIAL DIFFERENTIAL EQUATIONS
PLEASE ANSWER ALL QUESTIONS
Consider the temperature distribution in a 2 x 1 rectangular plate as described in the figure below.
Show that the steady-state temperature distribution u (1, y) in the plate is given by
200
пя (1- у)
u (1, 3) = Esinh
:(1 +(-1)") sin -
sinh
n sinh
n=1
2
Calculate the steady-sate temperature at the centre of the plate.
Ice at 0°-
1
Ice at 0°
Ice at 0°
Boiling water at 100°
all
06:14 PM
2022-05-10
Page: 1 of 1
Words: 7
E EA E E E
100%…
arrow_forward
Idk
arrow_forward
What are you guys doing I gave you just one simple task, you just have to copy paste the given photos onto the white page and upload ( only copy paste) pls do that I'll UPVOTE for sure pls diagram clear pls do it man, u dont have to find anything it's not against honor code violation u can do pls
arrow_forward
Can you help me with this problem?
P1 is where the blue dot is
arrow_forward
Home
Insert
Draw
Design
Layout
References
Maili
OLYTECH
Calibri (Bo...
11
v A A
Aa v
m Air. Ma
Paste
в I
U v ab x,
x | A
Name:
ID No.:
rm Air. M
Date:
CRN:
Course Code: JACV 506E
Aircraft Mechanical Mainte
Practice.
ces ( CRI
Page
Originated By
Mark awarded -
Instructor/Assessor:
Assignment: Interpret engineering drawings and diagrams
bus
se Mat
hing Pl
Questions: -
1. Write 2 differences between isometric and oblique projections?
ssment
2. Write 5 details found on the drawing title block?
Feedba
3. Write 4 types of sectional views?
4. Name 3 methods how drawings are stored in?
5. Name 3 types of fits?
arrow_forward
Suppose your CFD code can handle nonelementary blocks. Combine as many blocks of Fig. as you can. The only restriction is that in any one block, the number of i-intervals and the number of j-intervals must be constants. Show that you can create a structured grid with only three nonelementary blocks. Renumber all the blocks and indicate how many i- and j-intervals are contained in each block. Add up all the cells and verify that the total number of cells does not change.
arrow_forward
Hello. I need help with this review question. Please help me out.
arrow_forward
What are the answers in given problem
arrow_forward
I need answer within 5 minutes please please with my best wishes
arrow_forward
PHYS 14 midterms - Word
Carl John Rivas
File
Home
Insert
Design
Layout
References
Mailings
O Tell me what you want to do
& Share
Review
View
Help
X Cut
P Find -
Arial
10
A A
Aa -
AaBbCcDdE AaBbCcDdE AaBbCc AaBbCcD A aB
自 Copy
ab. Replace
Paste
A . aly v A
1 Normal
1 No Spaci. Heading 1
v abe
Heading 2
Title
A Select
x,
V Format Painter
Clipboard
Font
Paragraph
Styles
Editing
4.
A lightweight drone (1.00 kg) is launched at 800 m high and moves upward at a constant velocity (while
ignoring the effects of gravity only on the drone). The balloon, when measured at a horizontal distance from
you, is about 1600 m away from you. At the moment when the drone moves, you shoot a bullet (weight =180
g) with an initial velocity of 1009 m/s at a fixed angle a, where sin a=3/5 and cos a= 4/5. (g = 9.8 m/s?) (10
pts each)
a. How long does it take for the bullet to collide with the drone?
b.
At what height will the bullet hit it?
C.
What is the upward velocity of the drone?
d. Provided that the…
arrow_forward
write one command for each case: take data name is 'x' and file name is 'database'
Import data form Excel sheet to MATLAB.
1. Export data form MATLAB to Excel sheet.
2.
Save data as text file.
3. Load data form text file.
4. Open and close file.
arrow_forward
Hartley Electronics, Inc., in Nashville, producesshort runs of custom airwave scanners for the defense industry.The owner, Janet Hartley, has asked you to reduce inventory byintroducing a kanban system. After several hours of analysis, youdevelop the following data for scanner connectors used in onework cell. How many kanbans do you need for this connector?Daily demand 1,000 connectorsLead time 2 daysSafety stock 12 dayKanban size 500 connectors
arrow_forward
6...
arrow_forward
Version #2
Describe the situation using a diagram:
Contact Push/Pull Interaction
4
Write the narrative:
During the contact push/pull interaction between the hand and the cart kinetic energy is transferred between them. The type of energy that changes in the two interacting objects is always the same as the type of energy that is transferred, so this means that the kinetic energy of the hand decreases while the kinetic energy of the cart increases. Since the cart was at rest to start with, this increase of kinetic energy means that it starts to move.
Which criterion (accuracy, completeness, or clarity and logical reasoning) is not satisfied by this explanation? Briefly explain why you think so.
arrow_forward
4. Documents business requirements use-case narratives.for only one process
note: please i want Documents like this in pic
arrow_forward
A.) Sketch:[Draw a sketch that represents the situation of the problem, while showing all the variables
included in it (vectors or scalars as forces,
, displacement, position, etc.).]
B.) Approach:[Mention all the laws, principles or concepts, as well as the mathematical equations that solve this problem. Step by step.]
C.)Solution:[Develop the physical or mathematical equations used for the solution of the problem and
highlight the partial and final answers. Be clear and organized.]
arrow_forward
Which clause of an SQL query displays the results in a specific sequence?
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Related Questions
- Can someone please help to solve all of the following problem showing all work and include a load chart. Thank you!arrow_forwardAutoSave STATICS - Protected View• Saved to this PC - O Search (Alt+Q) Off ERIKA JOY DAILEG EJ File Home Insert Draw Design Layout References Mailings Review View Help Acrobat O Comments E Share PROTECTED VIEW Be careful-files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View. Enable Editing Situation 9 - A 6-m long ladder weighing 600 N is shown in the Figure. It is required to determine the horizontal for P that must be exerted at point C to prevent the ladder from sliding. The coefficient of friction between the ladder and the surface at A and B is 0.20. 25. Determine the reaction at A. 26. Determine the reaction at B. 27. Determine the required force P. 4.5 m 1.5 m H=0.2 30° Page 5 of 5 671 words D. Focus 100% C ЕPIC GAMES ENG 7:24 pm w US 16/02/2022 IZarrow_forwardreful-files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View. Your Full Name Enable Editing ID: Sec: Q1: Which one is stronger; undeformed copper or copper that has been plastically deformed? Q2: Which one is stronger; unannealed copper or copper annealed (heated) at 750° C? Q3: Why? 101. O Focusarrow_forward
- REC M Gmail x4 BIT203 - Google x Gmail: Free. Pria x Dashboard BIT203-Study W x docs.google.com/document/d/1unVPvr_GhUFhrQuNdGICLqFle1ZB51_BICKagvoXoSU/edite BIT203-Study WorkShop * D e a Share File Edit View insert Format Tools Add-ons Help Lastedit was made minutes ngoby Seri ECT 150 - Nomal tet Times Ne 12 • BIU Discuss the tools and technologies for collaboration and social business that are available and how they provide value to an organization. Iarrow_forwardThe following tools / resources may be useful for you to complete the assignment:a. Chatgpt (You may use it to learn Matlab coding or any other computer language. An example is given here: https://shareg.pt/mXHGne9 ). Please take note that code generated by chatgpt can be directly copied and pasted.b. Matlabi) Useful cheat sheet (https://n.ethz.ch/~marcokre/download/ML-CheatSheet.pdf)ii) Getting started with Matlab (https://matlabacademy.mathworks.com/en/details/gettingstarted )iii) Getting 30-day Matlab trial license (https://www.mathworks.com/campaigns/products/trials.html ) iv) Polyfit (https://www.mathworks.com/help/matlab/ref/polyfit.html )v) Exponential Fit (https://www.mathworks.com/matlabcentral/answers/91159-how-do-i-fit-an-exponential-curve-to-my-data)c. PlotDigitizer (https://plotdigitizer.sourceforge.net/ ) or a free online app that does not requires installation (https://plotdigitizer.com/app )You may use your own engineering judgement to make any assumptions on any…arrow_forwardIn a hypothetical scenario respond to the following email to reasuure the owner and in an informative and professional way. Dear Project Manager- I am so excited to have broken ground on the new mixed use space. As I watch the underground utilities such as water, storm drain, and sewer get installed I find myself worrying about failures. What steps are you taking to ensure those systems will not have to be dug up and repaired later in the construction process? We cannot afford a delay of any kind. Could you please explain how you plan to prevent any delays and ensure that the systems are functional and leak free. The other concern that has come up that I would like to address now is the comfort of the office staff. Our current building is not comfortable. I am wondering why. We have the temperature appropriately set and it is easily maintained, but people still complain. What can we do to ensure they will be comfortable in the new building? A few months ago I asked one of our…arrow_forward
- Manufacturing processesarrow_forward(a) Summarize the following G and M code a. G41, G81, 691, G01, GOO b. M08, M30, M01, M06, M03 (b) Document three phases of writing a CNC program in the form of a block diagram. You don't have to write the actual CNC program.arrow_forwardDon't copy paste someone else answer if I get to know I'll report and downvote too do on your own and only handwritten with proper steps not that handwritten onlyarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY