def process_data(self, data):
if isinstance(data, dict):<EOL><INDENT>self.embed = True<EOL>return data<EOL><DEDENT>elif isinstance(data, str):<EOL><INDENT>if data.lower().startswith(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>')):<EOL><INDENT>if not self.embed:<EOL><INDENT>self.embed_link = data<EOL><DEDENT>return requests.get(data).json()<EOL><DEDENT>elif data.lstrip()[<NUM_LIT:0>] in '<STR_LIT>':  <EOL><INDENT>self.embed = True<EOL>return json.loads(data)<EOL><DEDENT>else:  <EOL><INDENT>if not self.embed:<EOL><INDENT>self.embed_link = data<EOL><DEDENT>with open(data) as f:<EOL><INDENT>return json.loads(f.read())<EOL><DEDENT><DEDENT><DEDENT>elif hasattr(data, '<STR_LIT>'):<EOL><INDENT>self.embed = True<EOL>if hasattr(data, '<STR_LIT>'):<EOL><INDENT>data = data.to_crs(epsg='<STR_LIT>')<EOL><DEDENT>return json.loads(json.dumps(data.__geo_interface__))<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>'.format(data))<EOL><DEDENT>
Convert an unknown data input into a geojson dictionary.