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
library(tidyverse) | |
library(leaflet) | |
library(httr) | |
library(sp) | |
library(rgdal) | |
library(mapview) | |
library(xml2) | |
library(RColorBrewer) | |
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
library(tidyverse) | |
library(colorspace) | |
library(audio) | |
options(scipen=100) | |
# get the international data from Our World in Data (already downloaded) | |
international_data <- read_csv("data/owid_international_2021_02_26.csv") |
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
# single script to get the data for England, animate the line chart and make the .wav file | |
#libraries | |
library(tidyverse) # for munging the data | |
library(audio) # to mmake the wav file | |
library(gganimate) # to animate the line chart | |
library(zoo) # for the rolling average | |
# get and prepare the data ---- |
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 PIL import Image | |
import glob | |
import time | |
# create an empty list called images | |
images = [] | |
# get the current time to use in the filename | |
timestr = time.strftime("%Y%m%d-%H%M%S") |
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
PREFIX dcat: <http://www.w3.org/ns/dcat#> | |
PREFIX dcterms: <http://purl.org/dc/terms/> | |
PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
PREFIX qb: <http://purl.org/linked-data/cube#> | |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
PREFIX sdmx: <http://purl.org/linked-data/sdmx/2009/concept#> | |
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | |
PREFIX void: <http://rdfs.org/ns/void#> | |
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> |
We can't make this file beautiful and searchable because it's too large.
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
"repDate","name","value","year","lastValue","monthno","group" | |
"2015-05-01","City of Derby",137460.0762,2015,137460.0762,245,"East Midlands" | |
"2001-12-01","City of Derby",60493.55855,2001,60493.55855,84,"East Midlands" | |
"2004-01-01","City of Derby",104635.3407,2004,104635.3407,109,"East Midlands" | |
"2004-04-01","City of Derby",106620.5638,2004,106620.5638,112,"East Midlands" | |
"2017-06-01","City of Derby",151598.6005,2017,151598.6005,270,"East Midlands" | |
"2016-01-01","City of Derby",140878.6028,2016,140878.6028,253,"East Midlands" | |
"1998-07-01","City of Derby",42714.03835,1998,42714.03835,43,"East Midlands" | |
"1995-06-01","City of Derby",39736.716,1995,39736.716,6,"East Midlands" | |
"2014-04-01","City of Derby",130099.4221,2014,130099.4221,232,"East Midlands" |
We can't make this file beautiful and searchable because it's too large.
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
"repDate","name","value","year","lastValue","monthno","group" | |
"2009-04-01","Hartlepool",105193.8233,2009,105193.8233,172,"North East" | |
"2000-01-01","Hartlepool",43937.756,2000,43937.756,61,"North East" | |
"2015-10-01","Hartlepool",102929.3792,2015,102929.3792,250,"North East" | |
"1997-07-01","Hartlepool",39946.00189,1997,39946.00189,31,"North East" | |
"2018-02-01","Hartlepool",104594.3429,2018,104594.3429,278,"North East" | |
"2003-11-01","Hartlepool",69377.30951,2003,69377.30951,107,"North East" | |
"1999-12-01","Hartlepool",44794.55102,1999,44794.55102,60,"North East" | |
"2002-01-01","Hartlepool",44817.86181,2002,44817.86181,85,"North East" | |
"1998-09-01","Hartlepool",43179.20586,1998,43179.20586,45,"North East" |
We can't make this file beautiful and searchable because it's too large.
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
"repDate","name","value","year","lastValue","monthno","group" | |
"2009-04-01","Hartlepool",105193.8233,2009,105193.8233,172,"North East" | |
"2000-01-01","Hartlepool",43937.756,2000,43937.756,61,"North East" | |
"2015-10-01","Hartlepool",102929.3792,2015,102929.3792,250,"North East" | |
"1997-07-01","Hartlepool",39946.00189,1997,39946.00189,31,"North East" | |
"2018-02-01","Hartlepool",104594.3429,2018,104594.3429,278,"North East" | |
"2003-11-01","Hartlepool",69377.30951,2003,69377.30951,107,"North East" | |
"1999-12-01","Hartlepool",44794.55102,1999,44794.55102,60,"North East" | |
"2002-01-01","Hartlepool",44817.86181,2002,44817.86181,85,"North East" | |
"1998-09-01","Hartlepool",43179.20586,1998,43179.20586,45,"North East" |
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
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
prefix geo: <http://www.opengis.net/ont/geosparql#> | |
prefix geof: <http://www.opengis.net/def/function/geosparql/> | |
prefix unit: <http://qudt.org/vocab/unit#> | |
SELECT DISTINCT ?name ?loc ?geo ?selhosp | |
WHERE { | |
?loc rdfs:label ?name . | |
?loc geo:hasGeometry ?geo . |
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
PREFIX qb: <http://purl.org/linked-data/cube#> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
SELECT (count (distinct ?conc) as ?countconc) | |
WHERE { | |
?conc <http://www.w3.org/2004/02/skos/core#inScheme> ?scheme . | |
} |
NewerOlder