Welcome, Guest. Please login or register.
Did you miss your activation email?
September 17, 2014, 06:35:15 pm
HomePredMockPollEVCalcAFEWIKIHelpLogin Register
News: Don't forget to get your 2013 Gubernatorial Endorsements and Predictions in!

+  Atlas Forum
|-+  Questions and Answers
| |-+  The Atlas
| | |-+  RBH's Maps (Now, Atlas Election Entry Script & County Map Generation)
« previous next »
Pages: [1] 2 3 4 5 6 ... 8 Print
Author Topic: RBH's Maps (Now, Atlas Election Entry Script & County Map Generation)  (Read 42675 times)
True Democrat
true democrat
YaBB God
*****
Posts: 7485
United States


Political Matrix
E: 1.10, S: -2.87

View Profile
« on: December 30, 2006, 02:20:47 pm »
Ignore

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.
« Last Edit: February 02, 2010, 09:15:13 pm by Dave Leip »Logged

Michael Bloomberg for President.



Lol Winfield.  This quote is from a thread entitled "what do the following proceed to do if they are not nominated?"
Romney - President of Harvard
Bleeding heart conservative, HTMLdon
htmldon
YaBB God
*****
Posts: 8875
United States


Political Matrix
E: 1.03, S: -2.26

View Profile
« Reply #1 on: December 30, 2006, 08:38:56 pm »
Ignore

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
YaBB God
*****
Posts: 13742
United States


Political Matrix
E: -1.03, S: -6.96

View Profile
« Reply #2 on: December 30, 2006, 08:44:49 pm »
Ignore

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
YaBB God
*****
Posts: 8790


View Profile
« Reply #3 on: December 30, 2006, 09:10:18 pm »
Ignore

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



[George W. Bush] has shattered the myth of white supremacy once and for all. -- Congressman Charles Rangel (D-NY)

"George Bush supports abstinence. Lucky Laura."
- sign seen at the March for Women's Lives, 4/25/04

Dave Leip
leip
Administrator
YaBB God
*****
Posts: 2345
United States


View Profile WWW
« Reply #4 on: January 01, 2007, 07:50:23 pm »

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
« Last Edit: January 01, 2007, 07:59:46 pm by Dave Leip »Logged
RBH
YaBB God
*****
Posts: 2069


View Profile
« Reply #5 on: January 02, 2007, 12:53:33 am »
Ignore

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

RBH
RBH
YaBB God
*****
Posts: 2069


View Profile
« Reply #6 on: January 02, 2007, 01:07:26 am »
Ignore

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
RBH
YaBB God
*****
Posts: 2069


View Profile
« Reply #7 on: January 02, 2007, 01:27:58 am »
Ignore

And I did get one map posted:

http://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
RBH
YaBB God
*****
Posts: 2069


View Profile
« Reply #8 on: January 02, 2007, 01:41:08 am »
Ignore

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:

http://uselectionatlas.org/RESULTS/state.php?year=1994&off=6&elect=0&fips=48&f=0
Logged

RBH
RBH
YaBB God
*****
Posts: 2069


View Profile
« Reply #9 on: January 02, 2007, 02:02:02 am »
Ignore

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

and for Mike Bowers too: http://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
RBH
YaBB God
*****
Posts: 2069


View Profile
« Reply #10 on: January 02, 2007, 02:43:43 am »
Ignore

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

http://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

RBH
Grad Students are the Worst
Alcon
Moderators
YaBB God
*****
Posts: 29661
United States
View Profile
« Reply #11 on: January 02, 2007, 06:22:34 am »
Ignore

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

n/c
Dave Leip
leip
Administrator
YaBB God
*****
Posts: 2345
United States


View Profile WWW
« 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

http://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
Dave Leip
leip
Administrator
YaBB God
*****
Posts: 2345
United States


View Profile WWW
« 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
Dave Leip
leip
Administrator
YaBB God
*****
Posts: 2345
United States


View Profile WWW
« 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
YaBB God
*****
Posts: 2069


View Profile
« Reply #15 on: January 02, 2007, 12:52:12 pm »
Ignore

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

RBH
Dave Leip
leip
Administrator
YaBB God
*****
Posts: 2345
United States


View Profile WWW
« Reply #16 on: January 02, 2007, 01:18:08 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."

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
« Last Edit: January 02, 2007, 01:20:35 pm by Dave Leip »Logged
Dave Leip
leip
Administrator
YaBB God
*****
Posts: 2345
United States


View Profile WWW
« 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
YaBB God
*****
Posts: 2069


View Profile
« Reply #18 on: January 02, 2007, 02:44:18 pm »
Ignore

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: http://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

RBH
Dave Leip
leip
Administrator
YaBB God
*****
Posts: 2345
United States


View Profile WWW
« 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
Dave Leip
leip
Administrator
YaBB God
*****
Posts: 2345
United States


View Profile WWW
« 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: http://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
YaBB God
*****
Posts: 2069


View Profile
« Reply #21 on: January 02, 2007, 04:44:47 pm »
Ignore

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

RBH
Dave Leip
leip
Administrator
YaBB God
*****
Posts: 2345
United States


View Profile WWW
« Reply #22 on: January 02, 2007, 06:44:06 pm »

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
« Last Edit: January 02, 2007, 06:53:56 pm by Dave Leip »Logged
bgwah
YaBB God
*****
Posts: 13742
United States


Political Matrix
E: -1.03, S: -6.96

View Profile
« Reply #23 on: January 02, 2007, 06:55:07 pm »
Ignore


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
YaBB God
*****
Posts: 2069


View Profile
« Reply #24 on: January 02, 2007, 07:00:39 pm »
Ignore

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

RBH
Pages: [1] 2 3 4 5 6 ... 8 Print 
« previous next »
Jump to:  


Login with username, password and session length

Logout

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines