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
{ | |
"globals": { | |
"Array": false, | |
"ArrayBuffer": false, | |
"Boolean": false, | |
"constructor": false, | |
"DataView": false, | |
"Date": false, | |
"decodeURI": false, | |
"decodeURIComponent": false, |
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
# Python ascii codec can't decode and unicode mess | |
# | |
# check this out https://pythonhosted.org/kitchen/unicode-frustrations.html | |
# and this http://www.joelonsoftware.com/articles/Unicode.html | |
# | |
# The short of it is this | |
# 1. If you can, always set PYTHONIOENCODING=utf8 before you start your python programs. | |
# 2. If you can't or you can't ensure this, always use the following lambda _u to get unicode text | |
# whereever you convert to strings (str.format, str % etc.) | |
# |
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
(ns appliedsciencestudio.covid19-clj-viz.repl | |
(:require [clojure.string :as string] | |
[hickory.core :as hick] | |
[hickory.select :as s])) | |
;;;; Scraping data | |
(def wiki-page | |
"We want this data, but it's only published as HTML." | |
(slurp "https://en.wikipedia.org/wiki/List_of_countries_by_hospital_beds")) |
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
(def iso-639-b {"cai" "Central American Indian languages", | |
"mdr" "Mandar", | |
"chm" "Mari", | |
"kor" "Korean", | |
"kas" "Kashmiri", | |
"chi" "Chinese", | |
"nya" "Chichewa; Chewa; Nyanja", | |
"mdf" "Moksha", | |
"fan" "Fang", | |
"pam" "Pampanga; Kapampangan", |