RBH's Maps (Now, Atlas Election Entry Script & County Map Generation)
       |           

Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 05:00:38 AM
News: Election Simulator 2.0 Released. Senate/Gubernatorial maps, proportional electoral votes, and more - Read more

  Talk Elections
  About this Site
  The Atlas
  RBH's Maps (Now, Atlas Election Entry Script & County Map Generation)
« previous next »
Pages: [1] 2 3 4 5 6 ... 8
Author Topic: RBH's Maps (Now, Atlas Election Entry Script & County Map Generation)  (Read 145069 times)
True Democrat
true democrat
Junior Chimp
*****
Posts: 7,368
United States


Political Matrix
E: 1.10, S: -2.87

Show only this user's posts in this thread
« on: December 30, 2006, 02:20:47 PM »
« edited: February 02, 2010, 09:15:13 PM by Dave Leip »

I think we should find a way to keep RBH's maps and maps made by any other member of the forum.  Putting them on the wiki (hopefully with the data) would be a good way for everyone to look at this information.
Logged
Bleeding heart conservative, HTMLdon
htmldon
Junior Chimp
*****
Posts: 8,983
United States


Political Matrix
E: 1.03, S: -2.26

Show only this user's posts in this thread
« Reply #1 on: December 30, 2006, 08:38:56 PM »

Definately - we need a way of organizing user-created maps.  I suggested something like that to Alcon a few weeks ago but I didn't want to start doing it without help and without suggestions from the forum at-large.
Logged
bgwah
Atlas Icon
*****
Posts: 13,833
United States


Political Matrix
E: -1.03, S: -6.96

Show only this user's posts in this thread
« Reply #2 on: December 30, 2006, 08:44:49 PM »

I think we should find a way to keep RBH's maps and maps made by any other member of the forum.  Putting them on the wiki (hopefully with the data) would be a good way for everyone to look at this information.

I've put a lot of my maps on the Wiki. Just ask Dave for an account.
Logged
nclib
Atlas Icon
*****
Posts: 10,300
United States


Show only this user's posts in this thread
« Reply #3 on: December 30, 2006, 09:10:18 PM »

I think we should find a way to keep RBH's maps and maps made by any other member of the forum.  Putting them on the wiki (hopefully with the data) would be a good way for everyone to look at this information.

I would agree with that.

BTW, is there a way to make county maps like his, without having to use paint?
Logged
ElectionAtlas
Atlas Proginator
YaBB God
*****
Posts: 3,628
United States


P P P
WWW Show only this user's posts in this thread
« Reply #4 on: January 01, 2007, 07:50:23 PM »
« Edited: January 01, 2007, 07:59:46 PM by Dave Leip »

Hi all and Happy New Year:

I've got something that you may like here:  I've created a new datatable for other offices/elections that users can contribute through an upload script and generate county maps.  The upload script is still in development and is located here.  Here are the SC 2002 Races for:

Lt. Governor here

Sec of State here

State Treasurer here

Changes to link the pages from the wiki here

The form looks intimidating at first, but really not bad once you get used to it.  It requires the entry of the year, candidate names and party, the election type (general, rep primary, dem primary), the state, the office, the source info, possible notes for fusion, etc., and a tab-delimited county data file (there is an excel template linked on the input form page to assist you). 

Important: Data file:
only include lines in the tab-delimited file that contain data (no blank lines or title lines)
the tab-deliminted file must have UNIX return characters (there should be an option in the text editor or possibly excel to set this).
one state at a time and must include the fips and name info as shown in the template.

For Referenda, questions, initiatives, etc., the names would be shown like
"Question 5: Yes" with shortname "Yes"
"Question 5: No" with shortname "No"

There is a bunch more work to do to get the linked pages from the election summary to work properly for these elections (will be forthcoming).  Also, credit will be shown on the state summary page for the contributor.  Other offices can be added.

Please submit feedback (feature requests, bugs, etc.)

Enjoy,
Dave
Logged
RBH
Sr. Member
****
Posts: 2,210


Show only this user's posts in this thread
« Reply #5 on: January 02, 2007, 12:53:33 AM »

It only allows you to upload a race once, even if you need to upload it again due to an error.
Logged
RBH
Sr. Member
****
Posts: 2,210


Show only this user's posts in this thread
« Reply #6 on: January 02, 2007, 01:07:26 AM »

Hm. Database problems occur with the upload of a 7 candidate Republican primary map for the Kansas Governor's race from 2006.

The map comes up, but none of the other links go to a working page.

Now that's testing the system.
Logged
RBH
Sr. Member
****
Posts: 2,210


Show only this user's posts in this thread
« Reply #7 on: January 02, 2007, 01:27:58 AM »

And I did get one map posted:

https://uselectionatlas.org/RESULTS/state.php?year=1998&off=7&elect=0&fips=12&f=0

Although the really really long FL SOS page URL didn't come though.
Logged
RBH
Sr. Member
****
Posts: 2,210


Show only this user's posts in this thread
« Reply #8 on: January 02, 2007, 01:41:08 AM »

The messege for when I try to enter corrected data is "Error: This election data is already entered into the database"

