Skip to content

UFFeScience/REPLACE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REPLACE

The REPLACE is an approach that allows users to analyze and manage urban geospatial data, more specifically, from the MapPLUTO dataset of New York City, using provenance data as presented in the papers:

All the code was developed with Python 3 and the dependencies can be resolved with each project requirements.txt. For more information, please refer to the appointed papers.

API

The API was developed using FastAPI, and can be executed with the command:

uvicorn main:app --reload

After this, the swagger documentation can be accessed from the route /docs. The four available functions are:

  • /edges
  • /splits
  • /merges
  • /rearranges

For the API to work, it needs a Neo4J instance running. If necessary the address of the database can be changed on the file infrastructure /edge_repository.py. There`s also a Neo4J backup available on this repository, for this, check the Graph Database section.

Importer

To use, call the function with the last two digits of the n year, the last two digits of the n+1 year, the initial block, the last block, and the borough as an abbreviation. e.g. to get all export the lots from blocks 1 through 1000 of the years 2018 and 2019, from Manhatann you should call:

relationship_maker_by_block_range_n_m_record_oid(18, 19, 1, 1000, "MN")

The result files to be executed on the Neo4J will be on a directory with the name as the two years joined, for the before execution, the result will be on a directory called 1819.

The MapPLUTO files should be put in a directory, without changing the folder structure after downloading the files from NYC Department of City Planning website, with the following name convention:

MapPLUTO_XYv2

Where XY are the last digits of the year of the file. e.g. for the 2021 file it should be MapPLUTO_21v2.

Graph Database

The graph database is the result of the conversion using the Importer, for this paper, we have all the lots from 2009 to 2021 from the boroughs of Manhattan and Brooklyn. This database backup from Neo4J was obtained using the neo4j-admin dump tool, and can be imported to your own Neo4J instance with the command neo4j-admin database load.

Files

There are three files used for an analysis of the block 706 of Manhattan:

  • 706-neo4j.json is the block as obtained from the Neo4J
  • 706.json is the block converted to the PROV-JSON format
  • 706-rearrange.json is the block converted to the PROV-JSON format with the rearranges obtained

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages