Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4267004
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:50:18+00:00 2026-05-21T06:50:18+00:00

I am currently doing a small data structures project, and I am trying to

  • 0

I am currently doing a small data structures project, and I am trying to get data on universities across the country; and then do some data manipulation with them. I have found this data here: http://archive.ics.uci.edu/ml/machine-learning-databases/university/university.data

BUT, the problem with this data is (and I quote from the website): “It is a LISP readable file with a few relevant functions at the end of the data file.” I plan on taking this data and saving it as a .txt file.

The file looks a bit like:

(def-instance Adelphi
      (state newyork)
      (control private)
      (no-of-students thous:5-10)
      (male:female ratio:30:70)
      (student:faculty ratio:15:1)
      (sat verbal 500)
      (sat math 475)
      (expenses thous$:7-10)
      (percent-financial-aid 60)
      (no-applicants thous:4-7)
      (percent-admittance 70)
      (percent-enrolled 40)
      (academics scale:1-5 2)
      (social scale:1-5 2)
      (quality-of-life scale:1-5 2)
      (academic-emphasis business-administration)
      (academic-emphasis biology))
(def-instance Arizona-State
      (state arizona)
      (control state)
      (no-of-students thous:20+)
      (male:female ratio:50:50)
      (student:faculty ratio:20:1)
      (sat verbal 450)
      (sat math 500)
      (expenses thous$:4-7)
      (percent-financial-aid 50)
      (no-applicants thous:17+)
      (percent-admittance 80)
      (percent-enrolled 60)
      (academics scale:1-5 3)
      (social scale:1-5 4)
      (quality-of-life scale:1-5 5)
      (academic-emphasis business-education)
      (academic-emphasis engineering)
      (academic-emphasis accounting)
      (academic-emphasis fine-arts))

      ......

The End Of the File:

(dfx def-instance (l)
  (tlet (instance (car l) f-list (cdr l))
    (cond ((or (null instance) (consp instance))
           (msg t instance " is not a valid instance name (must be an atom)"))
          (t (make:event instance)
             (push instance !instances)
             (:= (get instance 'features)
                 (tfor (f in f-list)
                   (when (cond ((or (atom f) (null (cdr f)))
                                (msg t f " is not a valid feature "
                                       "(must be a 2 or 3 item list)") nil)
                               ((consp (car f))
                                (msg t (car f) " is not a valid feature "
                                     "name (must be an atom)") nil)
                               ((and (cddr f) (consp (cadr f)))
                                (msg t (cadr f) " is not a valid feature "
                                     "role (must be an atom)") nil)
                               (t t)))
                   (save (cond ((equal (length f) 3)
                                (make:feature (car f) (cadr f) (caddr f)))
                               (t (make:feature (car f) 'value (cadr f)))))))
             instance))))

(set-if !instances nil)



(dex run-uniq-colleges (l n)
  (tfor (sc in l)
    (when (cond ((ge (length *events-added*) n))
                ((not (get sc 'duplicate))
                 (run-instance sc)
~                 (remprop sc 'features)
                 nil)
                (t (remprop sc 'features) nil)))
    (stop)))

The data I am mostly interested in is Number of students, Academic emphases, and School name.

Any help is greatly appreciated.

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T06:50:19+00:00Added an answer on May 21, 2026 at 6:50 am

    You can work on/use a Lisp file parser, or you can ignore the language it’s written on and focus on the data. You mentioned you need:

    • School name
    • Number of students
    • Academic emphases

    You can grep the relevant keywords (def-instance, no-of-students, academic-emphasis), which would leave you with (based on your example):

    (def-instance Adelphi
          (no-of-students thous:5-10)
          (academic-emphasis business-administration)
          (academic-emphasis biology))
    (def-instance Arizona-State
          (no-of-students thous:20+)
          (academic-emphasis business-education)
          (academic-emphasis engineering)
          (academic-emphasis accounting)
          (academic-emphasis fine-arts))
    

    Which simplifies writing a specific parser (def-instance is followed by the name, then all academic-emphasis and no-of-students before the next def-instance refer to the previously defined name)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently doing some GUI testing on a ASP.net 2.0 application. The RDBMS is
i'm currently doing some reports for SSRS, and i just confirm what i already
I am currently doing some socket programming using C/C++. To be able to use
As I am currently doing this project in only C, I've up untill this
I'm currently doing something like this in some code I'm working on right now:
We're currently doing some Word automation, and want to be able to insert a
I'm currently doing a project in C# working with windows forms. During the course
I'm currently doing some redesign of a website, basically just upgrading it to a
I'm currently developing a heavily multi-threaded application, dealing with lots of small data batch
I'm currently doing the following to use typed datasets in vs2008: Right click on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.