What is "subject group ID" in pybliometrics? - pybliometrics

In pyblimoetric's AuthorRetrieval there is an object called classificationgroup.
In the documentation describes it as:
List with (subject group ID, number of documents)-tuples.
But what is a "subject group ID"?
Where do I find a list of all possible "subject group ID"s and their definitions?

These are Elsevier's All Science Journal Classification (ASJC) codes.
More on that https://service.elsevier.com/app/answers/detail/a_id/12007/supporthub/scopus/~/what-are-scopus-subject-area-categories-and-asjc-codes%3F/
Scopus assigns 4-digit ASJC codes to all sources (journals, conference proceedings, books, trade journals). A source has between 1 and 7 ASJC codes. All publications in a source are assigned all the ASJC codes of the source. This implies the same publication can be counted multiple times in .classificationgroup.

Related

Swift and CSVImporter: Only the first row of .csv is being imported

I am trying to import a csv and parse it using CSVImporter. However, when I print the object array's count, it only imports 1 out of 20 rows.
I've tried using the "Header Structure" method from the CSVImporter example, but that gives me the same problem. I think it may have something to do with the CSV itself and maybe the special characters are screwing it up, but I'm not able to alter the CSV in any way.
let path = Bundle.main.path(forResource: "Departments", ofType: "csv")
let importer = CSVImporter<Department>(path: path!)
importer.startImportingRecords { recordValues -> Department in
return Department(name: recordValues[0], advisingInfo: recordValues[1], calendar: recordValues[2], chair: recordValues[3], icon: recordValues[4], office: recordValues[5], summary: recordValues[6], tutorLink: recordValues[7], url: recordValues[8])
}.onFinish { importedRecords in
for dept in importedRecords {
// Now importedRecords is an array of Departments
print(importedRecords.count) // returns 1 which is the first department (Sociology...)
}
First 3 entries in CSV as printed out in the console ("Sociology, Economics and Anthropology","Psychology and Education", and "Nursing")
Name,AdvisingInfo,Calendar,Chair,Icon,Office,Summary,TutorLink,URL,ChairPhone,AdvismentLink
"Sociology, Economics and Anthropology",You have chosen a major in the Sociology,,Dr. Jill Null,ic_soc,Null Hall NH 200,"The Department of Sociology, Economics and Anthropology offers a
rich variety of sociology, anthropology, economics, geography, and
human services courses. The department offers courses that are
required in many of the degree programs at County College of
Null, including the Liberal Arts and Business degree. The
department's experienced faculty members have a broad range of
interests and expertise, as reflected in the many electives available
in the department.",,https://www.null.edu/,973-555-5610,https://www.null.edu/student-life/
Psychology and Education,"You have chosen a major in the Psychology and Education
Department.
As a full-time student you must meet with an Academic Advisor
to receive advisement clearance before registering for classes
each semester. As a part-time student you are encouraged to
meet with an Academic Advisor on a regular basis (although
clearance to register is not necessary). In order to build a
relationship and have continuity in your educational planning, it
is advisable to meet with the same faculty member each
semester for advisement.
For students majoring in Humanities Social Sciences/Liberal Arts
(P1130), contact the office of the Dean of Liberal Arts, Dr Bob
Null, Cohen Hall 253, bnull#mail.edu, 973-555-5555, and you
will be referred to a specific faculty member(s) for academic
advisement.
Registration for the spring and fall semesters begins in early
November and April, respectively. Be on the look out for more
information about ""Advisement Week"" for your department/
major.",,Josh Null,ic_psych,Null Hall NH 200,"The Department of Psychology and Education is a member of the
Division of Liberal Arts. It is comprised of courses and programs in
(a) psychology, (b) early childhood education and (c) teacher
education. The department supports the liberal arts curriculum and
the college’s overall mission to provide students with transferable
liberal arts courses, courses to fulfill the general education
requirements in numerous curricula, providing a comprehensive
background in the behavioral sciences.",,https://www.null.edu/academics/,973-555-5555,https://www.null.edu/student-life/
Nursing,"Academic Advisors are available to help you select the courses that
best support your educational and career goals as well as provide
direction to the many resources and support services available at
the college. Each semester, full-time students pursuing a degree at
CCM must see their Academic Advisor(s) to obtain advisement
clearance in order to register for classes.",,Dr. K. Lucy Null,ic_nursing,Null Hall NH 300,"The Nursing program is fully accredited by the Accreditation
Commission for Education in Nursing. Graduates of the program are
granted an Associate in Applied Science degree and have attained
the academic requirements to apply for the National Council
Licensing Examination (NCLEX) and Registered Nurse Licensure.
The program offers a balance of general education and nursing
courses to prepare students for Registered Nurse positions.",http://www.null.edu/academics/,https://www.null.edu/academics,973-555-5555,https://www.null.edu/
Fixed the issue by just using CSwiftV instead of CSVImporter. https://github.com/Daniel1of1/CSwiftV

Should I pass variables through the path section or query section of my REST API?

I'm building an app that will allow users to manage groups. Each group contains a name, campus, and data type. They are not in any particular hierarchy - semantically, a campus could be considered to have many groups, but it would be also natural to consider a group at the top of the hierarchy, spread out over many campuses.
A combination of name/campus/data_type is unique
NAME CAMPUS DATA_TYPE
---------------------------------------
LABS WEST IPv4
LABS WEST IPv6
LABS EAST IPv4
USERS NORTH userids
USERS WEST userids
USERS EAST userids
So for example, the LABS group for the WEST campus with DATA_TYPE of IPv4 will contain all the IP subnets related to west-campus labs.
Now, the only requirement for drilling down to this data is by group. It is not a requirement to gather a list of all WEST campus groups, for example, or all groups that have a "IPv6" data type. However it is necessary to get a list of all campuses that have a "LABS" group, and it is also necessary to get all the data_types for LABS.
So how should I create my endpoints?
Option 1
Long, but fairly clear URLs.
GET /groups/LABS/ (returns LABS groups across all campuses and data_types)
GET /groups/LABS/data_type/IPv4 (returns all IPv4 LABS groups across all campuses)
GET /groups/LABS/campus/WEST (returns all WEST LABS groups across all data_types)
POST /groups/LABS/campus/NORTH/data_type/IPv4 (create a new group)
POST /groups/LABS/campus/NORTH/data_type/userids (another new group)
ADVANTAGE:
avoids any query parameters
DISADVANTAGES:
it represents a certain hierarchy that is not actually necessary.
It also requires the app to support both group->campus->data_type and
group->data_type->campus hierarchies.
Option 2
Treat the group as the only part of the hierarchy, and treat "campus" and "data_type" as non-hierarchical identifiers:
GET /groups/LABS
GET /groups/LABS?campus=WEST
GET /groups/LABS?data_type=IPv4
GET /groups/LABS?campus=WEST&data_type=IPv4
POST /groups/LABS (POST data: {campus: "WEST", data_type: "IPv4})
POST /groups/LABS (POST data: {campus: "WEST", data_type: "IPv4})
ADVANTAGE:
it seems to reflect the non-hierarchy of "data_types" and "campus",
and makes it easy to specify (say) campus without a data_type (or
vice versa).
DISADVANTAGES:
I'm not totally sure this is an appropriate use of query parameters.
Furthermore it does not provide a very pretty "permalink" to any
unique combination of group/campus/data_type.
I'm leaning towards option 2. Is that the best way to represent this data? Or am I thinking about it wrong?
I would suggest instead supporting two endpoints. It's clear from your description that a group is not uniquely defined by a name, but your URI structure implies that it is. Instead, use a synthetic id to uniquely identify a group.
GET /groups
?name={}
?campus={}
?data_type={}
<- some collection of all groups that match whichever criteria are specified
POST /groups
-> { "name": "LABS", "campus": "WEST", "data_type": "IPv4" }
GET /groups/{id}
<- { "name": "LABS", "campus": "WEST", "data_type": "IPv4" }
This approach gives you more flexibility for in the future when they decide to add a new property, or want to search by data_type across all groups.
You can either include unique ids in responses from the server (meh) or include hypermedia links to give you interesting relationships, such as all other groups with the same name, or on the same campus.

How to best structure csv data for tableau that has "multiple categories"?

I have a set of 100 “student records”, I want to have checkboxes for each "favorite_food_type" and "favorite_food", whichever is checked would filter a "bar graph" that counts number of reports that contain that specific "favorite_food"type" and "favorite_food" schema could be:
name
favorite_food_type (e.g. vegetable)
favorite_food (e.g. banana)
I would like to in the dashboard be able to select via checkboxes, “Give me all the COUNT OF DISTINCT students with favorite_food of banana, apple, pear“ and filter graphs for all records. My issue is for a single student record, maybe one student likes both banana and apple. How do I best capture that? Should I have:
CASE A: Duplicate Records (this captures the two different “favorite_food”, but now I have to figure out how many students there are (which is one student)
NAME, FAVORITE_FOOD_TYPE,FRUIT
Charlie, Fruit, Apple
Charlie, Fruit, Pear
CASE B: Single Records (this captures the two different “favorite_food”, but is there a way to pick out from delimiters?)
NAME, FAVORITE_FOOD_TYPE,FRUITS
Charlie, Fruit, Apple#Pear
CASE C: Column for Each Fruit (this captures one record per student, but need a loooot of columns for each fruit, many would be false)
NAME, FAVORITE_FOOD_TYPE, APPLE, BANANA, PINEAPPLE, PEAR
Charlie, Fruit, TRUE, FALSE, TRUE, FALSE
I want to do this as easy as possible.
Avoid Case B if at all possible. Repeating information is almost always best handled by repeating rows -- not by cramming multiple values into a single table cell, nor by creating multiple columns such as Favorite_1 and Favorite_2
If you are provided data with multiple values in a field, Tableau does have functions and data connection features that can be used to split a single field into its constituent parts to form multiple fields. That works well with fixed number of different kinds of information -- say splitting a City, State field into separate fields for City and State.
Avoid Case C if at all possible. That cross tab structure makes it hard to analyze the data and make useful visualizations. Each value is treated as a separated field.
If you are provided data in crosstab format, Tableau allows you to pivot the data in the data connection pane to reshape into a form with fewer columns and many rows.
Case A is usually the best approach. You can simplify it further by factoring out repeating information into separated tables -- a process known as normalization. Then you can use a join to recombine the tables and see the repeating information when desired.
A normalized approach to your example would have two tables (or tabs in excel). The first table would have exactly one row per student with 2 columns: name and favorite_food_type. The second table would have a row per student/favorite food combination, with 2 columns: name and favorite_food. Now each student can have as many favorite foods as you like or none at all. Since both columns have a name field, that would be the key used to join (combine) the tables when needed.
Given that table design, you could have 2 data sources in Tableau. The first one just pointed to the student table and could be used to create visualizations that only involved students and favorite_food_types. The second data source would use a (left) join to read from both tables and could be used to look at favorite foods. When working with the second data source, you would have to be careful about reporting information about student names and favorite food types to account for the duplicate information. So use the first data source when possible. Finally, you could put both kinds of visualizations on a dashboard and use filter and highlight actions to make interaction seamless despite the two sources -- getting the best of both worlds.

FileMaker - Portal display based on two separate relationships

I have three tables:
(1) Audit Findings [up to 100 records per audit, depending on the standard],
(2) Types of Documents to check [different types and number, depending on the standard against which an audit is conducted], and
(3) Names of the documents that need to be present.
Records of (1), where the main audit findings are entered, contain a portal that lists the required documents. This list is provided by table (2). Next to this portal list, a "Document Type" relationship between (2) and (3) ensures that the correct document names appear after the relevant document types. Example: Shipping Notes: SN2234, SN8926; Sales Invoices: IV5673, IV7251, etc.
I now need to link the document names of table (3) to the audit at hand, i.e. table (1), to avoid that audit findings for any company always list the same ported document names. In other words, the 2 = 3 relationship needs to be filtered based on the audit date (clients are audited once a year), client number and standard info (most clients are multi-cetified) contained in table (1). Is this possible? And how?
This is more of a guess than an answer. It is based on the following assumptions:
Three tables, related as:
AuditFindings --< DocumentTypes --< DocumentNames;
There is a portal to DocumentNames, placed on a layout of AuditFindings, showing all the DocumentNames "grandchildren" of the currently viewed record in AuditFindings.;
There is a ActiveDate field in AuditFindings table;
There is a DocumentDate field, in the DocumentNames table.
Now, in order to filter the portal mentioned in point #2 above, so that it shows only records of matching dates, set the portal filter to show records only when:
AuditFindings::ActiveDate = DocumentNames::DocumentDate

SCardTransmit() always return 6d00

I'm trying to read name, card number, expiry date etc on Credit Card. but always return 6d00 when call SCardTransmit.
I'm using pre-define AID, which i have googled to be valid (correct me if i'm wrong). here's the are :
AID_LIST = {
"A0000000421010",
"A0000000422010",
"A0000000031010",
"A0000000032010",
"A0000000041010",
"A0000000042010",
"A00000006900",
"A0000001850002"
}
Thanks in advance.
I am not familiar with this API you are using, but you will have to send the following sequence of APDU commands:
SELECT PSE (for contact card), specified by EMV in Book 1, 11.3. An example is "00A404000E315041592E5359532E444446303100"
With the SFI returned, you can read the records to find out the supported AIDs. But, you can do this by "trial and error" using the pre-defineds AID that you specified and call SELECT AID, following the guidelines on Book 1, 12.3.3.
You may either call the command "GET PROCESSING OPTIONS" to see what records are available to read or you can read all possible records calling the "READ RECORD" command making a scan of the possible records. In one of those records, you will have the data you are looking for.
Usually in the same record you will have stored the Cardholder name, PAN and Track 2 discretionary data (in which is contained the expiration date).
The tags are listed in Book 3.
Application Primary Account Number (PAN) - 5A
Cardholder name - 5F20
Track 2 Discretionary Data - 9F20
Usefull info about Track 2:
http://en.wikipedia.org/wiki/Magnetic_stripe_card
A sample of the sequence above:
http://code.google.com/p/javaemvreader/wiki/ExampleOutput
EMV Specs:
http://www.emvco.com/specifications.aspx?id=223
The possible return codes, such as 61XX, 9000, etc are listed in ISO 7816. Here's a good overview: http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-4_5_basic_organizations.aspx
You need to lookup/buy ISO 7816, the EMV specifications and your vendors card specifications otherwise you don't know what you are doing.