Skip to content

Instantly share code, notes, and snippets.

@Alex-Devoid
Alex-Devoid / OSX-Convert-MOV-GIF.md
Created January 1, 2020 00:40 — forked from tskaggs/OSX-Convert-MOV-GIF.md
Creating GIFs from .MOV files in OSX using FFmpeg and ImageMagick

Convert MOV to GIF using FFmpeg and ImageMagick

I tried a few different techniques to make a GIF via command-line and the following gives me the best control of quality and size. Once you're all setup, you'll be pumping out GIFs in no time!

Preparation

Install FFmpeg

  • $ brew install ffmpeg [all your options]
    • Example: $ brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools

Install ImageMagick

@Alex-Devoid
Alex-Devoid / multiple_intersects_for_all_features.py
Last active January 10, 2020 22:17
PyQGIS: Check if each feature intersects with features from multiple layers
canvas= qgis.utils.iface.mapCanvas()
layers = dict((k.name(),i) for i, k in enumerate(canvas.layers()))
print(layers)
## parcel layer showing property
layer1 = canvas.layer(14)
provider = layer1.dataProvider()
#main highway
@Alex-Devoid
Alex-Devoid / 110_admin.geojson
Last active January 23, 2020 07:30
A viz of all the "remain in Mexico" (MPP) asylum cases.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Alex-Devoid
Alex-Devoid / index.html
Created January 22, 2020 01:33
MPP Chuck Arrays
<head>
<title>Moving Bubble Tutorial</title>
<link rel="stylesheet" href="style/style.css" type="text/css" media="screen" />
<meta charset="utf-8">
</head>
<body>
<div id="main-wrapper">
@Alex-Devoid
Alex-Devoid / index.html
Created January 24, 2020 20:30
chuck, transition and remove 1000s of circles
<head>
<title>transition and delete</title>
<link rel="stylesheet" href="style/style.css" type="text/css" media="screen" />
<meta charset="utf-8">
</head>
<body>
<div id="main-wrapper">
@Alex-Devoid
Alex-Devoid / README.md
Created January 24, 2020 21:22 — forked from michellechandra/README.md
Basic US State Map - D3
@Alex-Devoid
Alex-Devoid / az-wildcats-vs-UCLA-bruins-Turnovers-Field-goals.Rmd
Last active March 6, 2020 08:09
az-wildcats-vs-UCLA-bruins-Turnovers-Field-goals
---
title: "Visualizing One Million NCAA Basketball Shots"
author: "Max Woolf (@minimaxir)"
date: "2018-03-19"
output:
html_notebook:
highlight: tango
mathjax: null
number_sections: yes
theme: spacelab
@Alex-Devoid
Alex-Devoid / .block
Last active March 18, 2020 01:28 — forked from mbostock/.block
Threshold Choropleth
license: gpl-3.0
<!DOCTYPE html>
<style>
.counties {
fill: none;
}
.states {
fill: none;
stroke: #fff;
stroke-linejoin: round;
}
@Alex-Devoid
Alex-Devoid / democratic-primary-2020-pima-county.js
Created March 19, 2020 21:48
Data wrangling for election analysis
const fs = require('fs');
const path = require('path');
const csv = require('fast-csv');
//Read pima county precincts
let rawdata = fs.readFileSync('Voter_Precincts.geojson');
let precinctsPima = JSON.parse(rawdata);
// Read election results