Last active
March 21, 2023 14:20
-
-
Save jmartinter/5e1273e8267784b1205bb5bdf5d377a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cloudstorage as gcs | |
input = 'geo_shapes/cities.geojson' | |
output = '/geo-shapes/cities.geojson' | |
with open(input, 'r') as f_in: | |
with gcs.open(output, mode='w', content_type='application/json') as f_out: | |
for line in f_in: | |
f_out.write(line + '\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input is a json file with line breaks. We want to keep these breaks in order to read our GCS file line by line later.