Last name:
entity_ids as $person) { // Use the matching API id(s) to return profile information $url = "http://api.sunlightlabs.com/people.getPersonInfo.php?id=$person"; $info = json_decode(file_get_contents($url)); /* ================================================== The CARMA API returns results in JSON format We then parse the data ================================================== */ $fullname = $info->firstname . '+' . $info->lastname; $url = "http://carma.org/api/1.1/searchLocations?name=$fullname®ion_type=6"; $stats = json_decode(file_get_contents($url)); $stats = $stats[0]; ?>

<?php echo $query; ?>
, state_full_name; ?> (party; ?>)
Tons CO2 (Now/Future): carbon->present) . '/', number_format($stats->carbon->future); ?>
MWh Energy (Now/Future): energy->present) . '/', number_format($stats->energy->future); ?>
Intensity (Now/Future): intensity->present) . '/', number_format($stats->intensity->future); ?>
Plants: plant_count; ?>