Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Land Transfers With Useful Information #5

Open
geocom opened this issue Jan 22, 2018 · 6 comments
Open

Parse Land Transfers With Useful Information #5

geocom opened this issue Jan 22, 2018 · 6 comments

Comments

@geocom
Copy link

geocom commented Jan 22, 2018

Would be good to get more information with Land Transfers tweets https://twitter.com/PublicNoticesNZ/status/955559455864668160

Maybe add LINZ CC data(https://data.linz.govt.nz/layer/51571-nz-parcels/data/) to translate the Lot numbers an image with a map.
I think translating this to an actual address could be done but extremely difficult and could be prone to failure(Still cannot get google maps to actually put the correct numbering on my property)

@deanpemberton
Copy link

Nice suggestion. There are many ways that we can enrich the data contained in the tweets. Links to the companies office was another thought that I had. Anyone want to suggest a way to define custom templates for each tweet/feed type?

@geocom
Copy link
Author

geocom commented Jan 23, 2018

Had the exact same thought re the companies office link. Only had a quick glance at the code. Will take a better look tonight.

One question though what files are actually being used when run? I'm getting a bit lost when looking though it all it looks like some of the python files are duplicates with only minor changes of the other files uploaded. Don't mind helping out just don't want to to find i'm looking at the wrong files

@deanpemberton
Copy link

The code used to be a single Python script which needed a server and an sqlite db to run. It's now been split into three python scripts (hence the duplication that you quite rightly spotted) which run as AWS Lambda functions.

The 'architecture' is here https://internetnz.nz/sites/default/files/flowchart.png

@deanpemberton
Copy link

My initial ideas were to add a 'template' field to the list of feeds in NZGScheduleFeeds, then when the NZGTweet function gets called, it looks up the template format and knows how to build the tweet it needs to send.

@geocom
Copy link
Author

geocom commented Jan 23, 2018

Seeing as this is charged by amazon to the nearest 100MS the time it takes to run the code is important.

Having had some time to think it over and look at the code I'm thinking it would actually be better to put the templates into .txt files and putting the filenames in NZGScheduleFeeds the reasoning is that

  1. Its cleaner. You can do returns in a text file without using \n which will result in something easier to read while coding
  2. You don't have to read all the template files at once.

The one downside is you have to then parse the text with adding it to the code you could use arrays which would be quicker at changing what needs to be changed as you can just call the cell you want to adjust and then joining the result however I think this would likely only be a negligible speed difference.

@geocom
Copy link
Author

geocom commented Jan 30, 2018

Just wondering what you guys get in twitter when you search for the Hashtags. For me none of them return any of the tweets posted by the bot.

Any idea what is happening here. Very likely to do with twitter but if they are ignoring this bots for searches then what needs to be done to get them working or is it even worth adding the hashtags?

I thinking given the repetitive nature of the hashtags could be why Twitter is down ranking them a sort of spam hashtag prevention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants