{ "cells": [ { "cell_type": "markdown", "source": [ "# Challenge: Analyzing Text about Data Science\n", "\n", "For dis example, make we do one simple exercise wey cover all di steps of traditional data science process. You no need write any code, you fit just click di cells wey dey below to run dem and see di result. As challenge, you fit try dis code with different data. \n", "\n", "## Goal\n", "\n", "For dis lesson, we don dey talk about different concepts wey relate to Data Science. Make we try discover more related concepts by doing some **text mining**. We go start with one text about Data Science, extract keywords from am, then try visualize di result.\n", "\n", "As text, I go use di page on Data Science wey dey Wikipedia:\n" ], "metadata": {} }, { "cell_type": "markdown", "source": [], "metadata": {} }, { "cell_type": "code", "execution_count": 62, "source": [ "url = 'https://en.wikipedia.org/wiki/Data_science'" ], "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": [ "## Step 1: Getting the Data\n", "\n", "First step for every data science process na to get the data. We go use `requests` library do that:\n" ], "metadata": {} }, { "cell_type": "code", "execution_count": 63, "source": [ "import requests\r\n", "\r\n", "text = requests.get(url).content.decode('utf-8')\r\n", "print(text[:1000])" ], "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\n", "\n", "
\n", "\n", "