fbpx
Home Blog Page 1417

Learning With: ‘One Dead in Synagogue Shooting Near San Diego; Officials Call It Hate Crime’

0
Learning With: ‘One Dead in Synagogue Shooting Near San Diego; Officials Call It Hate Crime’

5. What other acts of hatred does the author of the manifesto claim to have committed?

Finally, tell us more about what you think:

The author of the related Opinion essay “Mass Shootings Have Become a Sickening Meme” refers to a message posted before the shootings by an 8chan user identifying himself by the same name as the suspect in the attack. The message is “strikingly similar to the 8chan post left by the man accused of shooting up a mosque in New Zealand before he killed 49 worshipers in March.” He continues:

As in New Zealand, the suspected Poway shooter appeared eager to win approval for his act of violence. In his post, the synagogue shooter cites the 8chan message board for indoctrinating him, urging others to take similar action. His manifesto not only refers to the online postings of the New Zealand shooting and of the man who killed 11 people at a Pittsburgh synagogue in October, but seems almost cribbed from past white nationalist rants.

Do you think 8chan has a responsibility to police the content posted by its users? Why or why not? Do you think the 8chan community has any such similar responsibility? Explain.

The Opinion essay also states:

Both white nationalist violence and mass shootings have long histories in America, yet the copycat nature of the recent sprees feels different — specifically, in the way they hail a very niche, very targeted audience, attempting to delight fellow extremists. As much as they’re meant to terrorize, these attacks seem designed to embolden the most unstable members of their community. Though these men are lone gunmen, they’re not alone — like the New Zealand attack, the Poway shooter’s actions were cheered on by an online audience of anonymous trolls. One of the first responses to the 8chan post suspected to be from the gunman was a user imploring, “get a high score.”

Perhaps most disturbing is the subtle iteration of the shooters’ posts. As is common on online message boards, they vie for eyeballs by attempting to outdo previous posts, constantly pushing the line of acceptable behavior to new extremes.

That’s not to suggest that the 8chan or message board culture is solely to blame for such horrific acts of violence. The medium by which a shooter is radicalized is only one component of a long path to violence, and mass shootings and anti-Semitic violence have a long, dark legacy.

And yet, it’s becoming increasingly difficult to ignore how online hatred and message board screeds are bleeding into the physical world — and how social platforms can act as an accelerant for terroristic behavior. The internet, it seems, has imprinted itself on modern hate crimes, giving its most unstable residents a theater for unspeakable acts — and an amplification system for an ideology of white supremacy that only recently was relegated to the shadows.

Do you think online communities have the power to “embolden” people to do things they otherwise wouldn’t do, whether it’s committing murder or anything else? Explain.

What, if anything, should be done about online communities devoted to or frequented by users who harbor extremist beliefs?

Word + Quiz: abrade

0
Word + Quiz: abrade

1. rub hard or scrub

2. wear away

_________

The word abrade has appeared in four articles on NYTimes.com in the past year, including on April 25 in “An Amputee’s Toughest Challenge Yet: Her 140-Mile Run in the Desert” by Jeré Longman:

On the bottom of her running blade in the Sahara, Palmiero-Winters wore a scrap of Goodyear tire, three and a half inches wide, for traction. The prosthesis included an air chamber to cool its outer and inner layers. Then the leg was coated in a chalky color with paint used on the roofs of houses and buildings in the desert.

It was critical to keep sand from getting between Palmiero-Winters’s skin and the silicon liner of her prosthesis, said Schaffer, who fashioned the prosthetic leg. The rubbing would mercilessly abrade her skin, he said, not unlike trying to run a marathon in a bathing suit full of sand.

_________

Learning With: ‘Pennsylvania Honors the Snot Otter. It’s Not Even the Strangest State Animal.’

0
Learning With: ‘Pennsylvania Honors the Snot Otter. It’s Not Even the Strangest State Animal.’

Before reading the article:

Most states in the United States and countries around the world have an animal that symbolizes their state or country.

Off the top of your head, do you know any of your official state or national animals? If not, take a look at this list of state animals in the United States or this list of national animals from around the world.

Have you ever seen one of these animals in the wild where you live? What do you know about their habitats, diets or other characteristics?

Why do you think this animal was chosen to represent your state or country? If you were to choose an animal emblem, would you choose the same one? Why or why not? If not, what animal would you choose instead and why?

Now, read the article “Pennsylvania Honors the Snot Otter. It’s Not Even the Strangest State Animal.” Then, answer the following questions:

1. Why did Pennsylvania’s governor think the eastern hellbender salamander, or “snot otter,” was worth recognizing as the official state amphibian?

2. For what reasons might states honor official animals?

3. Why did Virginia recognize the Virginia big-eared bat in 2005? What impact has this recognition had on the species since then?

4. The American paddlefish is Missouri’s official state aquatic animal. Why is the fish at risk in the state?

5. Why does the California gull hold a special place in the hearts of Utah residents?

6. What role did students play in the naming of the tarantula hawk as New Mexico’s state insect? Why did they decide on this species?

7. What significance does the common collared lizard hold in the state of Oklahoma?

Finally, tell us more about what you think:

The article notes that students often play a big role in the designation of official state animals. If you were to choose a new animal to represent your state or country, which would you choose and why?

Do a little research. Which animals in your area are in need of protection? What dangers are they facing and how might recognizing them help the species?

Which animals are important to your area? Which ones hold a symbolic place in the hearts of your state’s or country’s residents? Which have played an important part in your region’s culture or history?

After you’ve researched and decided on an animal to represent the place you live, write a short pitch that you might give to legislators to convince them to designate that species as your official state or national animal. Be sure to explain why this animal is representative of your region or why honoring it could help protect it for generations to come.

HOW HAS TECHNOLOGY CHANGED EDUCATION?

0
HOW HAS TECHNOLOGY CHANGED EDUCATION?

Technology has impacted almost every aspect of life today, and education is no exception. Or is it? In some ways, education seems much the same as it has been for many years. A 14th century illustration by Laurentius de Voltolina depicts a university lecture in medieval Italy. The scene is easily recognizable because of its parallels to the modern day. The teacher lectures from a podium at the front of the room while the students sit in rows and listen. Some of the students have books open in front of them and appear to be following along. A few look bored. Some are talking to their neighbors. One appears to be sleeping. Classrooms today do not look much different, though you might find modern students looking at their laptops, tablets, or smart phones instead of books (though probably open to Facebook). A cynic would say that technology has done nothing to change education.

However, in many ways, technology has profoundly changed education. For one, technology has greatly expanded access to education. In medieval times, books were rare and only an elite few had access to educational opportunities. Individuals had to travel to centers of learning to get an education. Today, massive amounts of information (books, audio, images, videos) are available at one’s fingertips through the Internet, and opportunities for formal learning are available online worldwide through the Khan Academy, MOOCs, podcasts, traditional online degree programs, and more. Access to learning opportunities today is unprecedented in scope thanks to technology.

Opportunities for communication and collaboration have also been expanded by technology. Traditionally, classrooms have been relatively isolated, and collaboration has been limited to other students in the same classroom or building. Today, technology enables forms of communication and collaboration undreamt of in the past. Students in a classroom in the rural U.S., for example, can learn about the Arctic by following the expedition of a team of scientists in the region, read scientists’ blog posting, view photos, e-mail questions to the scientists, and even talk live with the scientists via a videoconference. Students can share what they are learning with students in other classrooms in other states who are tracking the same expedition. Students can collaborate on group projects using technology-based tools such as wikis and Google docs. The walls of the classrooms are no longer a barrier as technology enables new ways of learning, communicating, and working collaboratively.

Technology has also begun to change the roles of teachers and learners. In the traditional classroom, such as what we see depicted in de Voltolina’s illustration, the teacher is the primary source of information, and the learners passively receive it. This model of the teacher as the “sage on the stage” has been in education for a long time, and it is still very much in evidence today. However, because of the access to information and educational opportunity that technology has enabled, in many classrooms today we see the teacher’s role shifting to the “guide on the side” as students take more responsibility for their own learning using technology to gather relevant information. Schools and universities across the country are beginning to redesign learning spaces to enable this new model of education, foster more interaction and small group work, and use technology as an enabler.

Technology is a powerful tool that can support and transform education in many ways, from making it easier for teachers to create instructional materials to enabling new ways for people to learn and work together. With the worldwide reach of the Internet and the ubiquity of smart devices that can connect to it, a new age of anytime anywhere education is dawning. It will be up to instructional designers and educational technologies to make the most of the opportunities provided by technology to change education so that effective and efficient education is available to everyone everywhere.

You can help shape the influence of technology in education with an Online Master of Science in Education in Learning Design and Technology from Purdue University Online. This accredited program offers studies in exciting new technologies that are shaping education and offers students the opportunity to take part in the future of innovation.

Author : Felipe Gomez
Degree : Masters
Major : Marketing and Advertising
Country : United States
Language : English

View Resume

Como viajar en el tiempo? es Posible?

0
Como viajar en el tiempo? es Posible?

