- htttp://www.enricobergamini.it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys, re, time, logging, requests | |
import random | |
import unicodecsv as csv | |
from threading import Thread, Lock, currentThread | |
from queue import Queue, Empty | |
from lxml import html | |
lock = Lock() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graph = px.scatter(df, x="employment", y="equity", #color="country", | |
hover_name="country", text="countrycode", | |
range_x=[48,80], range_y=[76,93], template="plotly_dark", size="pop", | |
animation_group="country", animation_frame="year", | |
labels=dict(employment="Emp", equity="Eq",year="Year")) | |
for i in graph['data']: | |
i['name'] = i['name'].replace('Country=', '') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import os | |
import matplotlib.pyplot as plt | |
import missingno as msno | |
## The script merges and reshapes the data provided by https://github.com/kylemcdonald/covid-mobility-data | |
## Assumes all tsv files are in a folder called "archive" | |
## Inputs different files, outputs longform tidy data. | |
bdf = pd.read_csv('archive/2020-03-29_ES_Mobility_Report_en.pdf.tsv', sep='\t', nrows=0) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup as bs | |
import re, requests, time | |
from lxml import html | |
links = [] | |
for date in range(1998, 2020+1): | |
url = 'https://www.ecb.europa.eu/press/pressconf/{}/html/index_include.en.html'.format(date) | |
r = requests.get(url) | |
tree = html.fromstring(r.content) |
OlderNewer