<jupyter_start><jupyter_text>[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/giswqs/leafmap/blob/master/examples/notebooks/09_csv_to_points.ipynb)[![image](https://binder.pangeo.io/badge_logo.svg)](https://gishub.org/leafmap-pangeo)Uncomment the following line to install [leafmap](https://leafmap.org) if needed.<jupyter_code># !pip install leafmap
import os
import leafmap.leafmap as leafmap
in_csv = 'https://raw.githubusercontent.com/giswqs/data/main/world/world_cities.csv'
df = leafmap.csv_to_pandas(in_csv)
df
Map = leafmap.Map()
Map.add_xy_data(in_csv, x="longitude", y="latitude", layer_name="World Cities")
Map
out_dir = os.path.expanduser('~/Downloads')
if not os.path.exists(out_dir):
    os.makedirs(out_dir)
out_shp = os.path.join(out_dir, 'world_cities.shp')
leafmap.csv_to_shp(in_csv, out_shp)
out_geojson = os.path.join(out_dir, 'world_cities.geojson')
leafmap.csv_to_geojson(in_csv, out_geojson)
# gdf = leafmap.csv_to_gdf(in_csv)
# gdf<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15615906886517944, 'fraction_numerical': 0.0019398642095053346, 'mean_word_length': 7.125984251968504, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '645578', 'license': 'MIT', 'n_tokens_mistral': 430, 'n_tokens_neox': 420, 'n_words': 50, 'path': 'examples/notebooks/09_csv_to_points.ipynb', 'repo_name': 'sugatoray/leafmap', 'size': '1031'}