Viajar en el tiempo ha sido una de las fantasías del ser humano por siglos. Es una tendencia popular en películas y ficción. Ha inspirado novelas desde El cuento de Navidad de Charles Dickens, hasta la obra maestra El Planeta de los Simios de Charlton Heston. Con el estreno de Interstellar –no hay spoilers– vamos a fantasear acerca del tema mucho más.

Pero, ¿qué es lo más fascinante de todo esto? Que probablemente es posible.

Lo casi imposible

Empecemos con las malas noticias. Probablemente no podamos viajar en el tiempo para ver a los egipcios construir las pirámides. En el siglo pasado, los científicos construyeron un sinnúmero de teorías que sugerían que era posible dar un salto al futuro; viajar al pasado, sin embargo, es mucho más complicado. Pero no necesariamente imposible.

Albert Einstein sentó las bases para muchas de las teorías científicas actuales en la investigación de los viajes en el tiempo. Por supuesto, científicos como Galileo y Poincaré que llegaron después también ayudaron, pero las teorías de Einstein sobre la relatividad (general y especial) cambiaron drásticamente nuestro entendimiento del tiempo y el espacio. Y es a causa de estas teorías que creemos que viajar en el tiempo es posible.

Una de las opciones para esto sería un agujero de gusano, también conocido como el puente Einstein-Rosen. Junto con el físico Nathan Rosen, Einstein sugirió la existencia de los agujeros de gusano en 1935, y aunque no se ha descubierto alguno, muchos científicos han contribuidocon sus propias teorías acerca de cómo podrían funcionar. Stephen Hawking y Kip Thorne son, probablemente, los más conocidos. Thorne, físico teórico en CalTech, incluso ayudó a Christopher Nolan con la ciencia detrás de la película Interstellar.

Entonces, asumamos que los agujeros de gusano existen. A finales de los años 80, Thorne dijo que un agujero de gusano se podía convertir en una máquina del tiempo. Según la teoría general de la relatividad de Einstein, el agujero podría actuar como un puente a través del espacio-tiempo conectando dos puntos distantes con un atajo.

La teoría dice que ciertos tipos de agujeros de gusano permiten viajar en el tiempo en ambas direcciones, si pudiéramos acelerar una de sus bocas a (casi) la velocidad de la luz y, después, revertir el proceso para colocarlo en su posición original. Mientras tanto, la otra boca quedaría estática. Como resultado, la boca que se mueve envejecería más lento que la boca estática gracias al efecto de dilatación del tiempo – más de esto en un segundo.

Sin embargo, en el uso de este método hay bastantes limitantes. La principal es el simple hecho de que necesitamos un método para crear agujeros de gusano, una vez creado, este solo nos permitirá viajar al pasado hasta el punto en el que fue creado. Así que, definitivamente, nunca seremos espectadores de la construcción de las Grandes Pirámides en Egipto.

Otra de las limitantes es que necesitaríamos una manera de mover una de las bocas del agujero de gusano a casi la velocidad de la luz. En un estudiode 1988, Thorne y sus colegas asumieron que “los seres avanzados producirían este movimiento tirando de la boca derecha gravitatoriamente o por vía electrónica”. Nosotros no podemos hacer eso, todavía.

Lo que sí podemos hacer es viajar al futuro –pero solo un poco.

Lo que es casi posible

En años recientes, se han comprobando algunos aspectos de las teorías imaginarias de Einstein. La última y quizá la más emocionante, es el efecto, antes mencionado, llamado dilatación del tiempo. Aunque hemos basado la tecnología en la teoría por décadas, un experimento de este año finalmente probó que la dilatación del tiempo es un fenómeno completamente real.

La dilatación del tiempo básicamente se refiere a la idea de que el tiempo pasa más despacio para un reloj que se mueve que para uno estático. La fuerza de gravedad también afecta la diferencia en el tiempo transcurrido. Entre más gravedad y más velocidad, habrá mayor diferencia en el tiempo. Los agujeros negros, como el de Interstellar, por ejemplo, producirían una cantidad masiva de dilatación del tiempo, debido a su fuerza gravitacional extrema.

Gracias a los programas espaciales, ya hemos lidiado con este efecto por muchos años. Esta es la razón por la que el sonido del tic-tac de los relojes en la Estación Espacial Internacional se escucha un poco más lento que el de los que están en la Tierra. Considerando que la estación se mueve más rápido y no está afectada por la gravedad, el tiempo se mueve más rápido. Es también la razón por la que los relojes en la Tierra no son precisos, dado que el efecto de la dilatación del tiempo significa que este se mueve más despacio entre más cerca te encuentres de la superficie terrestre.

