Get the ordered list of USA universities based on their latest ranking.
Project description
Uni-rank
Uni-rank is a mini python package to get the ordered list of USA National universities based on their latest ranking on usnews.com/best-colleges
This package also provides few other information like state
, city
, zip code
.
The result can be stored as a csv
or json
file.
Installation
Uni-rank requires Python 3 to run.
Install the package by running:
pip install -U uni-rank
Usage
# import
from unirank import Ranking
# instantiate
rank = Ranking()
# get the ordered list of USA universities
usa = rank.get_usa()
#print the result
print(usa)
Helper Functions
1. Get University Names
rank.get_names()
2. Get Top 100 University Names
rank.get_top_names(100)
2. Filter Universities by States
Input
: State List,
Output
: DataFrame of filtered universities
states = ['NJ', 'MA']
state_result = rank.select_by_state(states)
print(state_result)
3. Filter Universities by Cities
Input
: City List,
Output
: DataFrame of filtered universities
cities = ['Cambridge']
city_result = rank.select_by_city(cities)
print(city_result)
Export
1. Export as CSV
rank.save_csv(usa, "usa_list.csv")
2. Export as json
rank.save_json(usa, "usa_list.json")
USA University Properties:
key | detail |
---|---|
displayName |
Name |
rankingDisplayRank |
Rank |
state |
State |
city |
City |
zip |
Zip Code |
description |
Description |
Note
Intend to extend the package to support other types of rankings and also include other countries on later versions, hence the name uni-rank
not usa-rank
License
GNU General Public License
History
1.0.2 (15-03-2021)
- Added a helper method
1.0.1 (14-03-2021)
- First release on PyPI
- Bug fixes
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file uni-rank-1.0.3.tar.gz
.
File metadata
- Download URL: uni-rank-1.0.3.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66def08bfeb75481e73aba87a6b83e7bcea02daa1bdb6221f713fd1940adba2f |
|
MD5 | 3a4b23cf38ad501b3d443d79fcc5582c |
|
BLAKE2b-256 | 8bf96621843577f05b3180302db9d4da61fdd49124bdf52629bf53b861ffcc76 |