Machine Learning - Level 1 Module 2 Eeshan Walia

Technical Skills

  1. Learned how to use Python requests to access information from a website.
  2. Learned how to utilize Json data in order to scrape information from a webpage.
  3. Learned how to write to a CSV file using the writerow functions from the csv library.
  4. Learned how to access webpage data from retrieved .json data.
  5. Reviewed concepts like lists and dictionaries in python.

Tools Used

  1. PyCharm + Atom (IDE and Text editor)
  2. Python Requests
  3. Json

Soft Skills

  1. Debugging - I ran into several errors when trying to retrieve data from the webpage and had to find different ways to resolve the issues.
  2. Troubleshooting - I used various online resources, including stack overflow to help resolve certain issues in my program.
  3. Growth Mindset - Through the various issues I encountered, I made sure to stay motivated and focused on the task that I was trying to complete in order to be successful.

Tasks

  1. I first went into the discourse communities and decided on which forum I would be scraping the results from. I chose the SitePoint forum.
  2. I then explored the python requests function to figure out exactly what I needed to do after establishing a connection using the website’s URL.
  3. I initially was focused on using BeautifulSoup to parse through the HTML of the code, but then decided that it would be easier to utilise the JSON data from the website, as the labels were all stored in a dictionary and did not require me to remove the HTML tags.
  4. I took the data from the dictionaries returned in the JSON data and converted them into list format. I then took the lists and converted them to columns in my CSV file, leaving me with a CSV file that has 1200 entries with the title, number of views, and the number of replies to each post.

Github link to code: GitHub - eeshanw/MachineLearningRecommender

1 Like