Lesson 2 Data Types Link to digital lesson www.ien.edu.sa Numerical Data and Categorical Data Now that we've learned what data is, let's look at its different types. Data can take different forms, for example, it may be the number of visitors to an event, the duration of that visit, and so on. In a research study, there are two main types of data: numerical data and categorical data. Numerical Data Numerical data consists of measurable facts, for example, the number of events that take place in a city is numerical data. Numerical data can be discrete or continuous. Discrete Data Discrete data represents countable items and can only take certain values, e.g., the number of students in a class. Continuous Data Continuous data represents data measurement and can take any value, e.g., a person's height. Numerical .3 50 2 2 123 6.25 -10 0003756 Figure 2.8: Numerical data Categorical Data Categorical data is a data type that is not quantitative. Categorical data refers to a data type that can be stored and identified based on the names or labels given to them. Categorical data can be nominal or ordinal. Nominal Data Nominal data is defined as data that is used for naming or labeling variables, without any quantitative value and without placing it in some sort of order. For example, the results of a test could be classified nominally as a "pass" or "fail". Categorical pass fail A B C Figure 2.9: Categorical data Ordinal Data Ordinal data is a type of categorical data with an order. Ordinal data groups data according to some sort of ranking system. For example, test results could be grouped in descending order by .grade: A, B, C, D and Eزارة التعليم Ministry of Education 2024-1446 57

2: Data Types

Numerical Data and Categorical Data

Numerical Data

Categorical Data

Graphical, Video and Audio Data Types Although the data is usually in alphanumeric form (text, numbers and symbols), it may consist of images, audio clips, or video clips. Here are some other types of data: Graphical Data Graphical data consists of charts, graphs, etc., for example, a set of pictures of the attractions of a particular region, or a graph of the number of visitors to a tourist site in Saudi Arabia. Graphical data 晶 Image and Video Data A digital image can be a photo or illustration represented by pixels or vectors. Video data consists of a series of moving images and audio, such as a TV advertisement for a tourism campaign, a video about the Boulevard in Saudi Arabia, a video streaming from the KSA Qur'an TV channel during the Hajj, etc. Audio Data Audio data consists of different sounds and sound effects, such as informational audio recordings of different museums and tourist places in the Kindom of Saudi Arabia. Figure 2.10: Graphical data Video data Figure 2.11: Video data Audio data Static and Dynamic Data Sometimes data changes after being recorded and sometimes it doesn't. Due to this, data can be characterized as static or dynamic: Static Data Static data is data that does not change after being recorded. An example of static data is a magazine with tourist sites in Saudi Arabia. Once the magazine has been printed, the information in it cannot be changed. Dynamic Data Dynamic data is data that may change after it is recorded and has to be continually updated. An example of dynamic ⚫data can be a website with tourist places in Saudi Arabia, as it can be updated when needed. وزارة التعليم Ministry of Education 58 2024-1446 0 Saudi Central B Figure 2.12: Audio data Example of dynamic data. NEWS SUPERVISION ECONOMIC REPORTS FINANCE AND EXCHANGE DATE SERVICES CURRENCY ABOUT Sat Conan And Exchange any Currency Finance And Exchange Rate Monetary Operations ALOMAIN 1010 Figure 2.13: Saudi Central Bank website

2: Data Types

Graphical, Video and Audio Data Types

Static and Dynamic Data

Data Coding The data obtained from experiments or through surveys is in its raw form and often requires coding. This process allows people to organize and arrange data in a specific way, and by using different codes such as numbers, letters, or short words, the meanings and contexts of sentences, phrases or entire paragraphs can be described. Let's look at some examples from everyday life where codes are used to represent data. Airport Codes The International Air Transport Association (IATA) has set a three-letter code defining many airports and metropolitan areas around the world. We can search for air tickets online using this code. Also, this code is displayed on baggage tags attached at airport check-in desks, to keep our luggage from getting lost. Currency Codes Every country around the world has its own currency, and currency symbols are used instead of the currency name as customary abbreviations for financial transactions. Table 2.2: Airport codes Code Airport DMM King Fahd International Airport JED King Abdulaziz International Airport RUH King Khaled International Airport Table 2.3: Currency codes Currency USD Buys Notes 33.83 B Code Currency SAR Saudi riyal EUR 35.49 USD US dollar EUR Euro GBP 51.38 Figure 2.14: Currency symbols Table 2.4: Advantages of data coding Data entry is faster It is easier to type RUH than King Khaled International Airport. Takes up less space Speeds up data searches It is difficult to write the full name of the country on a car number plate or on the back of public transportation vehicles such as taxis and buses, but with international vehicle registration codes, this is no longer a problem. Each region has its own code. This code is used to search for an address by area code, street number, and building, and is used by the Post Office to facilitate mail distribution. وزارة التعليم Ministry of Education 2024-1446 59

2: Data Types

Data Coding

Advantages of data coding

