Change size of dots in scattermapbox, depending on 3rd variable

I am creating plots on a scattermapbox and I want the size of the plotted latitude/longitude pairings to depend on a third variable.

My code is as follows:

layout = html.Div([
    html.H3('Geographic breakdown'),
		'data': [{
		    'lat': df6['lat'],
		    'lon': df6['lon'],
		    'type': 'scattermapbox',
		    'mode': 'markers',
		    'marker': {
		    	#'size': 20,
		    	 'size': df6['count'],
		    	 'sizeref': 0.1,
		    	 'sizemin': 1,
		    	 'sizemode': 'diameter',
		    #'selectedpoints': selected_indices,
		    'selected': {
		        'marker': {'color': '#85144b'}
		'layout': {
		    'mapbox': {
		        'center': {
		            'lat': 52.89,
		           'lon': -1.83
		        'zoom': 5,
		        'accesstoken': accesstoken
		    'margin': {'l': 0, 'r': 0, 't': 0, 'b': 0}

The size of all the dots changes depending on size and sizeref, but the size always seems to be uniform. I want dots of different sizes depending on the value of df6[‘count’] (which takes a value of between 2000 and 5000). Could someone point out the mistake I’m making here?

EDIT: Actually the above code was working, I was uploading the wrong initial dataset!!