Thats exactly what im looking for! Perhaps it a problem that my data only goes up to 3 when the theoretical maximum is 10? The actual data set is also almost 10,000 points so might that be causing issues too?
Weirdest thing too is that everything completely explodes if I don’t define a center and I start getting bugs saying “Cant convert string to numeric”?
Very lost here!
Example:
Traceback (most recent call last):
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\nanops.py", line 1622, in _ensure_numeric
x = float(x)
ValueError: could not convert string to float: 'lat55.4499998558200456.0499987708894957.950000404718375
...
[EXTREMELY LONG RANDOM NUMBERS]
...
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\nanops.py", line 1626, in _ensure_numeric
x = complex(x)
ValueError: complex() arg is a malformed string
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\durra\Documents\Code\COPMapGen\cop_data_parse.py", line 231, in <module>
fig = px.scatter_mapbox(df, lat="lat", lon="lon", color="data", range_color=[1, 10])
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\plotly\express\_chart_types.py", line 1247, in scatter_mapbox
return make_figure(args=locals(), constructor=go.Scattermapbox)
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\plotly\express\_core.py", line 2277, in make_figure
configure_axes(args, constructor, fig, orders)
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\plotly\express\_core.py", line 541, in configure_axes
configurators[constructor](args, fig, orders)
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\plotly\express\_core.py", line 729, in configure_mapbox
lat=args["data_frame"][args["lat"]].mean(),
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\generic.py", line 11127, in mean
return NDFrame.mean(self, axis, skipna, level, numeric_only, **kwargs)
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\generic.py", line 10697, in mean
return self._stat_function(
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\generic.py", line 10649, in _stat_function
return self._reduce(
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\series.py", line 4468, in _reduce
return op(delegate, skipna=skipna, **kwds)
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\nanops.py", line 93, in _f
return f(*args, **kwargs)
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\nanops.py", line 155, in f
result = alt(values, axis=axis, skipna=skipna, **kwds)
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\nanops.py", line 410, in new_func
result = func(values, axis=axis, skipna=skipna, mask=mask, **kwargs)
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\nanops.py", line 698, in nanmean
the_sum = _ensure_numeric(values.sum(axis, dtype=dtype_sum))
File "C:\Users\durra\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\nanops.py", line 1629, in _ensure_numeric
raise TypeError(f"Could not convert {x} to numeric") from err
TypeError: Could not convert lat55.4499998558200456.049
...
to numeric