Un mejor ejemplo de este efecto tiene que ver con los GPS satelitales. El chip GPS en tu móvil funciona porque existen 24 satélites alrededor del planeta que triangulan tu ubicación basándose en el tiempo que tarda la información en viajar hacia y desde el dispositivo.

Sin embargo, al construir el sistema, los científicos aprendieron que los relojes atómicos en los satélites caminan un poco más rápido, ya que se están moviendo a 14.484 km/hr en órbita. Para ser más específico, pierden 8 microsegundos al día. Parece ser imperceptible, pero es suficiente para errar con la ubicación. Por esta razón, la tecnología GPS hace ajustes en los relojes para compensar los efectos de dilatación del tiempo. La ecuación que usan es un poco complicada, pero si te interesa la puedes consultar aquí.

Las implicaciones de todo esto son enormes. ¿Qué pasaría si llevamos esto al extremo? Si tuviéramos una nave espacial que volara súper rápido, el tiempo pasaría más rápido para las personas en la Tierra. Podrías dar una vuelta por la galaxia y regresarías a la Tierra en el futuro. Es básicamente lo que pasa en El Planeta de los Simios. De hecho, el personaje que interpreta Charlton Heston es un viajero en el tiempo.

Lo que es definitivamente posible (pero un poco raro)

Las preguntas aún son, ¿podemos llevar esta teoría al extremo? ¿Es posible viajar al pasado también?

Como mencioné, no lo sabemos. Las teorías de Einstein para viajar en el tiempo afirman que es imposible viajar al pasado, pero siguen siendo teorías. Es posible que un descubrimiento en el futuro las confirme o revoque. En cuanto a los agujeros de gusano, en realidad no sabremos cómo funcionan hasta que lo probemos y, por el momento, no tenemos un método factible para construir un agujero de gusano en el espacio.

Por lo tanto, la manera más fácil de averiguarlo es buscando a los viajeros en el tiempo que caminan entre nosotros. ¡Y sin necesidad de un laboratorio! Y es, exactamente, lo que muchos científicos han estado haciendo. ( Spoiler: Aún no encuentran uno)

Sin embargo, si eres un curioso de los viajes en el tiempo, ve a verInterstellar. La ciencia detrás de la película puede sonar de fantasía, pero es fantástica.

Author : Felipe Gomez
Degree : Masters
Major : Marketing and Advertising
Country : United States
Language : English

View Resume

FutureLearn announces SEEK as new 50/50 shareholders alongside The Open University

0
FutureLearn announces SEEK as new 50/50 shareholders alongside The Open University

We’re delighted to announce a new shareholder today. SEEK, Australia’s top employment marketplace, is joining The Open University as 50/50 shareholders in FutureLearn. Our existing relationship with The Open University and its vision for the higher education sector has, and will continue to have, a huge impact on and benefit to FutureLearn.

This is big news for us but before we get into the details, we want to say thank you – you, our learners are incredibly important to us and we simply wouldn’t be the company we are today without you, so thank you. And now for those details…

SEEK is Australia’s top employment marketplace. The SEEK Group operates in almost 20 countries, with access to almost 200m jobseekers and almost one million hirers from organisations and recruitment agencies. You can watch a quick video about the group.

For FutureLearn, SEEK adds experience and expertise in the employment sector, a good fit for the education sector as more people look for a return on the time and money they invest in learning.

But there’s no change to our purpose of transforming access to education on a global scale. SEEK are investing in FutureLearn and its business strategy so you’ll keep seeing the FutureLearn you know, it’s not going anywhere.

It really is still business as usual for us. We will still be offering access to courses for free but the investment means we can do more, more quickly.

For example, we’ll continue to invest to ensure our platform remains extremely user-friendly and enjoyable to use on mobile, desktop and tablet. We’ll also remain focused on the courses we bring you so look out for more courses in terms of new subject areas, more degrees, and bite-sized stackable courses for learners keen to develop a particular skill for the workplace.

We’re delighted to be receiving this investment, obviously, but we’re really excited to be receiving it from a company like SEEK who understands and believes in our business and what we can achieve together. They are also a really good match to both us and our founding shareholder, The Open University, in their stated purpose to help people live more fulfilling and productive working lives and help organisations. You can watch how they bring their purpose to life.

They’re a great new investor for us and we can’t wait to start working with them. We hope you’re as excited as we all are for the future.

Simon Nelson

PS: We will do a round-up response to your comments later this week.

Category
FutureLearn news

Why Big-Data Science Depends on Skilled Data Engineers

