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
let outcomes_health; | |
async function get_values() { | |
let data = await d3.csv('https://raw.githubusercontent.com/lennymd/test_evidence_map/main/public/data/column_values.csv'); | |
const cols = data.columns; | |
let values = {}; | |
cols.forEach(col => (values[col] = d3.map(data, d => d[col]).keys())); | |
outcomes_health = values['health_outcomes']; | |
} | |
get_values(); | |
console.log(outcomes_health); |
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) | |
# Read CSV file | |
df <- read_csv("https://raw.githubusercontent.com/lennymd/formulaOneAnalysis/main/data/race_results_statsf1.csv") %>% filter(year == 1950) | |
# Trying to calculate for the last place for a race | |
get_dead_last <- function(some_race_id) { | |
last <- df %>% | |
select(race_id, position, driver) %>% | |
filter(race_id == some_race_id) %>% |
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
<!-- argentina start --> | |
<div class="row"> | |
<div class="col-12"><h4>Argentina</h4></div> | |
</div> | |
<div class="row"> | |
<div class="col-6">Confirmed Cases</div> | |
<div class="col-6 text-right"><span id="argentina_cases"></span></div> | |
</div> | |
<div class="row"> | |
<div class="col-6">Deaths</div> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Cards test</title> | |
<style> | |
.hidden { | |
display: none; |
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
# This script will search for all the | |
import glob, csv | |
# the name of your hard drive | |
hdName = "lennymartinezd" | |
# the name of the folder where all the POY images are on" | |
mainFolderName = "_photoExports" | |
mainFolderPath = "/Volumes/" + hdName + "/" + mainFolderName |
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
# we'll use the json library to read the JSON file and the csv library to save the file as a CSV file. | |
import csv, json | |
# This is the path to your json file. In this case I'm running the python script from the same folder where my json is. | |
path_to_file = "art_of_asia.json" | |
# The first thing we do is load the JSON file using Python, which turns the whole object into a dictionary, with a lot of dictionaries inside. | |
with open(path_to_file) as file: | |
data = json.load(file) |