Coder Social home page Coder Social logo

Comments (13)

 avatar commented on September 26, 2024 1

i think that the problem of AK is that there aren't data per county but for district

from presidential_election_county_results_2016.

 avatar commented on September 26, 2024 1

btw, i just asked before: what source did you use for this data? nyt? associated press? web scraping?

from presidential_election_county_results_2016.

BillPetti avatar BillPetti commented on September 26, 2024

I had the same question--would love to update given the additional votes now being counted, particularly in CA.

from presidential_election_county_results_2016.

mkearney avatar mkearney commented on September 26, 2024

I'll run the script and update the data a little later today!

from presidential_election_county_results_2016.

hrbrmstr avatar hrbrmstr commented on September 26, 2024

Adding on to this since I'd really like to know why there are invalid U.S. county FIPS codes (like 02000 in Alaska). I know many states do not actually align electoral results to counties, so i'm not shocked by a discrepancy, but aggregating and labeling as FIPS when it's not really FIPS seems to be not a great idea IMO.

from presidential_election_county_results_2016.

mkearney avatar mkearney commented on September 26, 2024

You mean the leading zero? If so you can treat that column as an integer and that should fix the problem. I'm traveling today so haven't had time at computer for a bit.

from presidential_election_county_results_2016.

hrbrmstr avatar hrbrmstr commented on September 26, 2024

No, not leading 0's. Alaska does not have a county with w FIPS code of 02000 (there are other ones that also do not exist as actual counties)

from presidential_election_county_results_2016.

BillPetti avatar BillPetti commented on September 26, 2024

Those are codes that represent the state totals, I believe. Anything where last three digits is 000 should be the state aggregated.

from presidential_election_county_results_2016.

hrbrmstr avatar hrbrmstr commented on September 26, 2024
   cand_id          cand_name  votes  total state  fips         pct state_fips county_fips county_name fips_class
     <chr>              <chr>  <int>  <int> <chr> <chr>       <dbl>      <chr>       <chr>       <chr>      <chr>
1   AK6638       Donald Trump 130415 246588    AK 02000 0.528878129       <NA>        <NA>        <NA>       <NA>
2   AK6637    Hillary Clinton  93007 246588    AK 02000 0.377175694       <NA>        <NA>        <NA>       <NA>
3   AK6641       Gary Johnson  14593 246588    AK 02000 0.059179684       <NA>        <NA>        <NA>       <NA>
4   AK6642         Jill Stein   4445 246588    AK 02000 0.018026019       <NA>        <NA>        <NA>       <NA>
5   AK6639     Darrell Castle   3156 246588    AK 02000 0.012798676       <NA>        <NA>        <NA>       <NA>
6   AK6648 Rocky De La Fuente    972 246588    AK 02000 0.003941798       <NA>        <NA>        <NA>       <NA>
7  SD47679    Hillary Clinton   2504   2896    SD 46102 0.864640884       <NA>        <NA>        <NA>       <NA>
8  SD47682       Donald Trump    241   2896    SD 46102 0.083218232       <NA>        <NA>        <NA>       <NA>
9  SD47831       Gary Johnson    104   2896    SD 46102 0.035911602       <NA>        <NA>        <NA>       <NA>
10 SD47832     Darrell Castle     47   2896    SD 46102 0.016229282       <NA>        <NA>        <NA>       <NA>

those are the invalid ones.

from presidential_election_county_results_2016.

mkearney avatar mkearney commented on September 26, 2024

Correct. State totals are included.

from presidential_election_county_results_2016.

hrbrmstr avatar hrbrmstr commented on September 26, 2024

aye @andriaz, hence my suggestion to not aggregate them under a FIPS label. (Since 46102 is obviously not a 000 state level aggregation #).

from presidential_election_county_results_2016.

 avatar commented on September 26, 2024

@mkearney thank you

from presidential_election_county_results_2016.

mkearney avatar mkearney commented on September 26, 2024

@hrbrmstr Looks like that may be error related to recently renamed county (SD Oglala Lakota County)?

from presidential_election_county_results_2016.

Related Issues (5)

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.