Closed vkoves closed 11 months ago
Name | Link |
---|---|
Latest commit | cb8308632e40be27ab655591c80a59e80f656bae |
Latest deploy log | https://app.netlify.com/sites/decarb-my-state/deploys/64b759d2b9c00a000837974f |
Deploy Preview | https://deploy-preview-203--decarb-my-state.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Demo with my API key:
@derekeder - we discussed you making a python script so we can now have power plant pages at say /power-plant-maps/{state-slug}-{plant-slug}.png
or something like that. We don't know that plant names are unique so I think keeping the plant slug in there would be helpful.
@JoseMRodriguezO looks like we're missing your script and the images. Looks like you reverted a commit that had the script in this commit 9c1166456200da22ade27441e35cab1906eb57cd. Can you add it back, as well as the 3,500 images?
commit updated
This pull request adds functionality to fetch power plant data from a JSON file and save map images for each power plant using the Google Static Maps API.
Closes #203
Added code to read power plant data from a JSON file.
json.load()
function to directly load the JSON file.Ensure the necessary dependencies, such as requests
and slugify
, are installed.
@JoseMRodriguezO cool - looks like the images are here! nice!
@vkoves the images are in the data folder. do you want to update this PR and move them to the static directory and link to them on the power plant detail page?
@JoseMRodriguezO cool - looks like the images are here! nice!
@vkoves the images are in the data folder. do you want to update this PR and move them to the static directory and link to them on the power plant detail page?
Want to note that this is on my radar and I know I need to get back to this 😆
@derekeder and @JoseMRodriguezO - I've integrated the power plant imagery onto the power plant details page, but there's a few things I noticed. First, here's what I have right now:
So what I noticed:
.webp
or even just a more compressed .jpg
, because this amount of files will make the repo harder to use but also risks eating up our bandwidth.ok, I will work on it
@JoseMRodriguezO - we can talk about it on Tuesday, I think we need to use a tool like ImageMagick to locally compress all the images, but not sure about reducing which power plants we have. If you do want to take a crack at it, this is what I found:
My internal target is < 200 KB per image, but if we could get 100 KB that'd be great. https://squoosh.app/ seems to be able to do that without it looking terrible
Hi, Viktor I just finished with imageMagic. I just resize the images to low 200kb at 600x600 I just need to commit now, also separated the plants by category as requested. I just didnt update my commit before pushing. please verify and let me know. Thank you,
@JoseMRodriguezO - can you post a before after image with one of your images before and after compression? What does the total directory size come out to?
Update branch
@JoseMRodriguezO - that sounds awesome! Can you push up the new images?
Sorry I've dropped the ball on this, I need to get the styling fixed up and then get someone to review this! It's on my list 😆
@derekeder - this is still waiting on you, it's ready for review
Overview
Adds satellite images to all power plants do you can see how large a plant is and understand it's environment.
Closes #xxx
Demo
Optional. Screenshots,
curl
examples, etc.Notes
Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.
Testing Instructions