Skip to content

Instantly share code, notes, and snippets.

@Rubix982
Rubix982 / Working With GIS & Mapillary - Fetching The Data.py
Created July 26, 2022 21:01
Working With GIS & Mapillary - Fetching The Data
csv_gist_data = requests.get(CSV_URL).content
safegraph_df = pd.read_csv(io.StringIO(csv_gist_data.decode('utf-8')), index_col='ID')
CSV_URL="https://gist.githubusercontent.com/Rubix982/ff3af3545a2f5b49a75aa7e76d1a4f72/raw/1f23dba6623122dafb31fa66d3c174ad5c5118d4/SafeGraphDataCleaned.csv"
import pandas as pd # for dataframes, converting str to a df
import io # preparing a string stream
import requests # fetching data from the GitHub Gist
@Rubix982
Rubix982 / SafeGraphDataCleaned.csv
Last active July 26, 2022 19:59
This CSV is a cleaned version of what is instead available at the original source, https://www.safegraph.com/free-data/point-sample-data.
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 14 columns, instead of 4. in line 6.
ID,Location,Categories,Sub Categories,NAICS Code,Lat,Long,Street Address,City,Region,Postal Code,Country Code,Closed Since,Geometry Type
0,Allpoint ATM,Depository Credit Intermediation,Commercial Banking,522110,41.905919,-87.940391,110 W North Ave,Elmhurst,IL,60126,US,,POINT
1,Long Beach Transit DOWNEY & 68TH NE,Urban Transit Systems,Bus and Other Motor Vehicle Transit Systems,485113,33.87941,-118.15126,Downey & 68th NE,Bellflower,CA,90706,US,2019-07,POINT
2,TD Bank ATM,Depository Credit Intermediation,Commercial Banking,522110,44.25938,-76.584501,Esso,Kingston,ON,K7P 0K3,CA,2021-05,POINT
3,CO-OP Network ATM,Depository Credit Intermediation,Commercial Banking,522110,31.678713,-98.963365,3801 4th St,Brownwood,TX,76801,US,,POINT
4,Niagara Frontier Transportation Authority Centre Ave & 22nd St,Urban Transit Systems,Bus and Other Motor Vehicle Transit Systems,485113,43.113115,-79.036102,Centre Ave & 22nd St,Niagara Falls,NY,14305,US,2019-07,POINT
5,Burlington Transit CAVENDISH AT DEVLIN,Urban Transit Systems,Bus
@Rubix982
Rubix982 / polygon.json
Created August 24, 2021 19:18
Polygon GeoJSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Rubix982
Rubix982 / images_in_geojson_3.json
Created August 24, 2021 19:08
Images in GeoJSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Rubix982
Rubix982 / images_in_geojson_2.json
Created August 24, 2021 19:06
Images in GeoJSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Rubix982
Rubix982 / images_in_geojson_1.json
Created August 24, 2021 19:05
Images in geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Rubix982
Rubix982 / geojson_test.geojson
Created August 9, 2021 16:50
Testing geojson generation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.