0
Why Big-Data Science Depends on Skilled Data Engineers

As the field of data science matures, a distinct specialization is emerging: data engineering. Tech giants like Facebook, Amazon, and Google are recognize the value of data engineers relative to data scientists. That’s why they’re targeting candidates with skills to build critical infrastructure like data pipelines and warehouses.

The best computer science degrees keep up with this trend by helping graduate students develop high-level data engineering skills. The University of Illinois Online Master of Computer Science in Data Science (MCS-DS) degree is one of these degrees: it offers a comprehensive full-stack data sciences education  to add this fast-growing career path to the employment opportunities of its graduates.

Data science is one of the most in-demand career fields in computer science according to LinkedIn, job openings increased 56% over the past year. These big data detectives unearth valuable insights through analysis of massive datasets. At the highest level, their skills are essential for developing machine learning algorithms and artificial intelligence (AI) applications.

However, in order to work their magic, data scientists need data. And not just any data — they need a clean dataset. That means they need raw and messy data converted to a consistent format that can be used with the data scientist’s analytic tools. As computer science students know well, this simple-sounding task becomes increasingly challenging and time-consuming as a dataset grows in scale. In fact, some data scientists spend as much as 80% of their time “wrangling” or “munging” data before it’s ready to be analyzed.

That’s where data engineering comes in. Data engineers evaluate, parse, and clean datasets, using programming languages like Python and R to build data pipelines and warehouses. This infrastructure efficiently delivers clean datasets at scale for data science to produce big data products. The data engineer’s specialized expertise becomes crucial to a company’s success as it grows; a startup that can only afford to hire one data scientist might have no choice but to direct 80% of their hours to data engineering. This inefficiency becomes a crippling as the company scales up.

Just as data scientists and data engineers can sometimes be distinct roles within a company, top professionals in these fields can sometimes come from distinct educational backgrounds. While a data scientist typically might focus on math and statistical analysis, data engineers are often system thinkers and programmers at heart. As the data industry continues to develop, it’s becoming apparent that specializing in data engineering early in your education is a significant advantage for your career.

The University of Illinois is one of the top-ranked computer science schools in the country, with an incredible history of pioneering research dating back to the 1940s. Its Online Masters of Computer Science in Data Science (MCS-DS) degree provides a top-tier advanced education for data scientists, and students that want to pursue a career in data engineering have the flexibility to choose courses that prepare them for that direction. The degree requires graduate-level coursework in data mining, cloud computing, data visualization and machine learning for all students, through courses such as Introduction to Data Mining, taught by Jiawei Han, author of the well-known textbook “Data Mining: Concepts and Techniques.”

Computer science graduate students that want to become data engineers have plenty of opportunities to dive deeper as they fulfill their degree requirements. Advanced courses include data engineering-centric classes such as Theory and Practice of Data Cleaning and Data Curation.

MCS-DS students with a data engineering focus can complete their education with a Data Mining Capstone Project. In this hands-on course, students learn the latest data mining research techniques in an online seminar. They also complete a major project that applies data mining techniques to solve a real-world challenge. This kind of interactive, face-to-face learning experience puts the MCS-DS on a higher level than typical online computer science programs.  

The University of Illinois MCS-DS degree gives you excellent preparation for a data engineering career. Illinois’ highly-ranked computer science program is known for its track record of excellence, and Illinois alumni and faculty are responsible for companies that have created entirely new industries.

Want to be a part of this legacy? Learn more about the University of Illinois MCS-DS degreeand gain access to the computational and statistical knowledge needed to turn big data into meaningful insights

 

Bringing Computers to Life

0
Bringing Computers to Life

The new BSc in Computer Science will offer students the opportunity to learn core computing skills and apply those skills to any area or subject they feel passionate about. Music, art, sociology, education: the possibilities are endless. Through exciting project-based learning, the course encourages students to express themselves creatively and develop new links between technology and life.

“Our ethos is that we want students to demonstrate that they understand the theories and concepts we teach by applying them in whatever creative way they like.”

The new degree has been developed by the University of London and member institution Goldsmiths, whose academics have extensive experience in applying computer science to a wide range of fields.

Dr Rebecca Fiebrink is a Senior Lecturer in Computing at Goldsmiths. She is also a musician. She explained how she has never needed to choose between her two interests:

“One of the biggest reasons I came to Goldsmiths to teach is that all the people teaching here really look at computing as something that has strong links to society and to the arts, and many of us explore those links in our research. For me that’s one of the great things about Computer Science – you can apply it to anything that you care about and that interests you.

We don’t make students and staff choose between being technical people or creative people. We teach students who are studying creative computing and music computing and games programming right alongside students who are studying computer science.”

