How can you map IDs even when duplicates are eliminated? [closed] - mapping

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I currently have a large set of objects in SAS (>100000) each with about 60 columns of data, including an ID number. There are many duplicate ID numbers in this set of data. My goal is to convert the ID numbers that I currently have into another form of ID number using a piece of software that I have. The problem is that when I input the ID numbers into the software, the converted output comes back without the duplicates, which I need. Is there any way to use the output ID numbers to somehow create a list of output IDs except with the duplicates that the original set of data had. Any language or piece of software would be fine.
Here is a illustration of what I described above.
Original IDs: 086516 677240 449370 677240 941053 449370
Output: 147244 147947 147957 148021
Preferred Output: 147244 147947 147957 147947 148021 147957

You can merge on the ID using a MERGE statement, and it will append the value to each of the records with the same ID value.
data want;
merge have(in=a) newIDs(in=b);
by id;
if a and b;
run;

Related

Scrape from website and save into different columns in a spreadsheet [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 11 months ago.
Improve this question
Suppose there's a website that has a list of details of some companies, for example, name, HQ area, turnover, etc. How do I scrape that data and fill it into different columns (like name, turnover) with each row having the details of a separate company?
Google Sheets allow you to import html tables or list with the IMPORTHTML(url, query, index) function.
For example, using the Wikipedia page List of largest companies by revenue as an example.
We want the data from the main table, so the first thing that we have to do, is to know what index it occupies in the page. To do this, we can use document.querySelectorAll('table') or $$('table'), as you can see from the result, the table that we want is in the position 5 of the array, so inside our google sheet we can use:
=IMPORTHTML("https://en.wikipedia.org/wiki/List_of_largest_companies_by_revenue","table",5)
From here, you should change the query parameter to list and find what index it occupies within the page using the method described above. In any case, you could always use IMPORTXML(url, xpath_query), and knowing the XPath of the information, you could come up with a similar solution.

What's the mean of "?ac_id=2" in url? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
For example there is a url http://***.***.***.**/srun_portal_pc_us.php?ac_id=2&, what is the mean of "?ac_id=2" in this url?
This is a query string. The query string consists of one or more pairs of parameter names and values.
The PHP script will receive the query string and reformats into an array called $_GET. The $_GET array will have one element for each parameter in your query string.
In your case, since the value 2 was associated with the parameter ac_id, your PHP script would then be able to access the array element $_GET['ac_id'] and retrieve the value 2.
The parameter name ac_id could named anything you want as long as your URL and PHP script both use the same name.
If you want more than one value passed to your PHP script you must separate each parameter/value pair with an ampersand (&):
myscript.php?ac_id=2&first_name=Fred&last_name=Flintstone
Of course you need to modify the PHP script to handle the additional parameters.
In your example above you end the URL with an ampersand(&). The URL should not end with an ampersand.

How can I list each row that matches a string, set by a dropdown? Filter? VLookup? Query? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
https://docs.google.com/spreadsheets/d/1mvBFBuRUl2qiPktE1Y4lCTeaSK4BwJ7S4Nf0S33LTRg/edit?usp=sharing
On Sheet2 I am wanting to show all the columns associated with a specific string that comes from a dropdown data validation. I have tried using VLOOKUP but that only outputs the first entry found, I want to print every entry along the row.
I put an example of what I am trying to get it to look like but not sure if VLOOKUP or QUERY or FILTER or something else is what I need
In your example spreadsheet, sheet 2, delete everything in the range F3:I and then enter in F3
=query(A:D, "where D='"&F2&"'",1)
If you want to reference the data on the sheet you'll have to use
=query('Draft Board'!A:D, "where D='"&F2&"'",1)
See if that works ?

iOS / Xcode: saving datalist ipad [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
im new to iOS/xcode app and have a question.
If i make a form with "name" "age" "date now" how/where is it saving the info and how do i make new items ?
Have tried to search google for "xcode saving item to list" but its not what im looking for.
Can someone help me with a link to a tutorial or the name function that i need to look at.
So i can read/learn about
- save function
- show the saved items in a list.
- get one or more saved items to another page/view in the app.
First you need to deal with getting notified when the text in each field changes. This is done by using the delegate methods of the text fields (<UITextFieldDelegate>). In particular, textFieldDidEndEditing: will allow you to grab the text when the edit is complete.
Once you have the text, you need to store it somewhere. This could be in a dictionary, or, if you want to display in a list, it could be in an array.
A dictionary is easier if each of the text fields means something different. Then the keys of the dictionary represent the meaning.
An array is easier if it's just a list of arbitrary text. The issue here is how to know that you haven't got duplicates. In this case it can be better to have a submit button which loops over all of the text fields in order and adds the text from each to the array.
Once you have the text in an array or dictionary you can save it to disk (writeToFile:atomically:) or use that as the source data for a table view.

Is there any data-mining/text-mining/machine learning techniques to find the most appropriate Tags for a given document [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Say I have a huge set of documents represented in relational Table with columns
ID (unique identifier)
Title (255 characters)
Description (5000 characters)
Category (predefined meta-data )
Additional Notes (1000 characters )
I would like to add one or more Tags for each row in the document table. Here Tags refer to a word or a group of words that tells readers what a document is about.
Is there any data-mining/text-mining/machine learning techniques or approach that will help me to find the most appropriate Tags for a given document without human interference.
One of the simple possible approaches: for a given document calculate TF-IDF measure for every word and choose top-N words as tags (or cut candidates by some threshold).
Also in your case it's reasonable to use empirical boosting coefficients for words in the Title and Category fields.

Resources