Skip to content

Instantly share code, notes, and snippets.

@fedickinson
fedickinson / Scraping_The_Partisan_Divide.ipynb
Created June 18, 2018 13:53
Scraping the Partisan Divide: Sentiment, Text, & Network Analysis of an online political discussion forum.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fedickinson
fedickinson / forum_spider.py
Created June 17, 2018 21:15
Scraping the Partisan Divide: My Scrapy Spider
# Defined Number of Threads -> Multiple Pages per Thread -> Multiple posts per page
from scrapy import Spider, Request
from forum.items import ForumItem
import re
class ForumSpider(Spider):
name = "forum_spider"
allowed_url = ['https://liberalforum.net']
@fedickinson
fedickinson / partyMisalignment_global
Last active June 17, 2018 20:47
R Shiny App - Using Census API and Congressional District voting to investigate demographic breakdown of 2016 election - https://franklindickinson.shinyapps.io/election_analyzer_2016/
# Load Base Packages ####
# install.packages("shiny")
# install.packages("tidyverse")
#install.packages("googleVis")
library(shiny)