And happier days for at least one Texas Democrat:

https://uselectionatlas.org/RESULTS/state.php?year=1994&off=6&elect=0&fips=48&f=0
Logged
RBH
Sr. Member
****
Posts: 2,210


Show only this user's posts in this thread
« Reply #9 on: January 02, 2007, 02:02:02 AM »

And a better day for Max Cleland: https://uselectionatlas.org/RESULTS/state.php?year=1994&off=7&elect=0&fips=13&f=0

and for Mike Bowers too: https://uselectionatlas.org/RESULTS/state.php?year=1994&off=9&elect=0&fips=13&f=0

Mahoney was a little known businessman who talked about being a "classic liberal" and wanting the Attorney General to investigate elections.

Dunn was a former legislator who was little known.
Logged
RBH
Sr. Member
****
Posts: 2,210


Show only this user's posts in this thread
« Reply #10 on: January 02, 2007, 02:43:43 AM »

Ok, either I did something wrong on this entry, or there's something wrong with the script

https://uselectionatlas.org/RESULTS/state.php?year=1984&off=3&elect=0&fips=21&f=0

The map shows up, the results table doesn't
Logged
Alcon
Atlas Superstar
*****
Posts: 30,867
United States


Show only this user's posts in this thread
« Reply #11 on: January 02, 2007, 06:22:34 AM »

Very cool...although I'm a little confused.

I may be doing something entirely wrong, or my software is corrupting the CSV files somehow...but I did them in what I think is the correct format, and I'm still getting failure on everything.  No commas or anything.  I cannot seem to find the place in Excel where the UNIX line character is customised.  RBH, can you help me out here?

I am also getting the inability to upload issue.
Logged
ElectionAtlas
Atlas Proginator
YaBB God
*****
Posts: 3,628
United States


P P P
WWW Show only this user's posts in this thread
« Reply #12 on: January 02, 2007, 11:01:23 AM »

Ok, either I did something wrong on this entry, or there's something wrong with the script

https://uselectionatlas.org/RESULTS/state.php?year=1984&off=3&elect=0&fips=21&f=0

The map shows up, the results table doesn't

Thanks - this was a code error in the State script.  Corrected.
Logged
ElectionAtlas
Atlas Proginator
YaBB God
*****
Posts: 3,628
United States


P P P
WWW Show only this user's posts in this thread
« Reply #13 on: January 02, 2007, 11:03:21 AM »

It only allows you to upload a race once, even if you need to upload it again due to an error.

I've added the ability to over-write the data (if you were the person who entered it).  If you find an error in data that someone else submitted, please post it here, or email me.  This script change deletes all the old data before re-writing it - so be sure that you enter all the info again.
Logged
ElectionAtlas
Atlas Proginator
YaBB God
*****
Posts: 3,628
United States


P P P
WWW Show only this user's posts in this thread
« Reply #14 on: January 02, 2007, 11:08:28 AM »

Very cool...although I'm a little confused.

I may be doing something entirely wrong, or my software is corrupting the CSV files somehow...but I did them in what I think is the correct format, and I'm still getting failure on everything.  No commas or anything.  I cannot seem to find the place in Excel where the UNIX line character is customised.  RBH, can you help me out here?

I am also getting the inability to upload issue.

Hi Alcon,
none of the county data were uploaded - the candidates, sources info show up in the database.  Note, do not use a CSV file, but rather a tab-delimited file.  Try this and let me know if it works.
Thanks,
Dave
Logged
RBH
Sr. Member
****
Posts: 2,210


Show only this user's posts in this thread
« Reply #15 on: January 02, 2007, 12:52:12 PM »

It only allows you to upload a race once, even if you need to upload it again due to an error.

I've added the ability to over-write the data (if you were the person who entered it).  If you find an error in data that someone else submitted, please post it here, or email me.  This script change deletes all the old data before re-writing it - so be sure that you enter all the info again.

I get this messege when I try re-entering info for one race:

"Error: Geographic type Type for Name is not in database. Please check spelling or email Dave

Errors Encountered. Data not entered. Please correct and resubmit."
Logged
ElectionAtlas
Atlas Proginator
YaBB God
*****
Posts: 3,628
United States


P P P
WWW Show only this user's posts in this thread
« Reply #16 on: January 02, 2007, 01:18:08 PM »
« Edited: January 02, 2007, 01:20:35 PM by Dave Leip »

It only allows you to upload a race once, even if you need to upload it again due to an error.

I've added the ability to over-write the data (if you were the person who entered it).  If you find an error in data that someone else submitted, please post it here, or email me.  This script change deletes all the old data before re-writing it - so be sure that you enter all the info again.

I get this messege when I try re-entering info for one race:

"Error: Geographic type Type for Name is not in database. Please check spelling or email Dave

Errors Encountered. Data not entered. Please correct and resubmit."

Hi,
This means that one of the geographic county types is not in my database.  The third column in the data file is the type of geographic unit (State, County, Parish, City are examples).  If any of these does not match an entry in my database (or is misspelled), it will generate this error.  Do you have other names in the list of data? 

