# Retirement Place Scorer: Compare US Counties (Census, NOAA) (`clearfeedlabs/retirement-place-scorer`) Actor

Rank every US county for retirement with your own weights: home prices, rent, winter warmth, summer heat, rainfall, CMS hospital stars, hospital access, broadband. Official Census, NOAA and CMS data with sources cited.

- **URL**: https://apify.com/clearfeedlabs/retirement-place-scorer.md
- **Developed by:** [Clearfeed Labs](https://apify.com/clearfeedlabs) (community)
- **Categories:** Real estate, Other
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 scored counties

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Retirement Place Scorer — Compare US Counties on Housing, Climate, Hospitals & Broadband

**Retirement Place Scorer** ranks **every US county** for retirement using **your own priorities**, built only from **official government data**: U.S. Census Bureau (American Community Survey), NOAA's National Centers for Environmental Information (30-year county climate), and CMS Care Compare (hospital star ratings). Every row shows the raw numbers, a 0–100 score per factor, and where each number came from, so you can check it instead of trusting a black-box "best places" list.

Built for **retirees and pre-retirees, financial planners and retirement coaches, relocation and real-estate professionals, 55+ community developers, journalists and researchers**.

- **8 factors, your weights**: home affordability, rent affordability, warm winters, mild summers, low rainfall, hospital quality (CMS stars), hospital access (per 100k people), broadband.
- **Filters**: states, min/max county population, max median home value.
- **Transparent scoring**: each factor is a national percentile (0–100, higher = better), so scores compare across states. Missing hospital data never helps a county: no hospital = 0, unrated hospitals = 40 (see Methodology for other missing data).
- **Add-on (off by default)**: every hospital in the county with its CMS star rating and emergency services.

No login, no API key, no cookies, no proxies, no scraping of listing sites.

#### Why this one

| | This Actor | Typical "best places" scraper or list |
|---|---|---|
| Data | Official Census ACS, NOAA NCEI, CMS | Copied magazine rankings or real-estate listings |
| Your priorities | 8 adjustable weights | Fixed editorial ranking |
| Coverage | All ~3,200 US counties | Top 10–100 cities |
| Transparency | Raw values + per-factor scores + sources per row | Opaque |
| Healthcare | CMS hospital stars and access | Rarely |
| Fair-housing safe | No demographic, race, religion, family-status or age-mix factors | Often mixes in demographics |

#### Pricing (pay per event)

| Event | Price | When |
|---|---|---|
| Scored county | **$0.005** ($5 per 1,000) | Each county returned |
| Hospital list add-on | +$0.002 per county | Only if `addHospitalList` is on |
| Actor start | $0.00005 | Apify's standard start event |

**How that compares:** general location/real-estate data Actors on the Store charge about $2–$10 per 1,000 rows and give you raw listings to analyse yourself. Each of our rows is already a finished, multi-source analysis, so a **top-50 shortlist costs $0.25**.

**Billing examples:** no incremental mode; you pay per county returned: 25 counties = $0.125; 25 counties with the hospital add-on = $0.175; a run where no county matches your filters = start event only. Re-weight and re-run as often as you like. Set **Max charge per run** to cap spend.

#### Input examples

Warm, affordable, good hospitals, Southeast:

```json
{ "states": ["FL", "GA", "SC", "NC", "TN", "AL"], "minPopulation": 30000, "weight_warmWinters": 30, "weight_hospitalQuality": 30, "maxItems": 25 }
```

Mild summers, under $300k, nationwide:

```json
{ "maxMedianHomeValue": 300000, "weight_mildSummers": 35, "weight_warmWinters": 5, "maxItems": 50 }
```

#### Output (one row)

`rank`, `fips`, `county`, `state`, `score` (0–100), `dataCoverage` (share of your weights with data), `factorScores{}`, `population`, `medianHomeValue`, `medianGrossRent`, `medianHouseholdIncome`, `broadbandPct`, `janAvgLowF`, `julAvgHighF`, `annualPrecipIn`, `hospitalCount`, `avgHospitalStars`, `hospitalsWithEmergency`, `latitude`, `longitude`, `landSqMi`, `weightsUsed`, `sources`, plus `hospitals[]` with the add-on.

#### Methodology (reference years, formulas, missing data)

**Reference years** (also returned per row in `sources` and in the run SUMMARY as `acsYear` / `climateYears`):

- Census ACS 5-year: the newest release found on census.gov at build time (tries last year, then the two before). Gazetteer: 2024.
- NOAA nClimDiv: the 30 most recent complete calendar years (e.g. 1996–2025 for runs in 2026). A county needs at least 10 years of data for a climate value.
- CMS hospitals: current Care Compare file at build time. The built table is cached up to 30 days.

**Raw values:**
| Field | Definition |
|---|---|
| `janAvgLowF` | Mean of NOAA's county **January minimum-temperature** series (`tmin`) over the 30 years. Not the mean temperature. |
| `julAvgHighF` | Mean of NOAA's county **July maximum-temperature** series (`tmax`) over the 30 years. Not the mean temperature. |
| `annualPrecipIn` | Mean annual total precipitation (sum of 12 months; years with a missing month are skipped). |
| `medianHomeValue` / `medianGrossRent` / `medianHouseholdIncome` | ACS tables B25077, B25064, B19013 (estimates only; margins of error aren't used). |
| `broadbandPct` | ACS B28002: households with a broadband subscription ÷ all households. |
| `hospitalAccess` input | CMS hospitals located **in the county** per 100,000 residents. It's a count, **not travel time or distance**; a county next to a big hospital in another county can score low. |
| `hospitalQuality` input | Average CMS overall star rating of the county's rated hospitals. |

**Factor score** = national percentile rank of the raw value across all counties with data (0–100; ties share the midpoint rank). Lower is better for home value, rent, July high and precipitation; higher is better for January low, hospital stars, hospital access and broadband.

**County score** = Σ(factor score × weight) ÷ Σ(weights of factors that have data). Default weights: home 25, rent 10, warm winters 15, mild summers 10, low rainfall 0, hospital quality 20, hospital access 10, broadband 10.

**Missing data:** a hospital factor with no data is scored (0 if the county has no hospital, 40 if hospitals are unrated). Any other missing factor (e.g. climate in Hawaii, a suppressed ACS value) is **dropped and the remaining weights re-normalised**, so the county is scored on what exists. `dataCoverage` = share of your weight that had data; filter out low-coverage rows if you want strict comparisons.

**Not modelled:** taxes, insurance, crime, natural-hazard risk, cost of living beyond housing, travel time to care, and personal preferences. Rankings change with your weights; try a few weightings before relying on one order.

#### Notes on the data

- Census values are **ACS 5-year estimates** (latest release) and carry margins of error, especially in small counties.
- Climate is the **30-year average** of NOAA nClimDiv county data (January average minimum, July average maximum, annual precipitation). NOAA doesn't publish this series for Hawaii, so climate factors are skipped there and the score uses your other weights (`dataCoverage` shows this).
- Hospital ratings are CMS overall star ratings; many small hospitals aren't rated.
- The built county table is cached for up to 30 days, so most runs take a few seconds.
- Not yet included: state retirement-income taxes, crime and natural-hazard risk (we only add sources we can use under their terms; requests welcome on the Issues tab).

#### Data sources and legal notes

- **U.S. Census Bureau**: ACS 5-year summary files and Gazetteer files from www2.census.gov (public domain).
- **NOAA NCEI**: nClimDiv county climate files (public domain).
- **CMS**: Care Compare Hospital General Information via the documented Provider Data API (public).
- All sources are fetched politely with an identifying User-Agent. This Actor isn't affiliated with or endorsed by any agency.

#### Disclaimer: not financial, legal or medical advice

Scores are a mathematical summary of public statistics using the weights *you* choose. They **aren't financial, tax, legal, real-estate or medical advice** and don't describe any specific home, neighborhood or person. County averages hide big local differences. Visit, talk to local professionals, and check current prices, taxes, insurance and healthcare access before you move. This tool deliberately uses no protected-class characteristics and must not be used to steer housing decisions based on them.

#### Support

Found a problem or want a factor added? Open an issue on this Actor's **Issues** tab. More Clearfeed Labs data feeds: [clearfeedlabs.com](https://clearfeedlabs.com).

### Related Clearfeed Labs Actors

- [Storm & Hail Damage Leads: NOAA Hail Reports by ZIP Code](https://apify.com/clearfeedlabs/storm-roofing-feed): ZIP codes hit by hail, wind and tornado warnings
- [Local Business Leads Finder: Emails & Phones, No Google](https://apify.com/clearfeedlabs/local-business-leads): local business leads with phones and websites
- [311 Complaints by District: Pain-Point & Spike Tracker](https://apify.com/clearfeedlabs/district-pain-point-tracker): 311 complaint spikes by council district
- [All Clearfeed Labs Actors](https://apify.com/clearfeedlabs)

# Actor input Schema

## `states` (type: `array`):

2-letter state codes to include. Leave empty for all US counties.

## `minPopulation` (type: `integer`):

e.g. 50000 to skip very rural counties.

## `maxPopulation` (type: `integer`):

e.g. 500000 to skip big metros.

## `maxMedianHomeValue` (type: `integer`):

Only counties whose ACS median home value is at or below this.

## `maxItems` (type: `integer`):

Top N counties returned (each row is charged).

## `weight_homeAffordability` (type: `integer`):

0 = ignore this factor. Weights are relative.

## `weight_rentAffordability` (type: `integer`):

0 = ignore this factor. Weights are relative.

## `weight_warmWinters` (type: `integer`):

0 = ignore this factor. Weights are relative.

## `weight_mildSummers` (type: `integer`):

0 = ignore this factor. Weights are relative.

## `weight_lowRainfall` (type: `integer`):

0 = ignore this factor. Weights are relative.

## `weight_hospitalQuality` (type: `integer`):

0 = ignore this factor. Weights are relative.

## `weight_hospitalAccess` (type: `integer`):

0 = ignore this factor. Weights are relative.

## `weight_broadband` (type: `integer`):

0 = ignore this factor. Weights are relative.

## `addHospitalList` (type: `boolean`):

Name, city, type, star rating and emergency services for every hospital in the county.

## Actor input object example

```json
{
  "states": [
    "FL",
    "NC",
    "SC",
    "TN",
    "AZ"
  ],
  "maxItems": 50,
  "weight_homeAffordability": 25,
  "weight_rentAffordability": 10,
  "weight_warmWinters": 15,
  "weight_mildSummers": 10,
  "weight_lowRainfall": 0,
  "weight_hospitalQuality": 20,
  "weight_hospitalAccess": 10,
  "weight_broadband": 10,
  "addHospitalList": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "states": [
        "FL",
        "NC",
        "SC",
        "TN",
        "AZ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clearfeedlabs/retirement-place-scorer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "states": [
        "FL",
        "NC",
        "SC",
        "TN",
        "AZ",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("clearfeedlabs/retirement-place-scorer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "states": [
    "FL",
    "NC",
    "SC",
    "TN",
    "AZ"
  ]
}' |
apify call clearfeedlabs/retirement-place-scorer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,clearfeedlabs/retirement-place-scorer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/z1PmwCzIZPi3g8rHX/builds/eKpeTbVVphGklqUZu/openapi.json
