How do I show a map of points?


#1

You need to create a “csv” file with the following columns

  • description
  • latitude
  • longitude

You can add radiusinpixels and fillcolor to change size and color of points respectively. As an alternative to radiusinpixels, you can use radiusinmeters to set radius size of points based on meters vs pixel size. There are other options detailed in the docs. Once you have your csv file, print to standard output the name of your geomap with the suffix _geotable_path, followed by = and the pathname of your csv file.

example:
print("parks_geotable_path = %s" % path)


#2
  1. Define target_folder in the first code block.

    target_folder = '/tmp'
    
  2. Prepare your CSV using either Latitude and Latitude or WKT.

    import pandas as pd
    longitude_latitude_table = pd.DataFrame([
        (-73.968285, 40.785091),
    ], columns=[
        'Longitude', 'Latitude',
    ])
    
    import pandas as pd
    wkt_table = pd.DataFrame([
        'POINT(-73.968285 40.785091)',
    ], columns=[
        'LONGITUDE_LATITUDE_WKT',
    ])
    
  3. Customize the radius and color of each point.

  4. Save your CSV in target_folder.

    target_path = target_folder + '/locations.csv'
    location_table.to_csv(target_path, index=False)