All the people teaching here really look at computing as something that has strong links to society and to the arts. One of the highlights of my career has been making software for machine learning in creative work – called Wekinator – that a lot people have used. It hit around 25,000 downloads this year and I recently had someone knock on my door who had put on an opera in Bristol about Frida Kahlo and had used my software.”

Dr Sarah Wiseman, Lecturer and Programme Leader at Goldsmiths, co-authored the Web Development module in the new BSc programme. She described how students will be encouraged to be creative within their computing practice:

“Our ethos is that we want students to demonstrate that they understand the theories and concepts we teach by applying them in whatever creative way they like. For example, students on the Games Development course won’t be asked to produce the exact same game – we will give them a brief and ask them to interpret it in an exciting and creative way. In some modules there are marks specifically for creativity and it’s a chance to add personality to the project.

Having this creative element in the degree gives students a chance to really care about their projects and their work. They want whatever they’re creating to be as brilliant as it can be because it’s something they own. If they hadn’t created it, it wouldn’t exist. Their projects are individual and unique to them and that gives them the enthusiasm to do it right.

With seven different specialisms on offer – from Games Development to Artificial Intelligence and Virtual Reality – students are able to build on their interests and develop the programming skills they need to innovate in any field.

Example projects produced by students studying the Goldsmiths on-campus degree include a DJ training system that uses machine learning to automatically rate scratching ability; an educational resource to teach physical computing and electronics to primary school students; a robot designed and controlled by a student as part of a play he produced; and an interactive games controller developed fora sensory game.

Dr. Wiseman adds: ”One of the best parts of my job is interacting with students: honest, enthusiastic, and unpredictable people. They challenge me and inspire me, and it’s great to be able to play a part in lots of different creative projects that are meaningful to each student.

Having this creative element in the degree gives students a chance to really care about their projects and their work.”

The University of London Bachelor of Science in Computer Science degrees are designed to provide those passionate about computing with instruction in computer science fundamentals. Whether you have high school qualifications or you’re already working in a computer science field, you can earn a valuable degree that will help move your career forward.

 

What Is Your Favorite Musical Instrument?

0
What Is Your Favorite Musical Instrument?

Students, read the entire article, listen to the 12 song excerpts, then tell us:

— Do you have a favorite instrument to listen to or play? What first drew you to it? What qualities of the instrument uniquely touch and move you?

— Which of the 12 musical pieces spotlighted in the article did you connect to or appreciate? Did reading the guest writers’ descriptions of them change how you think of and hear the piano? If so, tell us about your discoveries and what you liked?

— The 12 piano pieces selected in the article draw largely from classical or jazz genres and were written at least 50 years ago. However, many current popular artists across genres, such as Lady Gaga, Alicia Keys, Taylor Swift, John Legend, Luke Bryan and Billie Eilish to name a few, play the piano. Many big hits by artists like Adele, Beyoncé, Bruno Mars, Ariana Grande, Kendrick Lamar and Khalid also feature the piano in a prominent way. What are your favorite songs that feature a piano? Are there any piano-based songs you’d like to add to the list above?

— What are your experiences with the piano? Have you ever played or wanted to play? Does the article make you want to study or listen to the piano more? If you could learn to play any instrument (or a different one than you already play), what would it be? Why?

— Does your school have music classes or programs? Have you ever been involved in one? In your opinion, is music a valuable part of the educational experience? Do you think students should be required to take a music class at some point?

— Return to the instrument you consider most central to your life. Now, create a playlist of five songs to educate and inspire those not familiar with your favorite instrument of its magical capabilities. Please annotate at least one of your picks, using the article as a model. Include the name of the song, the artist and a short description of why that piece matters to you.

Students 13 and older are invited to comment. All comments are moderated by the Learning Network staff, but please keep in mind that once your comment is accepted, it will be made public.

Web Scraping MLB Stats with Python and Beautiful Soup

0
Web Scraping MLB Stats with Python and Beautiful Soup

Codecademy exercises have nicely packaged data prepared for us to use. However, there will be many occasions when we would like to explore a question that does not have a dataset ready for us to download. For example, based on their performance last year, which MLB players should I select in my fantasy baseball draft?

As we search for alternatives online, we may find a website that shares information we’d like to include in our analysis. However, it would be laborious to navigate to dozens of pages and manually copy and paste the information we find into a spreadsheet.

The good news is that Python web scraping libraries like Beautiful Soup can automate the collection of data from websites. Codecademy has a new course introducing you to the basics of webscraping and Beautiful Soup. In this article, we will walk through an example of how to use Beautiful Soup to collect MLB player stats from the 2018 season.

