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

Output last 3 months in one file #2

Open
Mike-Honey opened this issue Sep 12, 2019 · 1 comment
Open

Output last 3 months in one file #2

Mike-Honey opened this issue Sep 12, 2019 · 1 comment

Comments

@Mike-Honey
Copy link

I'm trying to strike a balance between an interesting visualisation and the limits of how many shapes can be displayed in a Mapbox visual. I think a single month is too short (could be just a few days of data at the start of a month). The full historical set is too many shapes for Mapbox.

I think the right balance is around the last 3 months, e.g. currently from July to September 2019. Thats the range I've extracted manually in my current report:

https://app.powerbi.com/view?r=eyJrIjoiNzAwMjFmYjQtZDUwYi00NGZmLWFiOWMtYTI1NDBiOWQ3MTA4IiwidCI6ImRjMWYwNGY1LWMxZTUtNDQyOS1hODEyLTU3OTNiZTQ1YmY5ZCIsImMiOjEwfQ%3D%3D

Can the python script be enhanced to produce a single .geojson file with the last 3 months? This would be an alternative to the current monthly logic. Ideally the dates selected would automatically roll forward over time, or I could edit the script once a month if that is easier.

@Mike-Honey
Copy link
Author

Mike-Honey commented Sep 24, 2019

I'm currently achieving this with a couple of awful script hacks:

  1. instead of the section: # We gather all the unique months..,
    i'm just using:
    months = ['Last-3m']

  2. instead of the line starting: monthsdict[m].append(...
    i'm using:
    if m >= '201907':
    monthsdict[months[0]].append(dict(type="Feature",
    geometry=geom, properties=atr))

Obviously not ideal as I'll have to edit the script every month.

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

1 participant