Table 2.5: Disadvantages of data coding Ambiguous meaning of the data. Coding can be difficult to understand. The codes used may be exhausted. It can be difficult to distinguish between similar codes. The code can be difficult to interpret or its meaning difficult to remember.. The number of items to be coded may be so large that a set of letters is not enough to code them, for example when coding consumer products in stores. In this case, numbers and letters are combined or long numbers are used, but this complicates the coding process. Barcodes We see barcodes all around us on a daily basis, for example on electronic tickets, products in supermarkets, etc. A barcode is a label with thin, black lines across it, along with a list of different numbers. These are used to help organize and index information or tag product prices. The first six digits identify the company that manufactures or sells the product. 9786035111393 Figure 2.15: Example of barcode structure The next six digits describe the product. The check digit checks that all other digits are being read correctly by the scanner. 899848968 RE620 ليم ISBN (International Standard Book Number) On the back of most books (e.g. a guidebook) and above the barcode is a number called the ISBN. This unique number is used by publishers, libraries, and bookstores to identify book titles and editions. ISBN numbers are 13 digits long. Each ISBN consists of 5 consecutive groups of numbers. Ministry of Education 60 2024-1446

2: Data Types

Disadvantages of data coding

Barcodes

ISBN (International Standard Book Number)

Table 2.6: 13-digit ISBN structure Prefix number Registration group number Registrant number Publication number Check digit This consists of 3 digits, and is either 978 or 979. For books published in Saudi Arabia, the prefix number is 978. This consists of 1 to 5 digits, and is used as an identifier for the particular country, geographical region, or language area participating in the ISBN system. For books published in Saudi Arabia, the registration group number is 603 or 9960. This consists of up to 7 digits, and it is used to identify the particular publisher or imprint. This consists of up to 6 digits, and it is used to identify the particular edition and format of a specific title. This consists of a single digit, it is always placed at the end of the ISBN, and it is used to validate the rest of the numbers. Example Here is an example of an ISBN code, where each item denotes a specific piece of information about the guide book. Digital skills is a series of Computing and Information chology books that adopt an innovative, project-based pachets learn computing concepts and develop their information and Communications Technology skills, through unique activities and fun real-world scenarios Name Registration Prefix number group number Registrant number Publication number School ISBN: 978 603 508 929 6- 9786035 0892961> Figure 2.16: Example of 13-digit ISBN Check digit QR Codes The Quick Response Code is the second generation of the barcode, which consists of black boxes, and contains more information. It may refer to electronic content such as websites, videos or digital files, and this code can be read using smartphone cameras. وزارة التعليم Ministry of Education 2024-1446 Figure 2.17: Example of QR code This QR code points to the website in the link https://visitsaudi.com 61

2: Data Types

13-digit ISBN structure

Here is an example of an ISBN code, where each item denotes a specific piece of information about the guide book.

QR Codes

Exercises 1 Read the sentences and tick ✓ True or False. 1. Categorical data is a data type that is quantitative. 2. Ordinal data is defined as data that is used for naming or labeling variables. 3. Discrete data represents countable items and can only take certain values. 4. Airport codes and currency symbols are examples of data coding. 5. Static data is data that may change after it is recorded and has to be continually updated. 6. Dynamic data is data that does not change after being recorded. 7. Data coding is often performed on data in its raw form, obtained from experiments or through surveys. 8. An ISBN consists of 10 consecutive groups of numbers. 9. A barcode is a label with thin, black lines across it, along with a list of different numbers. 10. The Quick Response Code consists of black boxes that contain information. وزارة التعليم Ministry of Education 62 2024-1446 True False

2: Data Types

Read the sentences and tick True or False: Categorical data is a data type that is quantitative.

حل Read the sentences and tick True or False: Categorical data is a data type that is quantitative.

2 Briefly explain what static and dynamic data are. 3 Give some examples of products that have QR codes or barcodes on them. 4 Briefly explain what data coding is. وزارة التعليم Ministry of Education 2024-1446 63

2: Data Types

Briefly explain what Static and Dynamic data are.

حل Briefly explain what Static and Dynamic data are.

Give some examples of products that have QR codes or Barcodes οn them.

حل Give some examples of products that have QR codes or Barcodes οn them.

Briefly explain what data coding is.

حل Briefly explain what data coding is.

5 Find a website that creates free QR codes and generate the QR codes for the home page and a specific web page of a website of your choice. Do you notice the differences in the black boxes of each QR code? 6 The International Organization for Standardization maintains the official list of country codes through ISO 3166 standard. Find the two-letter country codes of the GCC countries. Can you give examples of usage of these codes? 7 Find the ISBN barcode of this book. Can you find the numbers that identify the country and the publisher? وزارة التعليم Ministry of Education 64 2024-1446

2: Data Types

Find a website that creates free QR codes and generate the QR codes for the home page and a specific web page of a website of your choice. Do you notice the differences in the black boxes of

حل Find a website that creates free QR codes and generate the QR codes for the home page and a specific web page of a website of your choice. Do you notice the differences in the black boxes of

Can you give examples of usage of these codes?

حل Can you give examples of usage of these codes?

Find the ISBN barcode of this book. Can you identify the country’s and the publisher’s numbers?

حل Find the ISBN barcode of this book. Can you identify the country’s and the publisher’s numbers?