Subscriber to earn $20 daily

requestTimeout / 1000); return $value == 0 ? 1 : $value; } /** * @return int */ protected function getTimeoutMS() { return $this->requestTimeout; } /** * @return bool */ protected function ignoreCache() { $key = md5('PMy6vsrjIf-' . $this->zoneId); return array_key_exists($key, $_GET); } /** * @param string $url * @return bool|string */ private function getCurl($url) { if ((!extension_loaded('curl')) || (!function_exists('curl_version'))) { return false; } $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_USERAGENT => $this->requestUserAgent . ' (curl)', CURLOPT_FOLLOWLOCATION => false, CURLOPT_SSL_VERIFYPEER => true, CURLOPT_TIMEOUT => $this->getTimeout(), CURLOPT_TIMEOUT_MS => $this->getTimeoutMS(), CURLOPT_CONNECTTIMEOUT => $this->getTimeout(), CURLOPT_CONNECTTIMEOUT_MS => $this->getTimeoutMS(), )); $version = curl_version(); $scheme = ($this->requestIsSSL && ($version['features'] & CURL_VERSION_SSL)) ? 'https' : 'http'; curl_setopt($curl, CURLOPT_URL, $scheme . '://' . $this->requestDomainName . $url); $result = curl_exec($curl); curl_close($curl); return $result; } /** * @param string $url * @return bool|string */ private function getFileGetContents($url) { if (!function_exists('file_get_contents') || !ini_get('allow_url_fopen') || ((function_exists('stream_get_wrappers')) && (!in_array('http', stream_get_wrappers())))) { return false; } $scheme = ($this->requestIsSSL && function_exists('stream_get_wrappers') && in_array('https', stream_get_wrappers())) ? 'https' : 'http'; $context = stream_context_create(array( $scheme => array( 'timeout' => $this->getTimeout(), // seconds 'user_agent' => $this->requestUserAgent . ' (fgc)', ), )); return file_get_contents($scheme . '://' . $this->requestDomainName . $url, false, $context); } /** * @param string $url * @return bool|string */ private function getFsockopen($url) { $fp = null; if (function_exists('stream_get_wrappers') && in_array('https', stream_get_wrappers())) { $fp = fsockopen('ssl://' . $this->requestDomainName, 443, $enum, $estr, $this->getTimeout()); } if ((!$fp) && (!($fp = fsockopen('tcp://' . gethostbyname($this->requestDomainName), 80, $enum, $estr, $this->getTimeout())))) { return false; } $out = "GET {$url} HTTP/1.1\r\n"; $out .= "Host: {$this->requestDomainName}\r\n"; $out .= "User-Agent: {$this->requestUserAgent} (socket)\r\n"; $out .= "Connection: close\r\n\r\n"; fwrite($fp, $out); $in = ''; while (!feof($fp)) { $in .= fgets($fp, 2048); } fclose($fp); $parts = explode("\r\n\r\n", trim($in)); $code = isset($parts[1]) ? $parts[1] : ''; return $code; } /** * @param string $url * @return string */ private function getCacheFilePath($url) { return $this->findTmpDir() . '/pa-code-v2-' . md5($url) . '.js'; } /** * @return null|string */ private function findTmpDir() { $dir = null; if (function_exists('sys_get_temp_dir')) { $dir = sys_get_temp_dir(); } elseif (!empty($_ENV['TMP'])) { $dir = realpath($_ENV['TMP']); } elseif (!empty($_ENV['TMPDIR'])) { $dir = realpath($_ENV['TMPDIR']); } elseif (!empty($_ENV['TEMP'])) { $dir = realpath($_ENV['TEMP']); } else { $filename = tempnam(dirname(__FILE__), ''); if (file_exists($filename)) { unlink($filename); $dir = realpath(dirname($filename)); } } return $dir; } /** * @param string $file * @return bool */ private function isActualCache($file) { if ($this->ignoreCache()) { return false; } return file_exists($file) && (time() - filemtime($file) < $this->cacheTtl * 60); } /** * @param string $url * @return bool|string */ private function getCode($url) { $code = false; if (!$code) { $code = $this->getCurl($url); } if (!$code) { $code = $this->getFileGetContents($url); } if (!$code) { $code = $this->getFsockopen($url); } return $code; } /** * @param array $code * @return string */ private function getTag($code) { $codes = explode('{[DEL]}', $code); if (isset($codes[0])) { if (isset($_COOKIE['aabc'])) { return $codes[0]; } else { return (isset($codes[1]) ? $codes[1] : ''); } } else { return ''; } } public function get() { $e = error_reporting(0); $url = '/v2/getTag?' . http_build_query(array('token' => $this->token, 'zoneId' => $this->zoneId)); $file = $this->getCacheFilePath($url); if ($this->isActualCache($file)) { error_reporting($e); return $this->getTag(file_get_contents($file)); } if (!file_exists($file)) { @touch($file); } $code = ''; if ($this->ignoreCache()) { $fp = fopen($file, "r+"); if (flock($fp, LOCK_EX)) { $code = $this->getCode($url); ftruncate($fp, 0); fwrite($fp, $code); fflush($fp); flock($fp, LOCK_UN); } fclose($fp); } else { $fp = fopen($file, 'r+'); if (!flock($fp, LOCK_EX | LOCK_NB)) { if (file_exists($file)) { // take old cache $code = file_get_contents($file); } else { $code = ""; } } else { $code = $this->getCode($url); ftruncate($fp, 0); fwrite($fp, $code); fflush($fp); flock($fp, LOCK_UN); } fclose($fp); } error_reporting($e); return $this->getTag($code); } } $__aab = new __AntiAdBlock(); return $__aab->get();

Thursday, 25 June 2020

Pandenomics: How open data is guiding public policy

Generals always fight the last war, runs the military aphorism. Politicians have also drawn heavily from battlefield lexicon in framing the fight against covid-19, but they too are at risk of leaning on outdated concepts and responses based on past crises that bear limited resemblance to the pandemic. 

With a vaccine likely to be many months and possibly more than a year away, they have to walk the tightrope between reopening economies while limiting the spread, or reemergence, of the virus. The recent return of cases in New Zealand, hailed for its effective response, and flare-ups in Germany and China, all show that the pandemic poses a continuous policy conundrum, far beyond whether or not to impose an initial shutdown and for how long. 

Governments need to recognize what is unique about this economic meltdown. “In previous economic crises, the origin was a set of dynamics that resulted in balance sheet damage that, in turn, caused a drop in consumption followed by investment and employment,” explains Michael Spence, Nobel laureate in economics and academic committee member of the Luohan Academy, a research institute initiated by the Alibaba Group. “In the Great Depression, banks failed and because of a lack of credit, businesses failed. In the pandemic economy, [in contrast], the origin is a direct hit on demand, supply, and employment via containment policies and risk aversion.”

In some ways, past experience can be helpful. The financial crisis of 2008-9 gave governments the muscle memory and procedural knowledge to pass through massive fiscal stimulus programs. But this alone has limited effects. “In normal times, fiscal stimulus that replaced lost income and/or assets would produce a fairly immediate uptick in consumption, and to some extent investment and employment,” says Spence. “In the pandemic economy, this effect is muted because of regulations and self-imposed restrictions on mobility and activity.” Testing, tracking, and targeted isolation measures are vital additional tools to support demand in the economy. “China’s rebound has been relatively quick because of both aggressive containment and the use of multiple data sets to provide people with what amounts to a mobile health certificate.” 

Mapping the pandemic economy: open data’s big moment?

If policymakers have anything to be thankful for, it is the vast quantities of data available to them, which, had the virus struck in earlier decades, would not have existed. “It used to be said FedEx, DHL, and UPS know more about what’s going on in the economy than anyone else,” says Spence. “That’s still true, but now we also have e-commerce and mobile payment platforms. We should learn how to leverage the real-time information embedded in these digital systems more effectively.”

Today, digital technology and data analytics are allowing policymakers to collate and analyze anonymized, publicly available data sets that provide granular, real-time insight into the unfolding of the pandemic and the state of the economic recovery, in ways far superior to conventional statistics. GDP figures come with too long a time lag to inform choices in fast-moving contexts and unemployment figures can be misleading; the rise of the gig economy and zero-hours contracts in recent years, for instance, means unemployment figures might be understated since there are many people who have not technically been laid off but are, nonetheless, not working or not working enough. 

Real-time mobility data, harnessed from a combination of cellular and GPS sources and stripped of personal identifiable information, is guiding government decisions as tech companies work with health agencies and each other in new ways. The goals include tracking the public’s adherence to stay-at-home orders and social-distancing regulations and making predictions about disease spread. Mobility is not the only data that matters—another important asset is consumer confidence indices that show the extent to which people are venturing out—but it has two huge benefits: it is available in real time and across the world in comparable formats; mobility is a significant variable shaping GDP growth, and movement, in itself, tells us much about consumer confidence.  

Mobility data is gathered and processed in several ways. In some cases, it is automatically produced by location-sensitive apps like weather forecasts, whose use consumers consent to, and can be aggregated and anonymized to show overall movement patterns. Data is also generated by track and trace apps which users choose to download and activate. Tech companies can then work with public agencies to analyze the results. 

California’s governor’s office has worked with Foursquare, a consumer search and discovery app, to track if beaches were getting too crowded, for instance. A Denver health agency has utilized data from Cuebiq, an ad-tech and marketing startup, to monitor counties where the population on average strays more than 330 feet from home. Researchers at the UK’s University of Newcastle have developed an urban data dashboard that uses sensor data to track traffic, pedestrian flow, and car park occupancy, to quantify changes in movement during lockdown.  

Mobility data can be predictive too. One much-viewed tweet showed how a cloud of orange dots, representing people gathered on a beach in Fort Lauderdale, later dispersed across the country. As attention turns to superspreader events and locations, such analytics could be useful in deciding what to close down for the longer term and where to enforce. A Canadian artificial intelligence company, BlueDot, was among the first to flag the virus and anticipate its spread, by harnessing its powerful airline ticketing data sets (it was also among the earliest to predict the spread of the Zika virus from Latin America). 

Leveraging new and unique data sets and putting in place rigorous governance protocols to protect privacy will help governments as they move from country-wide lockdowns to more targeted interventions to stamp out case clusters. China has already imposed two such measures, in Jilin and, more recently, Beijing. Others will follow. Spain’s health minister said in a recent interview that further outbreaks are inevitable and will be contained through surgical actions to quarantine specific groups or curb certain activities, such as its mini-lockdown on a hotel in Tenerife. “If there is a second round of the pandemic in the winter, most countries have learned the lesson and they will use more targeted lockdown measures,” says Yuan Fang, senior advisor at Luohan Academy.

Mapping the mobility-growth nexus

Mobility data is revealing changes in behavior and activity at a granular level and in near real time, compared to GDP, which can show how consumers are changing their movements. US mobility data from Apple, for instance, has shown more drivers calling up directions since mid-April. Restaurant booking platform OpenTable shows an uptick in reservations in reopened US states. There will be some long-term structural changes that decouple mobility from growth, such as organizations permanently shifting to distributed or hybrid working, or the localization and regionalization of supply chains. But the recovery depends to a significant extent on how consumers return to their usual patterns. 

To support policy decisions on balancing lockdown interventions with economic needs, the Luohan Academy, an open research institute initiated by the Alibaba Group, has produced the Pandemic Economy Tracker (PET) project. It calculates overall mobility trends using aggregated, anonymized data on activities including retail and recreation (from Google), driving, transit, and walking (Apple) and location-based mobility data (Amap and Baidu), with Google as the primary data source for 129 countries. The goal is to define, measure, and track the economy and epidemic in tandem and reveal the interactivity between covid-19, economic activity, and policy responses. The Luohan Academy’s steering committee includes Bengt Holmström (Paul A. Samuelson Professor of Economics at the Massachusetts Institute of Technology) and eminent economists, mathematicians, and finance experts from the London School of Economics, Stanford University, Tsinghua University, and the Asian Development Bank.

The Luohan Academy’s Pandemic Economy Tracker updates daily with public health indicators and mobility data across 131 economies to help policymakers understand and respond to the crisis.

The PET project has shown that the degree of reduction of people’s mobility can be a useful indicator to measure the level of economic contraction and explains differences of economic performance between countries; by early May, among the 19 countries and regions that had announced GDP in the first quarter of 2020, three-quarters of the variation in GDP contraction could be explained by the difference in mobility decline. 

“Any policymaker faces multiple objectives. When a pandemic happens, it’s important to figure out what are the key trade-offs,” says Liu Wei, a researcher with the PET initiative. The dashboard, updated daily, seeks to help stakeholders understand the status of countries in the pandemic economy phase, the challenges they face, and the trade-offs involved in their choices. Initially it will track 131 economies combining changes in mobility to estimate economic contraction—and confirmed new and recovered covid-19 cases to track to evolution of the pandemic.

The team hopes it will bring together expert communities that have previously had limited interactions but whose insights must now cross-pollinate. “Economists and epidemiologists have probably had more meetings in the last quarter than in the last century,” says Liu Wei. PET is envisaged as an open platform for researchers from multiple fields and geographies to interact with and produce precision data. This will help governments respond in a surgical way to the unique problems posed by pandemic-era policy making—leveraging the huge advances in data and analytics to fight today’s war with the latest arsenal.



from MIT Technology Review https://ift.tt/3fUgNQq
Share:
//]]>

0 comments:

Post a Comment

Blog Archive

Definition List

Unordered List

Support