City Score
City Score is a command-line application for scoring cities based on your personal preferences. Here's an example:
| City | Population | Zillow® ZHVI | PeopleForBikes | Yelp "gay bars" | Nearby ski resorts | Score |
|---|---|---|---|---|---|---|
| Portland, OR | 647,176 | $547,999 | 56 | 9 | Mount Hood Ski Bowl (42 miles) and 2 more | 100 |
| Detroit, MI | 645,658 | $64,414 | 42 | 7 | Mt Brighton, MI (41 miles) and 1 more | 86 |
| Cambridge, MA | 116,892 | $959,032 | 58 | 6 | Wachusett Mountain (40 miles) and 5 more | 84 |
Technologies
- Python 3
Features
- Ranks all 29,880 cities and towns in the United States
- Includes multiple built-in data providers
- Designed to allow users to easily add and remix data
- Outputs prettified to the console or to CSV, HTML, JSON, JSONL
Design
City Score uses a three-step process:
- Qualification: criteria identify cities that meet your minimum standard.
- Scoring: scorers score facets of your choosing at various weights.
- Generation: dimensions appear in the final output.
Quick start
- Download City Score from PyPI:
$ python3 -m pip install city_score - Create a script (
myscore.py) like this:from city_score import run from city_score.sources.core import * from city_score.sources.peopleforbikes import * from city_score.sources.zillow import * sources = ( PeopleForBikes, Zillow, ) criteria = ( minimum_bike_score(25), minimum_population(60000), maximum_median_home_price(1000000), prohibited_states(('TX', 'FL', 'CO', )), ) scorers = ( median_home_price_scorer(lower=350000, upper=800000), bike_score_scorer(lower=40, upper=80, weight=2), ) dimensions = ( population, median_home_price, median_rent, bike_score, ) run(sources, criteria, scorers, dimensions)
- Run your script:
$ python3 myscore.py --sort=score --scale-scores
Data sources
- 🚲 PeopleForBikes provides a score for biking infrastructure.
- 🏂 Snowpak provides the name and location of most ski resorts.
- 🏃🏻 TrailLink provides the number of nearby trail miles.
- 🍕 Yelp provides data on many points of interest, including businesses.
- 🏡 Zillow provides estimates for home and rent prices.
License
MIT License
Metadata
Release files for city-score 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| city_score-0.2.0.tar.gz | 12.5 kB | Without provenance | Details for city_score-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| city_score-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for city_score-0.2.0-py3-none-any.whl |
Total release size: 27.7 kB
Release files / city_score-0.2.0.tar.gz
| Download URL | city_score-0.2.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b9f2c35eb6704a329736df2e6c5473d3ade88c0a4e22089f516ace05b4e9dd6
|
|
BLAKE2b-256 checksum How to use checksums |
af2ff922b165ad595d69f569d19083df47125cefc6b50252f57217d5ce4d3e55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / city_score-0.2.0-py3-none-any.whl
| Download URL | city_score-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c36dfee3290718fb65887b294b9ab5613d5037b849fc38413fa5daacbd19f14e
|
|
BLAKE2b-256 checksum How to use checksums |
4e94e8c8a8052057766d4437922170ed3aaba768463a4209bf15abc9af87c64b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for city-score 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.