Unit 6 Lesson 13 Hackathon

  1. I have built an app using the Baseball Teams Data Set.
  2. I want to pull from that data set just the team with a year of 1901 (first 15 teams).
  3. I am having trouble filtering this list and setting to For Loop correctly.
  4. The team Logos are not showing
  5. The fields are not updating either

Can someone tell me what is wrong with my code?https://studio.code.org/projects/applab/7tIAtJUm-gTnyJosKc61Pxd26CbEwBYmt-mdf7cifaw

There are several problems:

  1. There is no column name called “Team Icon” in the Baseball Teams dataset.
  2. On lines 30-31 you must use the correct format of for loop and conditional
    for (var i = 0; i < yearList.length; i++) {
    if (yearList[i] == 1901) { …
  3. Use the variable names consistently. You are using filterdTeamList on line 42. There is no such list.

I hope this helps

this is great. Would you be willing to help me more? look at the code again…

  1. I added a column to the Baseball Teams data set. called Team Icon. The content of that column has a URL link to the Team Logo.
  2. What is going wrong in the Function called Filter?
  3. Something is still wrong with the Function called updateScreen:

40 //I want to use only 15 teams from the data set
41 // the areas needing updated are Year, Rank Baseball Team Name
42 //and Team Home Field
43 //what am i doing wrong on line 45???
44 function updateScreen(){
45 var index = randomNumber(0, filteredTeamNameList.length-1);

I cannot see your dataset when I remix. You will need to post your new dataset csv file here. Also, you have a missing brace in your filter function and your conditional is still incorrect. See the correction I made previously. Line 15 should be changed to filteredTeamNameList = ;

Hackathon

Can you help us with determine why the pictures in the protein category don’ t appear. Is it because the image is blocked by our school? The others seem to output correctly. Image #37 and #10 from the dataset Cereal Nutrition dataset.
Thanks,
Kevin P

Unit 6 Lesson 13 Baseball Teams.csv (136.2 KB)

I have included the CSV file for Baseball Teams. I added the column for the team logos (pictures) for the first 15 teams. Keep in mind I am not an expert coding machine; in fact, just the opposite. This means I have no idea what I am doing and why some code works and the others do not. I am certain my updateScreen function is not correctly coded, as well as my filter function.

What I am trying to do is to pull just the first 15 teams from the list. In the data set, I added a column and I put a URL to the team logos (pictures) so when the screen updates we can see the team logo. These URLs are in the column named Team Icon.

So, when I press the Get MLB Team button, I want the team logo to appear, the year 1901 (first 15 teams in the list), team ranking, the name of the team and the baseball field where they play. Hopefully my code and design features (attached) will help you help me. And I thank you for any help you can provide.

Unit 6 Lesson 13 My Code and Design Features_MLB Teams.docx (140.5 KB)

Here is the CSV file, and a copy of my actual code, just in case.

Unit 6 Lesson 13 Baseball Teams.csv (136 KB)

Unit 6 Lesson 13 My Code and Design Features_MLB Teams.docx (141 KB)

I can’t see the picture either.

Go to the table. Copy the link and paste it into the URL. Can you see the picture? It might be that the picture was removed…

You could look for a different picture and replace the url in the table with the new url. Every student will have to do this for his/her app.

I plugged in the link on the url and I got an error message. I think the problem is the picture.

No results found for https://lh3.googleusercontent.com/proxy/_Axx0GJhoEBLl3aPn8htV92L3cv4FYE3UfPR48x-Ju9YT-9qaZ1F6mhQxTNecoKHkKoj4dxdmaA5dRysCGTo4MqYyT_Qs48kfgb1q0MucoeM4N9e8_gUpfN6F3sbbHj6VnB3hDE4-Q .