Giter Club home page Giter Club logo

uk-elections's Introduction

uk-elections's People

Contributors

kjhealy avatar

Stargazers

 avatar Kat avatar  avatar David Moore avatar David Huels avatar Ian Jacob avatar Marco Ardengo avatar Rob Wells avatar Tapan Mishra avatar Chris Taylor avatar Arndt Leininger avatar Anna Powell-Smith avatar Jason Heppler avatar Alex Worrad-Andrews avatar Micah Stubbs avatar  avatar Christopher Gandrud avatar Paul Hurley avatar  avatar Ben Marwick avatar

Watchers

 avatar James Cloos avatar Mohammad Heidarinejad avatar Kushtrim Visoka avatar  avatar Kat avatar

uk-elections's Issues

Some weird issues

I did face some road blocks but was able to bypass them by including some libraries. But when i am in the step

all.results.list[[name]] <- get.constituency.results(constituency), it fails each time.
Error: could not find function "get.constituency.results". I am not very experienced in R. For verifying it, i took it out of the For Loop and hardcoded the index to [1] or [2] to generate Aberavon.rda or Aberconwy.rda. But for both steps i get the same result.
I understand that "constituency" is holding the JSON format from read_html. But i am clueless further.

Two more issues

  1. Code can not find 'constituency_names.df'.
    I believe this is because the code checks to see whether "data/constituency_names.csv" exists but if it does (already exist) it doesn't actually load it.
  2. Code can not find function credit() called on lines 303 and 356

Other than that code runs perfectly for me. I do get an error that I don't have a perl interpreter installed but since we never load an xls file I dont think that matters unless of course that is related to the credit() function call.

question - 15 candidate threshold for main party status?

@kjhealy I'm curious, what was your thinking behind the '15 candidates standing' threshold for defining the main parties?

### parties by N candidates
main.parties <- data %>% group_by(Party) %>% tally() %>% arrange(desc(n)) %>%
filter(n>14) %>% data.frame(.)

I'm trying to decide if this level of aggregation makes sense for a graphic I'm working on. Thanks for the insight!

could not find function "read_html"

@kjhealy many thanks for sharing the dataset and the script. When I attempt to run the first two sections in RStudio I encounter this error:

Error in eval(expr, envir, enclos) : could not find function "read_html"

5-11-2015 7 43 13 am

Required Packages & Directory

Hi,
I'm very new to R and to Github.
I installed the packages I was missing and ran the code only to find that I was still missing 'gdata' (called on line 154) and 'mapproj' so you may want to add these to the library calls at the top.
Also the code seemed to fail for me as it was trying to write to the 'figures' subdirectory but that directory didn't exist. Adding the directory manually fixed this.
Still working through some other issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.