human
I am working on the file "Jupyter/2018-01-10-home-advantage-in-football-leagues-around-the-world.ipynb".
The first task is:
Honestly, there's not much going on there. With the poissble exception of the Spanish La Liga since 2010, the home field advantage enjoyed by the teams in each league is broadly similar (and that's before we bring in the idea of confidence intervals and hypothesis testing).
Home Advantage Around the World
To find more interesting contrasts, we must venture to crappier and more corrupt leagues. My hunch is that home advantage would be negligible in countries where the overall quality (team, infastructure, etc.) is very low. And by low, I mean leagues worse than the Irish Premier Division (yes, they exist). Unfortunately, the historical results for such leagues are not available on football-data.co.uk. Instead, we'll scrape the data off betexplorer. I'm extremely impressed by the breadth of this site. You can even retrieve past results for the French overseas department of Réunion. Fun fact: Dimtri Payet spent the 2004 season at AS Excelsior of the Réunion Premier League.
We'll use Scrapy to pull the appropriate information off the website. If you've never used Scrapy before, then you should check out this post. I won't spend too long on this part, but you can find the full code on here.
Can you write Python code for it?

Can you provide a Python code to find more interesting contrasts, we must venture to crappier and more corrupt leagues?
assistant
#Here is Python code to find more interesting contrasts, we must venture to crappier and more corrupt leagues.

import scrapy
import re # for text parsing
import logging
import pandas as pd

class FootballSpider(scrapy.Spider):
    name = 'footballSpider'
    # page to scrape
    start_urls = pd.read_csv(
        'https://raw.githubusercontent.com/dashee87/blogScripts/master/files/league_links.csv')['link'].tolist() + \
    pd.read_csv("league_links_.csv")['link2'].dropna(axis=0, how='all').tolist()
    # if you want to impose a delay between sucessive scrapes
#   download_delay = 1.0 

    def parse(self, response):
        self.logger.info('Scraping page: %s', response.url)
        country_league = response.css('.list-breadcrumb__item__in::text').extract()
        
        for num, (hometeam, awayteam, match_result, date) in \
            enumerate(zip(response.css('.in-match span:nth-child(1)'), 
                                 response.css('.in-match span:nth-child(2)'),
                                 response.css('td.h-text-center'),
                                 response.css('.h-text-no-wrap::text').extract())):
            yield {'country':country_league[2], 'league': country_league[3],
                   'HomeTeam': hometeam.css('::text').extract_first(), 
                   'AwayTeam':awayteam.css('::text').extract_first(), 
                   'FTHG':  re.sub(':.*', '', match_result.css('::text').extract_first()), 
                   'FTAG':  re.sub('.*:', '', match_result.css('::text').extract_first()),
                   'awarded': ' ' in match_result.css('::text').extract_first() or
                   'AWA.' in match_result.css('::text').extract_first(),
                   'date':date}

from scrapy.crawler import CrawlerProcess

process = CrawlerProcess({
'USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)',
'FEED_FORMAT': 'json',
'FEED_URI': 'all_league_goals_.json'
})

# minimising the information presented on the scrapy log
logging.getLogger('scrapy').setLevel(logging.WARNING)
process.crawl(FootballSpider)
process.start()