Specifically, we will cover how to:

  • Set Up Beautiful Soup and Requests
  • Connect to the ESPN Website with Requests
  • Extract MLB player stats with Beautiful Soup
  • Populate a Pandas DataFrame with the scraped player stats

At the end of this article, we’ll have our own .csv file containing the batting performance of all 331 players in the league, which will help inform our fantasy baseball picks. Afterwards, you’ll be able to use Beautiful Soup to pull information from anywhere online. Let’s start scraping!

Setting Up Beautiful Soup

In order to prepare our Python environment for web scraping, we need to install two Python packages, Requests and Beautiful Soup.

Requests is a library that allows us to read a website’s source code, and Beautiful Soup is the library that searches and parses this HTML source code based on its tags. We can install both these packages by simply going to our command line interface and executing this command:

pip install requests beautifulsoup4

If you need additional assistance installing these packages, feel free to consult Requests and Beautiful Soup’s own guides for installation.

Then, import these libraries for use in your Python development environment of choice (Jupyter Notebooks, Spyder, Atom, IDLE, you name it) with two import statements:

  • import requests
  • from bs4 import BeautifulSoup

While we’re at it, let’s import two other libraries that will come in handy as we write our program: Pandas and Regular Expressions (re). Now our Python environment should be ready for web scraping!

Picture4

As we build our own DataFrame with information we scrape from the ESPN page, we will be introducing the Requests and Beautiful Soup methods that are essential for web scraping. Namely, we will be going over the Request library’s .get() method, and Beautiful Soup’s .find_all(), .find(), and .get_text() methods.

Connect to the Website

We can connect to a website by passing a string of the URL we would like to visit into requests.get(). So, to connect to the MLB statistics page we would execute the code:

