Skip to content

Instantly share code, notes, and snippets.

@marketinview
marketinview / changeNpsScale.js
Last active May 31, 2024 11:56
Qualtrics: Change NPS Scale. This script changes the scale of an NPS question from 0-10 to a smaller scale. 1-10 is most common, but any scale can be specified. For numbered horizontal scales, the NPS question type is preferable to a horizontal multiple choice because it remains horizontal on small screen mobile devices. #qualtrics #js #jq #nps …
Qualtrics.SurveyEngine.addOnload(function() {
//Thomas Gibbons Consulting
//Change NPS question scale (not simple layout)
var scaleStart = 1; //Change - 0 or more and no greater than end
var scaleEnd = 10; //Change - 10 or less and no less than start
//No changes below
var width = 100/(scaleEnd - scaleStart + 1) + "%";
var q = jQuery("#"+this.questionId);
var cc = q.find('td.ControlContainer');
@pamelafox
pamelafox / nfl_picks.sql
Last active April 4, 2024 07:05
nfl_picks.sql
/*
1st 3 rounds of the NFL 2015 Draft
Collected by: https://www.khanacademy.org/profile/BobbyandKaren/
*/
CREATE TABLE picks(
id INTEGER PRIMARY KEY,
pick_number INTEGER,
name TEXT,
college TEXT,
@aagarw30
aagarw30 / server.r
Last active January 5, 2022 17:55
R Shiny Download GGPLOT demo
library(shiny)
library(ggplot2)
shinyServer(function(input,output)({
# x contains all the observations of the x variable selected by the user. X is a reactive function
x <- reactive({
iris[,as.numeric(input$var1)]
})
# x contains all the observations of the y variable selected by the user. Y is a reactive function
y <- reactive({
iris[,as.numeric(input$var2)]
@chris-prener
chris-prener / oneSamplePlot.do
Last active February 4, 2020 22:05
Example of Stata plot for a one sample t-test
// ==========================================================================
// Minimal Working Example - One Sample T-Test Plot
// ==========================================================================
// standard opening options
version 14
log close _all
@chris-prener
chris-prener / twoSamplePlot.do
Created October 24, 2016 04:20
Example of Stata plot for a independent sample t-test
// ==========================================================================
// Minimal Working Example - Independent Sample T-Test Plot
// ==========================================================================
// standard opening options
version 14
log close _all
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ctesta01
ctesta01 / qsf_explanation.md
Last active June 9, 2024 16:23
How does a Qualtrics Survey File work?

Quickstart Guide to undertsanding the Qualtrics Survey File

This information is likely to quickly become outdated when Qualtrics next changes the formatting of the QSF file. This guide was started February 2017. I hope that it is a useful introduction to understanding the contents of the QSF file that one can download from Qualtrics.

This document includes:

@aparrish
aparrish / spacy_intro.ipynb
Last active August 9, 2023 01:41
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active June 9, 2024 16:59
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aparrish
aparrish / csv-intro.ipynb
Last active July 18, 2023 20:00
Quick intro to CSVs. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.