Presentation is loading. Please wait.

Presentation is loading. Please wait.

AP CSP: Lossy Compression and File Formats

Similar presentations


Presentation on theme: "AP CSP: Lossy Compression and File Formats"— Presentation transcript:

1 AP CSP: Lossy Compression and File Formats

2 Warm Up: Go to the Lossy Text Compression App
Think about these questions: What is happening in the app? Should this “count” as text compression? Why or why not?

3 Lossy Text Compression App:
The text in the app was reduced by keeping the first letter of every word and throwing away all vowels. Is this really text compression? The amount of text was reduced and people can understand for the most part However, the work of reconstructing was left to human intelligence and intuition.

4 Lossy vs. Lossless Compression:
Data is compressed and can be converted back into its original form. No data loss! Lossy Compression: Compression scheme which useless or less-than-totally necessary information is thrown out in order to reduce the size of the data. The compression app we looked at today compressed the text and for the most part you could probably make out what the text was supposed to say. Not Perfect though. If you saw the word “fd” ” it could be “food”, “feed”, “feud”, or “fad. By reading in context, you may know the correct interpretation but there is no real way to know what the original word. The original word is lost.

5 Text Compression: Lossy compression schemes usually take advantage of the fact that a human is supposed to interpret the data at the other end, and human brains are good at filling the gaps when information is missing

6 File Type Compression Schemes:
You will do some rapid research and report on some of the most common file formats. Use the web to accomplish this.

7 Wrap-Up: There was a question at the bottom of the worksheet that asked if you had ever heard of any other file type that you were curious about. What were those? All of these are specialized file formats in which some person or group decided how to organize (and in some cases, compress) the bits that make up the file type. There is nothing magical about them.

8 Wrap-Up Continued: The file extension you often see on a file (for example: myPhoto.jpg) is really just an indicator to the computer of how the underlying bits are organized, so the computer can interpret them. If you change the name of the file to myPhoto.gif, which does not magically change the underlying bits; all you’ve done is confuse the computer. It won’t be able to open the file because it will attempt to interpret the file as a GIF when really the bits are in JPG format.

9 Changing File Extensions:
Different file formats have their own way of representing data in binary. The extension at the end of a file let the computer know how to interpret the bits within the data. Different file types interpret bits in data differently. The first 8 bits in a PDF may describe how many pages the document is while the first 8 bits in a BMP file represent the width of an image.(EXAMPLE) If you were to change a PDF file’s extension to BMP the computer would interpret the bits in the PDF file as if they were BMP (image) file. Textbook.pdf - Textbook.bmp When now trying to open the file, your computer will try to open up the original PDF file using the protocol for BMP It’ll interpret the first 8 bits of the file as the width of an image when the first 8 bits of a PDF file aren’t used to describe width or even an image. The results would be messy or the file just wouldn’t open.

10 Transition to Data Stories:
Now instead of thinking how data is stored or compressed or represented as bits including the file’s metadata, we are going to transition to figure out how we can learn from data and what we can do with data collected. You will learn how to tell stories from data. You will learn what types of innovations we can create from data collected.

11 Pop Quiz: Take Left vs Right Brained Quiz
Skip through ads Discuss results with people near you Think about quizzes/surveys you’ve taken like this before (silly internet quizzes). Think about all the data collected by from these quizzes/surveys These sites collect data from all the users for a long amount of time What can that data tell us?

12 Data: “People say there is data all around us”. What do you think that means? Brainstorm as many examples of data as you can think of.” Who is generating the data? Where is the data being stored or saved? Who owns it?

13 Data Facts: People generate data through their own actions, though sometimes they might not be aware of it. Online Surveys , Netflix History, Logging into a School Computer, etc. In most cases Data is stored somewhere else, and by someone else. Tons of data is being gathered by individuals and organizations, which makes the data possible to compute with/on. Some knowledge could be extracted from that data Google can tracked the most popular searched terms on the internet Amazon can recommend products to customers based on their purchase history

14 Data Stories: Data about people and how they act in the real world is hard to capture without just asking them. So that’s what a lot of tools online do. They try to capture people’s responses to things because the data, in aggregate, might contain useful information that could be extracted. That “dumb” online quiz you took is an example These quizzes ask people to reveal things about themselves, their preferences, likes and dislikes (data). Although silly, some interesting things about people could probably be discovered if the data were analyzed

15 Google Trends Activity:
Today we are going to work with a tool called Google Trends Trends visualizes data taken from Google search histories all around the world from the past several years. Data trends are used in a variety of fields in order to understand what topics are most popular across the country and world. Medical professionals may use this information to trace an outbreak of the flu. Businesses, media outlets, and advertisers keep a close eye on trending topics in order to understand how potential customers are thinking. Tools like Google Trends allow us to visualize data and enables us to identify, understand, and predict patterns in culture and society at large.

16 Google Trends Activity:
Explore Google Trends to learn how it works and see what you can infer by looking at the trend in data You should find a trend or set of trends they think is particularly interesting or personally relevant and try to tell a story from the data they see a current event / social movement / hashtag / meme your favorite hobby / movie / song / book / celebrity popular apps / businesses / products / websites Complete the activity worksheet What can you honestly conclude? Ex.1 Golden State Warriors, Cleveland Cavaliers ; Ex. 2

17 Share what you found: You will need to use the link below to answer some of the problems in the activity Explain the terms you searched for and what you concluded from those searches Does your story (conclusion) make sense according to the data Is the story supported by the chart? Are there other ways to interpret the chart? Are there additional terms you’d also like to see shown on the chart?

18 Power of Visualization Tools:
It’s exciting to be able to look at so much data in such a concise way (visualization tool). As we start thinking more about how we use data, however, we’ll need to Make sure that the assumptions we’re making about our data are correct. Understand the difference between describing what the data shows and describing why it might be that way Review your answers on the activity guide and revise your stories as needed. This is going to be collected next class


Download ppt "AP CSP: Lossy Compression and File Formats"

Similar presentations


Ads by Google