Home
2012
Election Results
Election Info
Weblog
Wiki
Search
Email
Site Info
Store
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
June 19, 2013, 02:34:57 am
News:
Please delete your old personal messages.
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
7
8
Author
Topic: RBH's Maps (Now, Atlas Election Entry Script & County Map Generation) (Read 36624 times)
Dave Leip
leip
Administrator
YaBB God
Posts: 2096
Re: RBH's Maps
«
Reply #25 on:
January 02, 2007, 07:09:35 pm »
Quote from: Jesus 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.
This error means you have extra "stuff" in your data file. In the case of WA 1972, you have two issues: the column headers are still in the file (first row) and second, all U.S. Counties are in the file when all you want to enter is Washington. The data file needs to be just the data you are entering, no more, no less. In your case, the first piece of data in the file needs to be 53001.
What I do is highlight the data from the state I want and copy it to a new blank spreadsheet then simply choose save as tab-delimited text.
I'll think a bit so see if we can make this more versatile. I'm also now going to try open office and get back to you on its potential.
Thanks. and thanks for the patience and help here to make this better.
Dave
Logged
Dave Leip
leip
Administrator
YaBB God
Posts: 2096
Re: RBH's Maps
«
Reply #26 on:
January 02, 2007, 07:17:44 pm »
Open Office can save as tab-delimited - you have to choose csv (.txt) and then in the next step, it gives you a choice for delimit character (choose {tab}). However, it also requires you to choose a text character (" or '). These would need to be stripped out of the file (I think).
Logged
bgwah
YaBB God
Posts: 13447
Political Matrix
E: -4.52, S: -8.17
Re: RBH's Maps
«
Reply #27 on:
January 02, 2007, 07:19:40 pm »
Thanks, I finally got it to work using Excel. I deleted the top row with the party names and all of the other states. The tables don't work, but I think RBH already mentioned that.
http://uselectionatlas.org/RESULTS/state.php?year=1972&off=5&elect=0&fips=53&f=0
The third party button doesn't work either.
For idiots like me using Excel:
-Select all of the data, right-click format cells, and click "number," there is a check-box to turn off automatic commas. You could also try the "general" thing Dave mentioned earlier.
-There is a plus sign to the left of the states that you click to show the counties of that state (Rob
)
-Delete all states other than the one you entered data for
-Delete the top row where the party names are.
-Save as, save as type tab-delimited .txt
Logged
Rob
Bob
YaBB God
Posts: 6343
Political Matrix
E: -6.32, S: -9.39
Re: RBH's Maps
«
Reply #28 on:
January 02, 2007, 07:31:32 pm »
I made one:
Oklahoma Lt. Governor [2006]
Great feature, Dave!
Logged
Here’s what Sarah Palin represents: being a fat
fu
cking pig who pins “Country First” buttons on his man titties and chants “U-S-A! U-S-A!” at the top of his lungs while his kids live off credit cards and Saudis buy up all the mortgages in Kansas.
Shilly
YaBB God
Posts: 531
Political Matrix
E: -5.68, S: -4.00
Re: RBH's Maps
«
Reply #29 on:
January 02, 2007, 07:50:23 pm »
Created one too.
Here it is:
http://uselectionatlas.org/RESULTS/state.php?year=2002&off=8&elect=0&fips=17&f=0
Logged
bgwah
YaBB God
Posts: 13447
Political Matrix
E: -4.52, S: -8.17
Re: RBH's Maps
«
Reply #30 on:
January 02, 2007, 08:06:34 pm »
Tried doing the 2004 Washington Democratic Primary for Governor. The page I got after I hit upload showed the map (
http://uselectionatlas.org/SCRIPTS/gen_county_map.php?year=2004&off=5&elect=1&fips=53
) but the first link to the summary page took me to the 2004 General Election page, and the rest of the links did not work.
Logged
Grad Students are the Worst
Alcon
Moderators
YaBB God
Posts: 31293
Re: RBH's Maps
«
Reply #31 on:
January 02, 2007, 08:38:27 pm »
Excellent. I got it to work, with the tables working too...but the "county data by graphs" function seems to error out.
Logged
n/c
Dave Leip
leip
Administrator
YaBB God
Posts: 2096
Re: RBH's Maps
«
Reply #32 on:
January 02, 2007, 08:48:17 pm »
Most of the linked pages are still a work in progress to get them to look for the data in the new upload table. I've also disabled the "Primary" election choice for now until I can get a better handle on presenting the data. It'll be back.
Another suggestion:
Please limit the "Independent" row for true "independent" candidates (typically a strong showing). Libertarian, Green, US Taxpayers/Constitution, etc. are better in slots 4, 5, etc.
You can also see the most recent list of contributed election content
here
These contests will also show up in the state election page, such as:
here
Thanks,
Dave
«
Last Edit: January 02, 2007, 08:50:33 pm by Dave Leip
»
Logged
Wrecking Ball and Chain
BRTD
YaBB God
Posts: 68306
Re: RBH's Maps
«
Reply #33 on:
January 02, 2007, 08:57:51 pm »
Wow, I'll probably be addicted all night making Minnesota maps.
Logged
Grad Students are the Worst
Alcon
Moderators
YaBB God
Posts: 31293
Re: RBH's Maps
«
Reply #34 on:
January 02, 2007, 09:29:07 pm »
Another minor bug:
Third-party maps are broken
(Libertarian broke 10% in Skamania County)
Logged
n/c
Rob
Bob
YaBB God
Posts: 6343
Political Matrix
E: -6.32, S: -9.39
Re: RBH's Maps
«
Reply #35 on:
January 02, 2007, 10:22:37 pm »
Dave, the green on
this initiative map
doesn't appear. I don't know if it was my error or a site glitch.
Logged
Here’s what Sarah Palin represents: being a fat
fu
cking pig who pins “Country First” buttons on his man titties and chants “U-S-A! U-S-A!” at the top of his lungs while his kids live off credit cards and Saudis buy up all the mortgages in Kansas.
Wrecking Ball and Chain
BRTD
YaBB God
Posts: 68306
Re: RBH's Maps
«
Reply #36 on:
January 02, 2007, 10:29:29 pm »
Here's my first shot at it:
http://uselectionatlas.org/RESULTS/state.php?fips=27&year=2006&f=0&off=9&elect=0
That's the Minnesota AG race this year.
Map works pretty good, so does the tables, but not graphs or individual county data, although appears to be the case with other maps.
Logged
Dave Leip
leip
Administrator
YaBB God
Posts: 2096
Re: RBH's Maps
«
Reply #37 on:
January 02, 2007, 10:44:35 pm »
Quote from: Alcon on January 02, 2007, 09:29:07 pm
Another minor bug:
Third-party maps are broken
(Libertarian broke 10% in Skamania County)
This has been fixed. If a minor party receives > 5%, they get their own map.
Logged
Dave Leip
leip
Administrator
YaBB God
Posts: 2096
Re: RBH's Maps
«
Reply #38 on:
January 02, 2007, 10:45:05 pm »
Quote from: Rob on January 02, 2007, 10:22:37 pm
Dave, the green on
this initiative map
doesn't appear. I don't know if it was my error or a site glitch.
This glitch happend while I was fixing Alcon's bug. Corrected.
Logged
Rob
Bob
YaBB God
Posts: 6343
Political Matrix
E: -6.32, S: -9.39
Re: RBH's Maps
«
Reply #39 on:
January 02, 2007, 10:46:32 pm »
Thanks.
Logged
Here’s what Sarah Palin represents: being a fat
fu
cking pig who pins “Country First” buttons on his man titties and chants “U-S-A! U-S-A!” at the top of his lungs while his kids live off credit cards and Saudis buy up all the mortgages in Kansas.
Wrecking Ball and Chain
BRTD
YaBB God
Posts: 68306
Re: RBH's Maps
«
Reply #40 on:
January 02, 2007, 10:50:18 pm »
As practice, I decided to do an easy race in a state with not many counties. So here's AZ Attorney General this year:
http://uselectionatlas.org/RESULTS/state.php?year=2006&off=9&elect=0&fips=4&f=0
Logged
Grad Students are the Worst
Alcon
Moderators
YaBB God
Posts: 31293
Re: RBH's Maps
«
Reply #41 on:
January 02, 2007, 10:59:45 pm »
God bless SoS Sam Reed for putting county results for Washington up back to 1970.
I'll be up all night too.
Thanks again, Dave!
«
Last Edit: January 02, 2007, 11:03:14 pm by Alcon
»
Logged
n/c
Dave Leip
leip
Administrator
YaBB God
Posts: 2096
Re: RBH's Maps
«
Reply #42 on:
January 02, 2007, 11:03:26 pm »
Quote from: Senator BRTD on January 02, 2007, 10:29:29 pm
Here's my first shot at it:
http://uselectionatlas.org/RESULTS/state.php?fips=27&year=2006&f=0&off=9&elect=0
That's the Minnesota AG race this year.
Map works pretty good, so does the tables, but not graphs or individual county data, although appears to be the case with other maps.
Hi,
One error here - the "Write-ins" are listed as being column 10, but the datafile includes them under column 5 - so they don't show up. I'm going to add a check to the script to catch this. Also, what is the source of the 633 vote switch? any idea? a single county data transposed?
Logged
Dave Leip
leip
Administrator
YaBB God
Posts: 2096
Re: RBH's Maps
«
Reply #43 on:
January 02, 2007, 11:04:27 pm »
Don't forget to take your time with the data. Quality counts!
Logged
Wrecking Ball and Chain
BRTD
YaBB God
Posts: 68306
Re: RBH's Maps
«
Reply #44 on:
January 02, 2007, 11:23:53 pm »
Quote from: Dave Leip on January 02, 2007, 11:03:26 pm
Quote from: Senator BRTD on January 02, 2007, 10:29:29 pm
Here's my first shot at it:
http://uselectionatlas.org/RESULTS/state.php?fips=27&year=2006&f=0&off=9&elect=0
That's the Minnesota AG race this year.
Map works pretty good, so does the tables, but not graphs or individual county data, although appears to be the case with other maps.
Hi,
One error here - the "Write-ins" are listed as being column 10, but the datafile includes them under column 5 - so they don't show up. I'm going to add a check to the script to catch this. Also, what is the source of the 633 vote switch? any idea? a single county data transposed?
I'm not sure, the map is the same was one I made earlier so all the counties got the winner's right unless I made an error in the first one. I'll look through it later and try to find the error. And yes, I made that error with the Write-Ins but it appears they just appeared under a blank table. I'll make sure not to do that on any future ones, on the one I'm doing now I have Write-Ins under column 5 with 4 candidates.
Logged
Dave Leip
leip
Administrator
YaBB God
Posts: 2096
Re: RBH's Maps
«
Reply #45 on:
January 02, 2007, 11:25:27 pm »
Quote from: Senator BRTD on January 02, 2007, 10:50:18 pm
As practice, I decided to do an easy race in a state with not many counties. So here's AZ Attorney General this year:
http://uselectionatlas.org/RESULTS/state.php?year=2006&off=9&elect=0&fips=4&f=0
Great!
Feedback:
Arizona is very good with regard to source information: in this case, the title should be "State of Arizona Official Canvass 2006 General Election - November 7\, 2006". I've made this change.
Dave
Logged
Wrecking Ball and Chain
BRTD
YaBB God
Posts: 68306
Re: RBH's Maps
«
Reply #46 on:
January 02, 2007, 11:28:59 pm »
OK, I found the error, the totals in Becker county are transposed.
Logged
Dave Leip
leip
Administrator
YaBB God
Posts: 2096
Re: RBH's Maps
«
Reply #47 on:
January 02, 2007, 11:43:36 pm »
Quote from: Senator BRTD on January 02, 2007, 11:28:59 pm
OK, I found the error, the totals in Becker county are transposed.
Great. You should be able to over-write the data with the corrected data. Thanks for checking! Quality is important in elections
Logged
RBH
YaBB God
Posts: 2088
Re: RBH's Maps
«
Reply #48 on:
January 02, 2007, 11:54:40 pm »
Quote from: Alcon on January 02, 2007, 10:59:45 pm
God bless SoS Sam Reed for putting county results for Washington up back to 1970.
I'll be up all night too.
Thanks again, Dave!
Washington has an odd format, at least for the 1980 primary results.
Logged
RBH
Wrecking Ball and Chain
BRTD
YaBB God
Posts: 68306
Re: RBH's Maps
«
Reply #49 on:
January 02, 2007, 11:59:55 pm »
OK, new data is up, looks good but a minor error: The default format for the table is not in alphabetical order
Logged
Pages:
1
[
2
]
3
4
5
6
7
8
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Presidential Elections - Analysis and Discussion
-----------------------------
=> 2016 U.S. Presidential Election
===> 2016 U.S. Presidential General Election Polls
===> 2016 U.S. Presidential Primary Election Polls
=> U.S. Presidential Election Results
===> 2012 U.S. Presidential Election Results
===> 2008 U.S. Presidential Election Results
===> 2004 U.S. Presidential Election Results
===> 2000 U.S. Presidential Election Results
=> Presidential Election Trends
=> Election What-ifs?
===> Past Election What-ifs (US)
===> Alternative Elections
===> International What-ifs
-----------------------------
Other Elections - Analysis and Discussion
-----------------------------
=> Gubernatorial/Statewide Elections
===> 2013 & Odd Year Gubernatorial Election Polls
===> 2014 Gubernatorial Election Polls
=> Congressional Elections
===> 2014 Senatorial Election Polls
=> International Elections
=> Election Predictions
-----------------------------
Questions and Answers
-----------------------------
=> Presidential Election Process
===> Electoral Reform
===> Polling
=> The Atlas
===> How To
-----------------------------
General Discussion
-----------------------------
=> Constitution and Law
=> Religion & Philosophy
=> History
===> Alternative History
-----------------------------
General Politics
-----------------------------
=> U.S. General Discussion
=> Political Geography & Demographics
=> International General Discussion
=> Economics
=> Individual Politics
=> Political Debate
===> Political Essays & Deliberation
===> Book Reviews and Discussion
-----------------------------
Election Archive
-----------------------------
=> 2012 Elections
===> 2012 Senatorial Election Polls
===> 2012 House Election Polls
===> 2012 U.S. Presidential Primary Election Polls
===> 2012 U.S. Presidential General Election Polls
===> 2012 Gubernatorial Election Polls
=> 2010 Elections
===> 2010 House Election Polls
===> 2010 Senatorial Election Polls
===> 2010 Gubernatorial Election Polls
=> 2008 Elections
===> 2008 Senatorial Election Polls
===> 2008 Gubernatorial Election Polls
===> 2008 U.S. Presidential Election Campaign
===> 2008 U.S. Presidential General Election Polls
===> 2008 U.S. Presidential Primary Election Polls
=> 2004 U.S. Presidential Election
===> 2004 U.S. Presidential Election Campaign
===> 2004 U.S. Presidential Election Polls
=> 2006 Elections
===> 2006 Senatorial Election Polls
===> 2006 Gubernatorial Election Polls
-----------------------------
Forum Community
-----------------------------
=> Forum Community
===> Forum Community Election Match-ups
=> Election and History Games
===> Mock Parliment
===> Town Hall
===> Survivor
===> Interactive Timelines
=> Off-topic Board
-----------------------------
Atlas Fantasy Elections
-----------------------------
=> Atlas Fantasy Elections
===> Voting Booth
=> Atlas Fantasy Government
===> Constitutional Convention
===> Regional Governments
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.18
|
SMF © 2013, Simple Machines
Loading...