It looks like in this case, the top row (label row) is in your data file. Be sure that you have deleted the label row and include only data lines in the file.
Thanks,
Dave
Logged
ElectionAtlas
Atlas Proginator
YaBB God
*****
Posts: 3,628
United States


P P P
WWW Show only this user's posts in this thread
« Reply #17 on: January 02, 2007, 02:29:59 PM »

Also note: avoid posting Gubernatorial and Senatorial contests in the 1990s as they will be added in bulk soon.
Dave
Logged
RBH
Sr. Member
****
Posts: 2,210


Show only this user's posts in this thread
« Reply #18 on: January 02, 2007, 02:44:18 PM »

Also note: avoid posting Gubernatorial and Senatorial contests in the 1990s as they will be added in bulk soon.
Dave
Texas Tresurer Races are fair game though: https://uselectionatlas.org/RESULTS/state.php?year=1994&off=8&elect=0&fips=48&f=0

Texas data is pretty easy to gather. Nothing like the Mississippi data (the ones that are still on photocopied handwritten precinct returns)
Logged
ElectionAtlas
Atlas Proginator
YaBB God
*****
Posts: 3,628
United States


P P P
WWW Show only this user's posts in this thread
« Reply #19 on: January 02, 2007, 02:47:49 PM »

  I cannot seem to find the place in Excel where the UNIX line character is customised. 

For new line translation, I use BBEdit (there is also a free version called TextWrangler) from Barebones on the Mac.  For PC/Linux land and MacOS X there is a small utility called flip to convert windows/mac newline characters to UNIX:

http://ccrma-www.stanford.edu/~craig/utility/flip/

Other options from the PC users?
Thanks,
Dave
Logged
ElectionAtlas
Atlas Proginator
YaBB God
*****
Posts: 3,628
United States


P P P
WWW Show only this user's posts in this thread
« Reply #20 on: January 02, 2007, 02:59:04 PM »

Also note: avoid posting Gubernatorial and Senatorial contests in the 1990s as they will be added in bulk soon.
Dave
Texas Tresurer Races are fair game though: https://uselectionatlas.org/RESULTS/state.php?year=1994&off=8&elect=0&fips=48&f=0

Texas data is pretty easy to gather. Nothing like the Mississippi data (the ones that are still on photocopied handwritten precinct returns)


Yeah, Texas, Florida, Kentucky, South Carolina, Georgia, among others have easily-accessible data for state-wide races in the 1990s/00s and are fast to add using the new script.  And think of all the time saved by not needing to color the counties with Paint ! Smiley
Logged
RBH
Sr. Member
****
Posts: 2,210


Show only this user's posts in this thread
« Reply #21 on: January 02, 2007, 04:44:47 PM »

I've actually gotten pretty good at coloring Missouri in paint.

Places like Texas and Georgia are massive paints to manually color though.

Looks like Louisiana should be surprisingly easy too, considering that they have 9 different counties starting in St. (but the only other S county is Sabine).

Granted, Louisiana results also include having to creatively re-sort the results due to the table they have.

Missouri's results are also pretty good, although there's some column deleting required. And the initative results have spaces after the number for one column and spaces before the number in the other.

Kansas has their results back to 1990 and the older stuff is in some sort of .exe zip-ish file that just creates an .xls
Logged
ElectionAtlas
Atlas Proginator
YaBB God
*****
Posts: 3,628
United States


P P P
WWW Show only this user's posts in this thread
« Reply #22 on: January 02, 2007, 06:44:06 PM »
« Edited: January 02, 2007, 06:53:56 PM by Dave Leip »

Another tip.  In the data file, be sure to replace any commas in vote numbers (such as 7,900 votes) with "nothing" and not space (needs to be 7900 and not 7 900).  Another way to do this is to format the data in excel as "General" prior to saving as tab-delimited .txt file.

I've also reposted the template xls file to change the formatting of the vote columns to "General"
Thanks,
Dave
Logged
bgwah
Atlas Icon
*****
Posts: 13,833
United States


Political Matrix
E: -1.03, S: -6.96

Show only this user's posts in this thread
« Reply #23 on: January 02, 2007, 06:55:07 PM »


Error: Geographic type Type for Name is not in database. Please check spelling or email Dave

Check to be sure that the header row has been removed from the data file (data file should only include county, city, and state-level data rows and no column titles)
Errors Encountered. Data not entered. Please correct and resubmit.



I get that error now. I was using OpenOffice before and there was no .txt option, so now I am using Excel and saving it as tab-delimited .txt file and still having trouble.
Logged
RBH
Sr. Member
****
Posts: 2,210


Show only this user's posts in this thread
« Reply #24 on: January 02, 2007, 07:00:39 PM »

Does your file start with the results from a county, and not the listing of what is in which column?

And what I was doing in Excel to get rid of the commas was typing in one uncomma'ed number, and then I'd cover all the numbers, and press 'increase decimal' and it gets rid of the commas.
Logged
Pages: [1] 2 3 4 5 6 ... 8  
« previous next »
Jump to:  


Login with username, password and session length

Terms of Service - DMCA Agent and Policy - Privacy Policy and Cookies

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Page created in 0.051 seconds with 13 queries.