presidential-precinct-map-2020
The GeoJSON dataset behind our nationwide precinct map of the 2020 presidential general election (by TheUpshot)
sf
Simple Features for R (by r-spatial)
presidential-precinct-map-2020 | sf | |
---|---|---|
10 | 17 | |
171 | 1,278 | |
0.0% | 1.0% | |
0.0 | 9.4 | |
about 3 years ago | 11 days ago | |
R | ||
MIT License | GNU General Public License v3.0 or later |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
presidential-precinct-map-2020
Posts with mentions or reviews of presidential-precinct-map-2020.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-03-31.
-
Daily Discussion Thread: September 14, 2021
Here is a link explaining why some states are incomplete. The NYTimes map is by precinct and some states report results by county or township instead of precinct. Therefore, the data is incompatible with the map.
-
Weekly Discussion Thread - Monday, June 28, 2021
The Times specifies in their “about the data” Github page why the remaining data won’t be displayed, since those lazy fuckers didn’t go as far as the 20-something giganerd did to assemble the entire nation’s data.
-
Importing geojson data into R
I'm trying to use the NYT precinct-level election results for an analysis in R, but having difficulty loading the data. The github post for the data is located here. And the data can be downloaded here.
-
Months after Trump complaints, some courts are finding irregularities in 2020 elections
Before you assume things are impossible, I’d highly recommend you actually look at the data for yourself. This dataset has actual precinct by precinct outcomes and you can see that it is absolutely expected that some precincts will vote overwhelmingly (98+%) for one candidate. Of course, if you believe you’ve found the story of the century (and it would be) that there was a precinct that had 10,000+ plus votes that were 100% for one candidate, I’m all ears.
-
Incredibly detailed map, almost to the block,of the 2020 Presidential Election votes
I posted a link, which was from the NYTime's graphic, about the data. This is the github link ("About Data") from the black box in the upper left corner of the page. https://www.nytimes.com/interactive/2021/upshot/2020-election-map.html?referringSource=articleShare
- The New York Times just released its map of the 2020 election results down to the precinct level.
-
Looking to find a way to scrape precinct level data if possible.
The data is here: https://github.com/TheUpshot/presidential-precinct-map-2020
-
Daily Discussion Thread: February 2, 2021
Ah, yeah, they actually give all the details on their github here.
-
Bluest precinct in Seattle?
They released the underlying data that you can parse yourself if you wanted: https://github.com/TheUpshot/presidential-precinct-map-2020
sf
Posts with mentions or reviews of sf.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-08-11.
-
Visualizing shapefiles in R with sf and ggplot2!
sf
- Ask HN: What are some of the most elegant codebases in your favorite language?
- Learning How to Use "Road Network" Files
-
[Q] Book suggestion for Spatial Statistics / Geostatistics
Before learning about geostatistics, do you feel comfortable working with and exploring geospatial data? If not, I'd highly recommend getting comfortable with the sf package in R. It's an implementation of the OpenGIS standard in R tidyverse. The OpenGIS standard defines specific data types and functions for geospatial data, which means that you can read e.g. PostGIS documentation and use the same functions in R.
-
People who live near other people vote for Democrats
Tools used: various packages in R (tidycensus, dplyr, ggplot2, sf)
-
Calculate Distance From a Specific Coordinate to a Shapefile?
R supports working with spatial data really well; you should look into the sf-package: https://r-spatial.github.io/sf/
-
[Q] Recommendations for Spatial Analysis Books with R
A lot of the books are out if date because geospatial has been rewritten from the ground up to be dramatically improved. I would focus on the sf package: https://r-spatial.github.io/sf/. I would also find a PostGIS book which sf shares many functions and learn to the the database when appropriate.
-
Overlay Grid on Shapefile
Are you using the sf package? I envision running a loop that creates a vector feature for each cell of the raster grid, intersects that feature with the underlying shapefile, multiplies the area of each intersected portion by its value, and assigns the raster the mean of those values. Kind of a lot to set up, but I'm not a master at this so maybe someone else knows a more straightforward method
-
is that possible to find check, a point in or out in a geojson on R
I found this: https://github.com/r-spatial/sf/issues/1595
-
Converting distance/azimuth to a real position
Now that I explained the concept, I will show some R code using the sf library to achieve this. sf stands for simple features and it's a very nice library for working with geospatial data.
What are some alternatives?
When comparing presidential-precinct-map-2020 and sf you can also consider the following projects:
tmap - R package for thematic maps
ggmap - A package for plotting maps in R with ggplot2
awesome-R - A curated list of awesome R packages, frameworks and software.
dplyr - dplyr: A grammar of data manipulation
ggfx - Filters and Shaders for 'ggplot2'
rmarkdown - Dynamic Documents for R
report - :scroll: :tada: Automated reporting of objects in R
tidycensus - Load US Census boundary and attribute data as 'tidyverse' and 'sf'-ready data frames in R
evaluate - A version of eval for R that returns more information about what happened
namedropR - R package namedropR
cl-ppcre - Common Lisp regular expression library
expotools - Useful methods for Exposome research.