Skip to content

Commit

Permalink
Merge pull request #6 from acep-uaf/update/data-pipeline
Browse files Browse the repository at this point in the history
Update/data pipeline
  • Loading branch information
ianalexmac authored May 22, 2024
2 parents c52eea4 + e39cf38 commit a1169b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion code/api_call.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let data = [];
fs.createReadStream(csvFilePath)
.pipe(csv())
.on('data', (row) => {
const address = row.Address; // replace 'address' with your CSV column name
const address = row.Address;
const url = `https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent(address)}&key=${GOOGLE_GEOCODE_API}`;

console.log(`Fetching geocode for address: ${address}`);
Expand Down
3 changes: 3 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ node ./code/output_to_csv.js

# Join lat/long to source data
Rscript ./code/join_output_source.R

# Convert CSV to GeoJSON
node ./code/csv_to_geojson.js

0 comments on commit a1169b5

Please sign in to comment.