Skip to content

Commit

Permalink
Merge pull request #62 from OpenGeoscience/ny-grid-improved
Browse files Browse the repository at this point in the history
Use improved NY Grid data
  • Loading branch information
annehaley authored Sep 10, 2024
2 parents a916d9b + 74db6e8 commit 6c51ec8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sample_data/use_cases/new_york_energy/datasets.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"category": "energy",
"files": [
{
"url": "https://data.kitware.com/api/v1/item/66a7bdab0ea2cce8e698b958/download",
"url": "https://data.kitware.com/api/v1/item/66cdd8a6886c56bdc7e282a4/download",
"path": "nyc/networks.zip"
}
]
Expand Down
4 changes: 2 additions & 2 deletions sample_data/use_cases/new_york_energy/import_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def create_network(dataset, network_name, geodata):


def perform_import(dataset, **kwargs):
print('\tEstimated time: 90 minutes.')
print('\tEstimated time: 45 minutes.')
start = datetime.now()
Network.objects.filter(dataset=dataset).delete()
VectorMapLayer.objects.filter(dataset=dataset).delete()
Expand All @@ -92,7 +92,7 @@ def perform_import(dataset, **kwargs):
filenames = zip_archive.namelist()
for filename in filenames:
if filename.endswith('.json'):
network_name = filename.split('/')[-1].replace('.json', '')
network_name = filename.split('/')[-1].replace('.json', '').title()
content = zip_archive.open(filename).read()
geodata = json.loads(content)
create_network(dataset, network_name, geodata)
Expand Down

0 comments on commit 6c51ec8

Please sign in to comment.