page = requests.get(‘http://www.espn.com/mlb/history/leaders/_/breakdown/season/year/2018/start/1’)

Then, we can look at the source code behind this website by looking at the .text property with this get request: page.text.

Picture5

Next, we are going to specify that Beautiful Soup should parse the source code, page.text, as HTML by including the argument html.parser and saving it to a variable, soup. You can learn more about different parsers here, but the most common we will encounter is HTML.

Picture6

Now that we have the source code, we can begin to locate the HTML elements we want to scrape.

Useful Beautiful Soup Methods

Next, we’re going to use Beautiful Soup’s .find_all() and find() methods to extract information from the source code. Beautiful Soup().find_all() is essential for us to locate the elements that contain the player’s statistics like HRs (Home Runs) or RBIs (Runs Batted In) and so on.

If you’ve gone through our Beautiful Soup lesson, you’ll recall that find_all() works by searching the HTML source code for the tags and attributes we specify.

First, find_all() requires that we state the tag of element we want to scrape. Next, we specify attributes in .find_all()’s attrs argument, which is constructed like so:

attrs = {'attribute1_name': 'attribute1_value', 'attribute2_name': 'attribute2_value'}

When you put it all together, here is an example of us extracting just the first player’s row from the table:

soup.find_all('tr', attrs = {'class': 'oddrow player-10-33039'})

Picture8

Please note that .find_all() always returns a list [ ]. This is helpful when we want to include multiple elements with the same tag or attribute.

However, if we just wanted to focus on a single element, we could use the .find() method, which returns just the first element that meets our search criteria. The arguments for .find() are constructed in the exact same method as .find_all(), where we specify the tags and/or attributes of the elements we want to scrape.

For instance, it is preferable to use .find() when we scrape the table header that lists the column names (Player, HR, RBI, etc). ESPN designed the table with this header repeated every 10 players, so it appears on the current page five times. However, it is only necessary for us to collect this table header once.

Note the difference in output between a .find_all() and .find() constructed with the same parameters:

Picture9

Picture10

.find_all(‘tr’, attrs={'class':'colhead'}) returns a list of all five table headers that appear in the table, while .find('tr', attrs={'class':'colhead'}’) returns just one table header element that lists the column names from PLAYER to BA (Batting Average).

Now that we know how to narrow in on the element(s) that we desire with .find_all() and .find(), it would be helpful to remove the HTML notation and keep only the plain text that contains the players’ statistics. For instance, in Mookie Betts’ element, we can begin to make out some of his statistics:

Picture11

Specifically, we know that the last

element in Mookie Betts’ row corresponds with the last column in the table: Batting Average (BA). In the source code we see that his final

tag is

.346

.

Ultimately we want to keep just the text that reports Betts’ batting average and remove all HTML notation (the start and end

tags). Fortunately, we can select just text with Beautiful Soup’s .get_text() method, which we call by executing on a Beautiful Soup element. This method extracts all the text that falls outside of the tag notation (<>).

Here is what it looks like when we extract the text from each

element in Mookie Betts’ table row:

Picture12

Finally, we are ready to begin web scraping on a larger scale! With the knowledge of how to connect to websites with requests.get(), to narrow in on HTML elements with .find_all() and .find(), and to extract readable text from HTML elements with .get_text(), we can begin building a more involved web scraper that can repeat this process for every player in the league.

Populating Our DataFrame

Now that we have all the tools to scrape all the players’ names and stats from the HTML source code, let’s create a final DataFrame using Pandas to organize and save this information. At the end, we will have a DataFrame with the batting stats for all 331 players that we’ll export to a .csv file for analysis before our fantasy draft.

We want the column names for this final DataFrame to be the same as column names used in the table found on ESPN, so let’s scrape the text from the table header. When we look at the source code on ESPN, we see that the start tag for the table header is

.

Picture13

Since we only want to scrape a single element (and not the repeated headers every 10 rows in table), let’s use the .find() method.

Once we have the table header, we want to extract the text from each column, which is stored in table data (

) elements. We will use list comprehensions with Beautiful Soup’s .get_text() method to extract the text from each

element and save it to a variable, columns.

We will then create an empty DataFrame called final_df and set its columns equal to the values we just scraped from the table header. As we scrape the players’ stats, we will populate final_df with each player’s performance.

Picture14

Now it’s time to scrape each baseball player’s stats. As we noticed with Mookie Betts’ row in the source code, each player’s data is stored in a table row (

) element with a class attribute. Fortunately, as we look at multiple player’s rows, we notice a pattern in the value of the class attribute.

For instance, the Atlanta Braves’ Nick Markakis’s stats are contained in

and Manny Machado is listed in

. We realize that all the players’ classes begins with oddrow or evenrow followed by player-10- and then some identifying digits.

Knowing this, we can scrape all player elements by using the regular expression’s compile function to pick up all the elements that contain the string row player-10- in its class value:

players = soup.find_all('tr', attrs={'class':re.compile('row player-10-')})

Picture15

Now that we have all the HTML elements that contain the players’ data on this page, we want to extract the stats from each player’s row, and then concatenate it to the end of the final_df DataFrame.

In order to accomplish this, we will loop through every player’s element and extract the

tags by using list comprehensions and Beautiful Soup’s .get_text() method, much like we did with the table header.

Then, we will create a temporary DataFrame, temp_df, that stores an individual player’s stats with the same column names that we extracted from the table header. We can concatenate temp_df to the end of final_df with pd.concat(), merging each successive player’s stats with the stats we have already collected.

Picture16

Now we have all the player’s stats on this page, but we’re not quite finished. Each page on the ESPN site only lists 50 players, but there were 331 batters in the league during the 2018 season. In order to collect data on all 331 players, we need to scrape data from all 7 of the URLs that contain player data.

We notice a pattern in the URL address: if we just change the last number after /start/, our table will begin with at that rank and list the next 50 players by batting average.

Therefore, we can recreate all the URLs we want to visit with a for loop that iterates through a range function from 1 to 331 in increments of 50 and plugs it into the base URL address. We will then repeat the scraping of player data on each of the URLs in this for loop and concatenate them to the end our final_df.

Picture17

We now have the batting statistics for all 331 MLB players in our DataFrame final_df! For our final step, let’s export this DataFrame to a .csv file for us to analyze in preparation for our fantasy baseball draft.

Picture18

Conclusion

Like we did with the baseball player’s stats on ESPN, you can go forth and collect information on websites for your own analysis using Python’s Beautiful Soup. You have the tools to navigate the messy source code used to create web pages and extract the information of interest to you.

Web scraping will certainly save you time and energy when you want to collect data on multiple websites with a similar structure, or if you pull data on the same webpage on a daily cadence. Now, instead of visiting all of these webpages individually or visiting the same webpage each day, all you have to do is run your Python script written with Beautiful Soup.

To learn more about what you can do with Beautiful Soup, the best place to begin is Codecademy’s “Web Scraping with Beautiful Soup” course. Codecademy’s lesson can expand your Beautiful Soup expertise by reviewing how to navigate the HTML structure with the .parent, .children properties or select HTML elements based on their CSS selectors.

If you’re feeling overwhelmed or rusty navigating the source code of the webpages you’re trying to scrape, we recommend that you brush up on your HTML knowledge. Then, you’ll be scraping in no time.