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
SOC_MAJOR_GROUPS = { | |
"11": "Management Occupations", | |
"13": "Business and Financial Operations Occupations", | |
"15": "Computer and Mathematical Occupations", | |
"17": "Architecture and Engineering Occupations", | |
"19": "Life, Physical, and Social Science Occupations", | |
"21": "Community and Social Service Occupations", | |
"23": "Legal Occupations", | |
"25": "Education, Training, and Library Occupations", | |
"27": "Arts, Design, Entertainment, Sports, and Media Occupations", |
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
# Set up | |
library(ggplot2) | |
library(dplyr) | |
library(ggmap) | |
library(maps) | |
library(gganimate) | |
# Request raw data from https://firms.modaps.eosdis.nasa.gov/active_fire/#firms-txt | |
# Data used for this map | |
url <- "https://raw.githubusercontent.com/fanghuiz/random_viz/master/data/fire_IND_201909.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
from PIL import Image, ImageEnhance | |
import os | |
import subprocess | |
import sys | |
# Requires ffmpeg https://www.ffmpeg.org/ffmpeg.html | |
# Run script as | |
# python movie_color_bar.py input_video output_frame_folder output_image |
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(lubridate) | |
# Dataset URL | |
url_eng_daily_max <- "https://www.metoffice.gov.uk/hadobs/hadcet/cetmaxdly1878on_urbadj4.dat" | |
# Read in data from URL | |
eng_daily_max <- data.table::fread( | |
url_eng_daily_max, | |
# Encode -999 as NA |