This web application has been built to search and visualise property sales in England and Wales.
It uses Next.js, MongoDB and publicly available HM Land Registry data licensed under the Open Government Licence v3.0.
Map data provided by © OpenSteetMap contributors
Bulk importing of csv data requires using mongoimport tool with the following command (depending on shape of data in csv file used):
// Requires following headertypes in first row of the csv file: id.string(),propertyClassification.string(),saleDate.date(2006-01-02),saleValue.int32(),lon.double(),lat.double(),postcode.string(),line1.string(),line2.string(),city.string(),county.string()
mongoimport --uri "mongodb+srv://USER:[email protected]/DB_NAME?retryWrites=true&w=majority" --collection COLLECTION_NAME --type csv --file FILE_NAME --headerline --columnsHaveTypes
npm install
npm run dev
# or
yarn install
yarn dev
Your app should be up and running on http://localhost:3000! If it doesn't work, post on GitHub discussions.
You will either see a message stating "You are connected to MongoDB" or "You are NOT connected to MongoDB". Ensure that you have provided the correct MONGODB_URI
environment variable.
When you are successfully connected, you can refer to the MongoDB Node.js Driver docs for further instructions on how to query your database.
You can deploy this app to the cloud with Vercel (Documentation).
To deploy your local project to Vercel, push it to GitHub/GitLab/Bitbucket and import to Vercel.
Important: When you import your project on Vercel, make sure to click on Environment Variables and set them to match your .env.local
file.
Alternatively, you can deploy using our template by clicking on the Deploy button below.