Displaying 20 results from an estimated 400 matches similar to: "calculate out of different lists in R"
2005 Dec 14
3
Geocode for Ruby
Hey,
Does anybody know of a good Geocode library for Ruby, similar to Perl''s
Geocode::Postal, that i could use in my rail app? I need to do some "within
5 miles" calculations of zipcodes and i dont have a nice ruby (or gem)
utility to do it.
any help would be appreciated.
thanks
adam
_______________________________________________
Rails mailing list
2009 Dec 14
1
lapply , mapply questions
Dear all,
i have a programming problem that should be simple, though i am stuck with it. Please note that this is not a specific geonames problem, though i use it as an example - it´s just a basic problem with lapply.
I use the geonames webservices with the R geonames packages which works almost smoothly.
I have a vector of Zipcodes and i want to do a geonames lookup for all of them, which
2011 Jun 14
1
Invalid Regular Expression
I'm working with some data, and am trying to generate it in the following
format.
state city zipcode
I like pizza 0 0 0
I live in Denver 0 1 0
All the fun stuff is in Alaska 1 0 0
he lives in 66062
2007 Nov 01
5
monster method (too hard for my skill level)
I need to write a method for calculating the fee for medical
procedures with respect to area. I have all the tables and data but
its hard to give that here. Can someone take a look at this ''stub''
method and help me out?
def calculate_fee
# strip out the first 3 numbers of the user entered zip code
# use those 3 numbers to identify row in [zipcodes table] (between
upper and
2006 Feb 03
4
Zipcode Search
Is there any package that I could use for zipcode search.
I want to display schools that near a particular zipcode. I have no idea how
to do this. It will be great if anyone can point me where I could find info
--
Rgds,
--Siva Jagadeesan
http://www.varcasa.com/
Education Through Collabration
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2005 Jun 10
6
us zipcode data map
i've search the email archives, searched the documention
of various map packages and done an R-site search, but
have been unable to find direct resources for creating maps
of the US that are colored or annotated or ... by zipcode
data.
For example, create a map of the US and color each zipcode
region by its population using two vectors z,p containing the
zipcode and population,
2006 Jun 18
3
ActiveRecord Help - Not finding Data
Hello,
I''m farily new to RoR and am having a problem trying to retrieve data
from my database. Here is the code from my controller:
def index
zip = params["zip"]
@zip1 = Zipcode.find(:first, :conditions => ["zip = ?", zip])
lat = @zip1.latitude.to_f
long = @zip1.longitude.to_f
radius = 50
@bookstores = Bookstore.find_by_sql ["SELECT * FROM
2010 Jun 15
1
Error when callin g C-Code
Hi
when I call the function below in R, i get the error: Object 'pairlist'
can't be converted to 'double'.
#include <R.h>
#include <Rdefines.h>
#include <Rmath.h>
SEXP CSimPoisson(SEXP lambda, SEXP tgrid, SEXP T2M, SEXP Ni, SEXP NT)
{
double sign, EVar;
double *xlambda, *xtgrid, *xT2M, *xNi, *xNT, *xtau;
SEXP tau;
int ltgrid =0;
int i = 0;
int j = 0;
2007 Jun 28
2
sampling question
I am interested in locating a script to implement a sampling scheme
that would basically make it more likely that a particular observation
is chosen based on a weight associated with the observation. I am
trying to select a sample of ~30 census blocks from each ZIP code area
based on the proportion of women in a ZCTA living in a particular
block. I want to make it more likely that a block will
2006 May 08
0
ZipCode Search
I''ve looked through the messages regarding implementing a ZipCode search
and I have a few questions to make sure I have my head wrapped around
this.
Here''s what I have. I have a database table called zipcodes with the
following info (for example)
30310 Atlanta GA 33.727807 -84.41983 -5 1
That''s zip, city, state, latitude, longitude, timezone, and dst.
So when a
2006 Jul 11
18
Zip Code Ranges
Does anyone have any recommendations for working with zip code distance
ranges? I need to calculate the distances between US zip codes.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060711/f133d7de/attachment-0001.html
2012 Oct 26
1
using match-type function to return correctly ordered data from a dataframe
I am regularly running into a problem where I can't seem to figure out how
maintain correct data order when selecting data out of a dataframe. The
below code shows an example of trying to pull data from a dataframe using
ordered zip codes. My problem is returning the pulled data in the correct
order. This is a very simple example, but it illustrates a regular problem
that I am running into.
2006 Jun 16
3
Does HABTM support non "id" FKs?
Quick question. Say I have a geographical database with counties and zip
codes where counties have and belong to many zip codes.
zip_codes (id, zip_code)
counties (id, name)
When I create the association table, the Rails way says to do the
following: counties_zip_codes (county_id, zip_code_id).
However, given that zip_codes.zip_code is itself a candidate key, I
would much prefer to do the
2006 Jul 18
1
Need Help Updating Records
This is a stupid question I know, but it is driving me crazy - I am
missing something simple and basic here. I am trying to update missing
zip codes on a data table. I am doing something incorrectly as the data
in the Source table is not being updated, only the value in the array is
changed. How do I get this to update the actual DB record instead?
def add_missing_zips
#find all records in
2006 May 28
3
Validating Foreign Key
Howdy,
I''m a Rails beginner working on my first significant project with RoR.
I''m trying to figure out how to validate a foreign key (you know, make
sure the row actually exists.)
However, validates_associated doesn''t seem to be what I want to use, nor
does it work...
-- BEGIN --
class City < ActiveRecord::Base
has_many :schools
belongs_to :state
2009 Jul 31
2
Undefined method updated? for <model object>
Hi,
I have two model say-
ZipCode < ActiveRecord::Base
belongs_to :state_provinces
end
StateProvince < ActiveRecord::Base
has_many :zip_codes
end
if I do @zip_code.update_atribute(:city, "My City")
its giving Undefined method updated? for StateProvince
if I remove belongs_to specifier in ZipCode class then it work fine.
Any alternate solution??
Thanks
--
Regards,
Himanshu
2006 Apr 22
2
Form.serialize problem
I''m sure I''m missing something dumb but I cannot get Form.serialize to
work. I have an alert in the function as a debug to show me what''s
supposed to be the serialized line of values but it always shows
nothing. Can somebody show me what I''m doing wrong? Thanks in advance.
function submitprofile() {
var url = "/profile/submitprofile.html?";
2007 Nov 07
1
is xapian the right solution for me
hey together,
i am evaluating a couple full text solutions and just found my way to
xapian. i need to build a search for community users. currently i got
about 500.000 users and the search just stresses my normal RDBMS too
much. i just read the docu but it couldnot answer all of my questions.
it would be nice if someone could just tell me if xapian covers
everything i need.
needs:
->
2006 Mar 26
2
Shared Columns in an STI
I have a an STI table which acts_as_tree, that has a large number of
classes/types. My common fields are:
id
parent_id
name
description
with 4 more text fields, I could cover most of my classes if I could
redefine the name of the field like this.
text1 AS address1
text2 AS address2
text3 AS zipcode
For one class and
text 1 AS model_number
text2 AS vendor
Is there a construct that will allow
2012 Jan 06
2
Zipcode validation
Hi All,
How to validate Zip/Postal code enterd is valid based on country
selected? Is there any plugin for checking zipcode format for different
countries..
Thanks
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to