...
Full Bio
Use Machine Learning To Teach Robots to Navigate by CMU & Facebook Artificial Intelligence Research Team
226 days ago
Top 10 Artificial Intelligence & Data Science Master's Courses for 2020
227 days ago
Is Data Science Dead? Long Live Business Science
255 days ago
New Way to write code is about to Change: Join the Revolution
256 days ago
Google Go Language Future, Programming Language Programmer Will Get Best Paid Jobs
577 days ago
Top 10 Best Countries for Software Engineers to Work & High in-Demand Programming Languages
724761 views
Highest Paying Programming Language, Skills: Here Are The Top Earners
669342 views
Which Programming Languages in Demand & Earn The Highest Salaries?
474462 views
Top 5 Programming Languages Mostly Used By Facebook Programmers To Developed All Product
463242 views
World's Most Popular 5 Hardest Programming Language
394569 views
Web Scraping, Data Visualization, and Regular Expressions: Doing it all in Python

# requests for fetching html of website
import requests
# Make the GET request to a url
r = requests.get('http://www.cleveland.com/metro/index.ssf/2017/12/case_western_reserve_university_president_barbara_snyders_base_salary_and_bonus_pay_tops_among_private_colleges_in_ohio.html')
# Extract the content
c = r.content
from bs4 import BeautifulSoup
# Create a soup object
soup = BeautifulSoup(c)

main_content = soup.find('div', attrs = {'class': 'entry-content'})
# Extract the relevant information as text
content = main_content.find('ul').text

- The names of the presidents
- The names of the colleges
- The salaries
# Create a pattern to match names
name_pattern = re.compile(r'^([A-Z]{1}.+?)(?:,)', flags = re.M)
# Find all occurrences of the pattern
names = name_pattern.findall(content)

# Make school patttern and extract schools
school_pattern = re.compile(r'(?:,|,\s)([A-Z]{1}.*?)(?:\s\(|:|,)')
schools = school_pattern.findall(content)
# Pattern to match the salaries
salary_pattern = re.compile(r'\$.+')
salaries = salary_pattern.findall(content)

# Messy salaries
salaries = ['$876,001', '$543,903', '$2453,896']
# Convert salaries to numbers in a list comprehension
[int(''.join(s[1:].split(','))) for s in salaries]
[876001, 543903, 2453896]

# Make a horizontal bar chart
df.plot(kind='barh', x = 'President', y = 'salary')



- Web Scraping: Retrieving online data
- Regular Expressions: Parsing our data to extract information
- Visualization: Showcasing all our hard work