
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
There is a csv file called Air_Quality.csv. It has 12 columns and 17,000 rows. One column titled 'Name' which has a various emissions listed in it. Another column titled 'Geo Place Name' has a list of cities. Write a code (in the most basic Python) which finds the two emissions called PM2.5-Attributable Respiratory Hospitalizations (Adults 20 Yrs and Older) and PM2.5-Attributable Respiratory Hospitalizations (Adults 40 Yrs and Older)within the column and prints out which city has the respiratory hospitalizations for both 20 years and older and 40 years and older based on a column called 'Data Value'
Below is a picture of a small chunk of the csv file.

Transcribed Image Text:1
2
3
4
5
CO
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
A
Unique ID
216498
216499
219969
219970
164876
164877
219971
219972
164878
164879
164880
164881
164882
164883
164884
164885
219973
219974
219975
219976
164930
164931
130355
130356
130357
130358
130359
130360
B
Indicator ID
C
Name
386 Ozone (03)
386 Ozone (03)
D
E
Measure Info
ppb
ppb
ppb
ppb
ppb
ppb
ppb
ppb
ppb
ppb
ppb
ppb
F
G
Geo Type Name Geo Join ID
CD
CD
Measure
Mean
Mean
386 Ozone (03)
Mean
386 Ozone (03)
Mean
383 Sulfur Dioxide (S Mean
383 C11558 oxide (S Mean
386 PM2.5-Attributable Respiratory Hospitalizations (Adults 20 Yrs and Older)
386 Ozone (03)
Mean
Borough
383 Sulfur Dioxide (S Mean
383 Sulfur Dioxide (S Mean
383 Sulfur Dioxide (S Mean
383 Sulfur Dioxide (S Mean
383 Sulfur Dioxide (S Mean
383 Sulfur Dioxide (S Mean
383 Sulfur Dioxide (S Mean
ppb
ppb
ppb
383 Sulfur Dioxide (S Mean
386 Ozone (03) Mean
386 Ozone (03)
ppb
Mean
ppb
386 Ozone (03)
Mean
ppb
386 Ozone (03)
Mean
ppb
383 Sulfur Dioxide (S Mean
ppb
ppb
383 Sulfur Dioxide (S Mean
639 PM2.5-Attributak Estimated Annua per 100,000 adu UHF42
639 PM2.5-Attributat Estimated Annua per 100,000 adu UHF42
639 PM2.5-Attributat Estimated Annua per 100,000 adu UHF42
639 PM2.5-Attributat Estimated Annua per 100,000 adu UHF42
639 PM2. Mail at Estimated Annua per 100,000 adu UHF42
639 PM2 5-AtMbutat Estimated Annu: per 100.000 adu UHF42
Borough
Borough
CD
CD
CD
CD
CD
CD
CD
CD
CD
CD
Borough
Borough
Borough
Borough
CD
CD
H
I
Geo Place Name Time Period
313 Coney Island (CI Summer 2013
313 Coney Island (C) Summer 2014
1 Bronx
Summer 2013
Summer 2014
1 Bronx
211 Morris Park and Winter 2008-09
212 Williamsbridge a Winter 2008-09
2 Brooklyn
2 Brooklyn
Summer 2009
Summer 2010
301 Greenpoint and Winter 2008-09
302 Fort Greene and Winter 2008-09
303 Bedford Stuyves Winter 2008-09
304 Bushwick (CD4) Winter 2008-09
305 East New York a Winter 2008-09
306 Park Slope and Winter 2008-09
307 Sunset Park (CD Winter 2008-09
308 Crown Heights a Winter 2008-09
2 Brooklyn
Summer 2011
2 Brooklyn
Summer 2012
2 Brooklyn
Summer 2013
2 Brooklyn
Summer 2014
206 Belmont and Ea: Winter 2009-10
207 Kingsbridge Heig Winter 2009-10
101 Kingsbridge - Ri 2005-2007
102 Northeast Bronx 2005-2007
103 Fordham - Bron> 2005-2007
104 Pelham - Throgs 2005-2007
105 Crotona -Tremor 2005-2007
106 High Bridge - Mc 2005-2007
J
Start Date
6/1/2013
6/1/2014
6/1/2013
6/1/2014
12/1/2008
12/1/2008
6/1/2009
6/1/2010
12/1/2008
12/1/2008
12/1/2008
12/1/2008
12/1/2008
12/1/2008
12/1/2008
12/1/2008
6/1/2011
6/1/2012
6/1/2013
6/1/2014
12/1/2009
12/1/2009
1/1/2005
1/1/2005
1/1/2005
1/1/2005
1/1/2005
1/1/2005
K
Data Value
34.64
33.22
31.25
31.15
5.89
5.75
26.27
33.83
4.33
4.41
4.73
4.71
3.78
3.94
3.78
4.79
33.19
33.89
31.13
31.29
5.3
7.49
117.7
77.3
67.3
73.6
65.8
84 8
L
Message
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 5 steps with 3 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- The second picture is the code. I want the output of the code to look like picture one. What part do I have to fix? THX!arrow_forwardA miniature robot designed to mimic the behavior of an ant is being tested to evaluate the robot’s ability to avoid a chemical repellant (the robot has a chemical sensor, and a control loop that makes the robot avoid moving in a direction that will result in the sensor detecting a chemical concentration above a certain limit). The x and y positions of the robot are measured with time, and the resulting data is saved to a file called data.txt which contains 3 columns: the time of the measurement (in seconds), the x position (in cm), and the y position (in cm). The first line of the file is a “header”: it has a single integer that specifies how many lines of data follow. Write a C++ program called ant.cpp that reads files of this type (i.e., your program should work with another, but similar, file!) and then does the following: it asks for an X and Y position, and then prints to screen the time at which the ant robot was closest to this position. For example, if we wish to know when the…arrow_forwardIn pythonarrow_forward
- only Voicemail.java files can have input added inbetween lines 4 and 7. not in the gery code sections.arrow_forwardCreate a class called StudentBirthYear. It should only have two members, both of them arrays. One of type string called Names. The second of type int called BirthYears. Now in your main class create a StudentBirthYear object. Make sure both arrays are of the size 13. Add thirteen different names and thirteen different birth years. Then display each name with its birth year using only 1 for loop. Only use a for loop, no other kind of loop.arrow_forwardImage 1 is my file and plz provide a screenshot of your code once u finished Thank you! I want to write a method: A method to compute the mean (average) of the data in an array takes one parameter, an array of integers returns the mean (average) of the data in the parameter arrayarrow_forward
- When I run this code it says there is an error. Can anyone help point out why I am getting an error for this code? from Artist import *from Artwork import *if __name__ == "__main__":mylist = input().split(" ")user_artist_name = str(mylist[0]+" "+mylist[1])user_birth_year = int(mylist[2])user_death_year = int(mylist[3])#mylist1 = mylist(4:-1)user_title = ""for i in mylist[4:-1]:user_title+=i+" "#user_title = str(mylist[4:-1])user_year_created = int(mylist[-1])user_artist = Artist(user_artist_name,user_birth_year,user_death_year)new_artwork = Artwork(user_title, user_year_created, user_artist)new_artwork.print_info() Here is the error message: Traceback (most recent call last): File "main.py", line 7, in <module> user_birth_year = int(mylist[2]) IndexError: list index out of rangearrow_forwardCreate a datafile that contains the first name, last name, gender, age, height, smoking preference, eye color and phone number. Add a variety of records to the file. A sample file looks like:  Write a program that opens the file and reads the records one by one. The program will skip any records where the gender preference is not a match. Of those records that match the gender preference, check to see if the age and height are between the maximum and minum preferences. Then check to see if the smoking preference and eye color are also a match. If at least 3 of the remaining fields match, consider the record a partial match, and print it in the report. If all 4 of the remaining fields match, the record is a perfect match and print it in the report with an asterisk next to it. At the end of the program, close the file and report how many total records there were of the specified gender, how many were a partial match, and how many were a perfect match.arrow_forwardSuppose you have a file Monster.txt that lists the Monster Energy Drinks the company offers, on one line and the price for a case of 24, with the customer ratings on a scale of 1-5 on the second line. The following shows the first few lines of the file: Monster Energy Nitro Super Dry Maximum Strength Drink 39.99 4.5 Monster Energy Ultra Red, Sugar Free Energy Drink 39.99 5 Red Bull Energy Drink, Zero 92.23 4.5 Red Bull Energy Drink, Coconut Berry 41.18 5 Monster Energy Juice, Pipeline Punch 34.98 5 Red Bull Energy Drink, Coconut Berry 41.18 5 The first line means the drink name is: Monster Energy Nitro Super Dry Maximum Strength and the second line means that a case of 24 cost $39.99 and it was rated 4.5/5. NOTE: WE DO NOT KNOW HOW MANY LINES THERE ARE IN THE FILE. Write the C++ program (with comments) that reads the data from the file, lists only those drinks rated 5 stars, and indicates if the five star drink comes with a free six pack or not.The customer gets a free six…arrow_forward
- Write a program which should handle books information for a book shop. It should be able to handle atleast 100 records. Your program should store following information against a book. Book Id (you may use index number as book ID) Book Code Book Name Author Name Publish Date Price No of copies in hand No of Copies sold Initialize 10 Books and initialize remaining with 0 and spaces. Create a menu, as given below, which should use above information to perform selected action from the given menu on the screen Add book (One book will be added. User will enter book id i.e. index number Record will be placed if code at that index is 0) Display book (Display Books in tabular format with nonzero codes only) Delete book (Place an empty record with 0 code and spaces at the selected index) Search book Sale book (First locate the book Id and check if code is not 0 then update No of Copies in hand and No of Copies sold accordingly) Exit Your assignment will be evaluated on the following basis:…arrow_forwardSTEP 1: Begin work within your Jupyter Notebook by importing the following modules: import numpy as np import pandas as pd from matplotlib import pyplot as plt import re Jupyter Notebooks Q1. Within your Jupyter Notebook, write the code for a Python function called def parseWeatherByYear(year) : This function will parse an html page containing weather for an entire year of data for the city of Toronto. The html pages containing weather data can be downloaded from: https://www.extremeweatherwatch.com/cities/toronto/year-2023 The file to parse for this lab however can be downloaded here: https://matrix.senecacollege.ca/~danny.abesdris/prg550.232/labs/lab6/torontoWeather.2023.html The html file itself contains markers as where to begin parsing the data to extract. The 3 pieces of data that must be extracted consist of the high and low temperatures (in degrees Celsius) as well as the amount of precipitation (in cm) for every day so far in the current year (2023). A series…arrow_forwardThe following sample file called grades.txt contains grades for several students in an imaginary class. Each line of this file stores a student's name followed by their exam scores. The number of scores might be different for each student. abdul 10 15 20 30 40erica 23 16 19 22haroon 8 22 17 14 32 17 24 21 2 9 11 17omar 12 28 21 45 26 10chengjie 14 32 25 16 89alex 15 22 11 35 36 7 9bryan 34 56 11 29 6laxman 24 23 9 45 27 Now, consider the following code. f = open("grades.txt", "r") for aline in f: items = aline.split() # choose your option for this part f.close() Which option prints out only the names of each student in stored in grades.txt? Question 11 options: print(items[0:]) print(items[0]) print(items[0][0])arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education